while (oleft) {
                if (ileft) {
-                       char buf[4 * SS_RX_MAX];/* buffer for linearize SG src */
-
                        /*
                         * todo is the number of consecutive 4byte word that we
                         * can read from current SG
                                 */
                                todo = min(rx_cnt * 4 - ob, ileft);
                                todo = min_t(size_t, todo, mi.length - oi);
-                               memcpy(buf + ob, mi.addr + oi, todo);
+                               memcpy(ss->buf + ob, mi.addr + oi, todo);
                                ileft -= todo;
                                oi += todo;
                                ob += todo;
                                if (!(ob % 4)) {
-                                       writesl(ss->base + SS_RXFIFO, buf,
+                                       writesl(ss->base + SS_RXFIFO, ss->buf,
                                                ob / 4);
                                        ob = 0;
                                }
                                oo = 0;
                        }
                } else {
-                       char bufo[4 * SS_TX_MAX]; /* buffer for linearize SG dst */
-
                        /*
                         * read obl bytes in bufo, we read at maximum for
                         * emptying the device
                         */
-                       readsl(ss->base + SS_TXFIFO, bufo, tx_cnt);
+                       readsl(ss->base + SS_TXFIFO, ss->bufo, tx_cnt);
                        obl = tx_cnt * 4;
                        obo = 0;
                        do {
                                 */
                                todo = min_t(size_t,
                                             mo.length - oo, obl - obo);
-                               memcpy(mo.addr + oo, bufo + obo, todo);
+                               memcpy(mo.addr + oo, ss->bufo + obo, todo);
                                oleft -= todo;
                                obo += todo;
                                oo += todo;
 
        struct reset_control *reset;
        struct device *dev;
        struct resource *res;
+       char buf[4 * SS_RX_MAX];/* buffer for linearize SG src */
+       char bufo[4 * SS_TX_MAX]; /* buffer for linearize SG dst */
        spinlock_t slock; /* control the use of the device */
 #ifdef CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG
        u32 seed[SS_SEED_LEN / BITS_PER_LONG];