Thread (6 messages) 6 messages, 4 authors, 2021-07-27

Re: [PATCH] asm-generic: avoid sparse {get,put}_unaligned warning

From: Sven Eckelmann <sven@narfation.org>
Date: 2021-07-26 15:08:23
Also in: batman, lkml

On Monday, 26 July 2021 14:57:31 CEST Arnd Bergmann wrote:
quoted
quoted
The special attribute force must be used in such statements when the cast
is known to be safe to avoid these warnings.
I can see why this would warn, but I'm having trouble reproducing the
warning on linux-next.
I have sparse 0.6.3 on an Debian bullseye amd64 system. Sources are from 
linux-next next-20210723

    make allnoconfig
    cat >> .config << "EOF"
    CONFIG_NET=y
    CONFIG_INET=y
    CONFIG_BATMAN_ADV=y
    CONFIG_BATMAN_ADV_DAT=y
    EOF
    make olddefconfig
    make CHECK="sparse -Wbitwise-pointer" C=1

I should maybe have made this clearer in the last sentence of the first 
paragraph: "This is also true for pointers to variables with this type when
-Wbitwise-pointer is activated."

Kind regards,
	Sven

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help