netpoll: avoid put_unaligned() on single character
authorArnd Bergmann <arnd@arndb.de>
Fri, 7 May 2021 22:07:56 +0000 (00:07 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 17 May 2021 11:30:29 +0000 (13:30 +0200)
commite3e22076710632250cfaee853499f3de6e9be35d
treeb94e7a4e2c077a2928d2b8fa2bddadb2c434f93e
parent8f4e3d48bb50765ab27ae5bebed2595b20de80a1
netpoll: avoid put_unaligned() on single character

With a planned cleanup, using put_unaligned() on a single character
results in a harmless warning:

In file included from ./arch/x86/include/generated/asm/unaligned.h:1,
                 from include/linux/etherdevice.h:24,
                 from net/core/netpoll.c:18:
net/core/netpoll.c: In function 'netpoll_send_udp':
include/asm-generic/unaligned.h:23:9: error: 'packed' attribute ignored for field of type 'unsigned char' [-Werror=attributes]
net/core/netpoll.c:431:3: note: in expansion of macro 'put_unaligned'
  431 |   put_unaligned(0x60, (unsigned char *)ip6h);
      |   ^~~~~~~~~~~~~
include/asm-generic/unaligned.h:23:9: error: 'packed' attribute ignored for field of type 'unsigned char' [-Werror=attributes]
net/core/netpoll.c:459:3: note: in expansion of macro 'put_unaligned'
  459 |   put_unaligned(0x45, (unsigned char *)iph);
      |   ^~~~~~~~~~~~~

Replace this with an open-coded pointer dereference.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
net/core/netpoll.c