[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [net, v1, 1/4] net: cadence_gem: Fix Tx descriptor upda

From: Michael Tokarev
Subject: Re: [Qemu-devel] [net, v1, 1/4] net: cadence_gem: Fix Tx descriptor update
Date: Sat, 24 May 2014 10:38:06 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

         if (tx_desc_get_last(desc)) {
+            unsigned    desc_first[2];
             /* Modify the 1st descriptor of this packet to be owned by
              * the processor.
-                                     (uint8_t *)&desc[0], sizeof(desc));
-            tx_desc_set_used(desc);
+                                     (uint8_t *)&desc_first[0], sizeof(desc));
+            tx_desc_set_used(desc_first);
-                                      (uint8_t *)&desc[0], sizeof(desc));
+                                      (uint8_t *)&desc_first[0], sizeof(desc));
             /* Advance the hardare current descriptor past this packet */

This is quite fun.

Can we, please,

 a) s/unsigned/uint8_t/ in the variable declaration,
   and remove the useless casts and "readdressing" everywhere?

and, more interesting,

 b) s/sizeof(desc)/sizeof(desc_first)/g
    ? :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]