All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net: spider_net: fix possible bitops errors
@ 2014-10-03 15:01 ` Antoine Tenart
  0 siblings, 0 replies; 17+ messages in thread
From: Antoine Tenart @ 2014-10-03 15:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Dan reported a possible signedness issue on the pxa168_eth driver. While
having a look at it, I came across a similar problem in the spider_net
driver.

Here is one proposal to fix it. The first patch rework the
spider_net_set_mac() function by removing the spider_net_get_mac_address()
call and using memcpy() to set netdev->dev_addr (which is what's done in
lots of Ethernet drivers) and the second one fix the actual signedness
issue.

If for any reason you really want to keep a call to
spider_net_get_mac_address() because the memcpy() is somehow not good
enough here, we can also come up with a solution involving a temporary
unsigned char variable.

I couldn't test these changes, so please do.

Thanks,

Antoine

Antoine Tenart (2):
  net: spider_net: do not read mac address again after setting it
  net: spider_net: avoid using signed char for bitops

 drivers/net/ethernet/toshiba/spider_net.c | 42 ++++---------------------------
 1 file changed, 5 insertions(+), 37 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-10-06  1:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 15:01 [PATCH 0/2] net: spider_net: fix possible bitops errors Antoine Tenart
2014-10-03 15:01 ` Antoine Tenart
2014-10-03 15:01 ` [PATCH] net: pxa168_eth: avoid using signed char for bitops Antoine Tenart
2014-10-03 15:01   ` Antoine Tenart
2014-10-03 15:01   ` Antoine Tenart
2014-10-03 15:07   ` Antoine Tenart
2014-10-03 15:07     ` Antoine Tenart
2014-10-03 15:01 ` [PATCH 1/2] net: spider_net: do not read mac address again after setting it Antoine Tenart
2014-10-03 15:01   ` Antoine Tenart
2014-10-03 15:01 ` [PATCH 2/2] net: spider_net: avoid using signed char for bitops Antoine Tenart
2014-10-03 15:01   ` Antoine Tenart
2014-10-03 15:15   ` Arnd Bergmann
2014-10-03 15:15     ` Arnd Bergmann
2014-10-03 15:17     ` Antoine Tenart
2014-10-03 15:17       ` Antoine Tenart
2014-10-06  1:15 ` [PATCH 0/2] net: spider_net: fix possible bitops errors David Miller
2014-10-06  1:15   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.