Clang warning fixes for 4.4 and 4.9
Hi Greg,
Please apply the following commits to both 4.4 and 4.9:
9280cdd6fe5b ("fs: compat: Remove warning from COMPATIBLE_IOCTL") 342e91578eb6 ("selinux: Remove unnecessary check of array base in selinux_set_mapping()") f7e30f01a9e2 ("cpumask: Add helper cpumask_available()")d170fe7dd992 ("genirq: Use cpumask_available() for check of cpumask variable") 7c30f352c852 ("jiffies.h: declare jiffies and jiffies_64 with ____cacheline_aligned_in_smp") 60b0a8c3d248 ("frv: declare jiffies to be located in the .data section") eee6ebbac18a ("netfilter: nf_nat_h323: fix logical-not-parentheses warning") dae1a432ab1f ("Input: mousedev - fix implicit conversion warning") e36215d87f30 ("dm ioctl: remove double parentheses")76dc52684d0f ("PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant")
Please apply the following commits to only 4.4:
c877ef8ae7b8 ("writeback: fix the wrong congested state variable definition") 452889788591 ("ACPI, PCI, irq: remove redundant check for null string pointer") db0a6fb5d97a ("audit: add tty field to LOGIN event")
Please apply the following commits to only 4.9:
270e8573145a ("selinux: Remove redundant check for unknown labeling behavior") 82cd58805281 ("arm64: avoid overflow in VA_START and PAGE_OFFSET") 0dde10bed2c4 ("btrfs: Remove extra parentheses from condition in copy_items()") a4ac6f2e53e5 ("mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()") 93f56de25937 ("mac80211: Fix clang warning about constant operand in logical operation") a2b7cbdd2559 ("netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch") 765a1077c85e ("HID: sony: Use LED_CORE_SUSPENDRESUME")aa1702dd162f ("cfg80211: Fix array-bounds warning in fragment copy") bbf67e450a5d ("nl80211: Fix enum type of variable in nl80211_put_sta_rate()") 1f3d62090d3b ("xgene_enet: remove bogus forward declarations")8a8b161df5ce ("usb: gadget: remove redundant self assignment")
I have verified these all pick clean. I will send separate patches for the fixes that did not. I have verified everything builds properly with both GCC and Clang on arm and arm64.
Thanks!
Nathan
Greg Kroah-Hartman
maintainerQuoted 1 line · Nathan Chancellor
db0a6fb5d97a("audit: add tty field to LOGIN event")
This feels like a new feature, not a clang build warning fix, right? Why is it needed?
thanks,
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
Quoted 1 line · Nathan Chancellor
db0a6fb5d97a("audit: add tty field to LOGIN event")This feels like a new feature, not a clang build warning fix, right? Why is it needed?
thanks,
greg k-h
It very well might but it does fix the following Clang warning:
../kernel/audit.c:1894:59: warning: address of array 'tsk->signal->tty->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name)
~~ ~~~~~~~~~~~~~~~~~~^~~~1 warning generated.
I guess a 4.4 only fix would be to remove the '&& tsk->signal->tty->name' but I know you have said many times that just taking the patch in Linus' tree is preferred.
Thanks!
Nathan
Greg Kroah-Hartman
maintainerQuoted 16 lines · Nathan Chancellor
Quoted 9 lines · Greg Kroah-Hartman
Quoted 1 line · Nathan Chancellor
db0a6fb5d97a("audit: add tty field to LOGIN event")This feels like a new feature, not a clang build warning fix, right? Why is it needed?
thanks,
greg k-h
It very well might but it does fix the following Clang warning:
../kernel/audit.c:1894:59: warning: address of array 'tsk->signal->tty->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
Quoted 7 lines
if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name) ~~ ~~~~~~~~~~~~~~~~~~^~~~1 warning generated.
I guess a 4.4 only fix would be to remove the '&&
tsk->signal->tty->name' but I know you have said many times that just taking the patch in Linus' tree is preferred.
In looking at this closer, it does fix an audit problem in 4.4 for correctly handling things, and it's really tiny, so I've now queued it up, thanks.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 1 line · Nathan Chancellor
7c30f352c852("jiffies.h: declare jiffies andjiffies_64with____cacheline_aligned_in_smp")
This patch does not apply to the 4.9.y or 4.4.y trees :(
Quoted 5 lines · Greg Kroah-Hartman
Quoted 1 line · Nathan Chancellor
7c30f352c852("jiffies.h: declare jiffies andjiffies_64with____cacheline_aligned_in_smp")This patch does not apply to the 4.9.y or 4.4.y trees :(
Hmmm interesting, I just picked it clean on top of 4.4.126 and 4.9.92. I can send it separately if you would like.
Nathan
Greg Kroah-Hartman
maintainerQuoted 9 lines · Nathan Chancellor
Quoted 5 lines · Greg Kroah-Hartman
Quoted 1 line · Nathan Chancellor
7c30f352c852("jiffies.h: declare jiffies andjiffies_64with____cacheline_aligned_in_smp")This patch does not apply to the 4.9.y or 4.4.y trees :(
Hmmm interesting, I just picked it clean on top of 4.4.126 and 4.9.92. I can send it separately if you would like.
Ah, nevermind, this was an out-of-order thing with the frv.h change. Both now queued up, sorry for the noise.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 35 lines · Nathan Chancellor
Hi Greg,
Please apply the following commits to both 4.4 and 4.9:
9280cdd6fe5b("fs: compat: Remove warning fromCOMPATIBLE_IOCTL")342e91578eb6("selinux: Remove unnecessary check of array base inselinux_set_mapping()")f7e30f01a9e2("cpumask: Add helpercpumask_available()")d170fe7dd992("genirq: Usecpumask_available()for check of cpumask variable")7c30f352c852("jiffies.h: declare jiffies andjiffies_64with____cacheline_aligned_in_smp")60b0a8c3d248("frv: declare jiffies to be located in the .data section")eee6ebbac18a("netfilter:nf_nat_h323: fix logical-not-parentheses warning")dae1a432ab1f("Input: mousedev - fix implicit conversion warning")e36215d87f30("dm ioctl: remove double parentheses")76dc52684d0f("PCI: MakePCI_ROM_ADDRESS_MASKa 32-bit constant")Please apply the following commits to only 4.4:
c877ef8ae7b8("writeback: fix the wrong congested state variable definition") 452889788591 ("ACPI, PCI, irq: remove redundant check for null string pointer")db0a6fb5d97a("audit: add tty field to LOGIN event")Please apply the following commits to only 4.9:
270e8573145a("selinux: Remove redundant check for unknown labeling behavior")82cd58805281("arm64: avoid overflow inVA_STARTandPAGE_OFFSET")0dde10bed2c4("btrfs: Remove extra parentheses from condition incopy_items()")a4ac6f2e53e5("mac80211: ibss: Fix channel type enum inieee80211_sta_join_ibss()")93f56de25937("mac80211: Fix clang warning about constant operand in logical operation")a2b7cbdd2559("netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch")765a1077c85e("HID: sony: UseLED_CORE_SUSPENDRESUME")aa1702dd162f("cfg80211: Fix array-bounds warning in fragment copy")bbf67e450a5d("nl80211: Fix enum type of variable innl80211_put_sta_rate()")1f3d62090d3b("xgene_enet: remove bogus forward declarations")8a8b161df5ce("usb: gadget: remove redundant self assignment")
Quoted 3 lines
I have verified these all pick clean. I will send separate patches for the fixes that did not. I have verified everything builds properly with both GCC and Clang on arm and arm64.
I think I've applied all of these now, thanks!
greg k-h