Re: [PATCH v2] kbuild: Change fallthrough comments to attributes

2019-08-13 Thread Nathan Chancellor
On Mon, Aug 12, 2019 at 04:11:26PM -0700, Nick Desaulniers wrote: > Correct, Nathan is currently implementing support for attribute > fallthrough in Clang in: > https://reviews.llvm.org/D64838 > > I asked him in person to evaluate how many warnings we'd see in an > arm64 defconfig with his patch

[PATCH] soundwire: Don't build sound.o without CONFIG_ACPI

2019-08-13 Thread Nathan Chancellor
ild tested with CONFIG_ACPI set and unset in combination with CONFIG_SOUNDWIRE unset, built in, and a module. Fixes: 8676b3ca4673 ("soundwire: fix regmap dependencies and align with other serial links") Link: https://github.com/ClangBuiltLinux/linux/issues/637 Signed-off-by: Nathan Chancellor --

Re: [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang

2019-08-12 Thread Nathan Chancellor
On Mon, Aug 12, 2019 at 10:40:49PM +0300, Jussi Kivilinna wrote: > That's quite complicated approach. Fast and easier process would be if you > just own the patch yourself. Libgcrypt (and target file in libgcrypt) > is LGPL v2.1+, so the license is compatible with kernel and you are good > to go

Re: [PATCH 4/5] lib/mpi: Fix for building for MIPS64 with Clang

2019-08-12 Thread Nathan Chancellor
On Mon, Aug 12, 2019 at 10:42:31AM -0700, Nick Desaulniers wrote: > On Sun, Aug 11, 2019 at 8:31 PM Nathan Chancellor > wrote: > > > > From: Werner Koch > > > > * mpi/longlong.h [MIPS64][__clang__]: Use the C version like we > > already do for 32 bit MIPS &

Re: [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang

2019-08-12 Thread Nathan Chancellor
On Mon, Aug 12, 2019 at 10:35:53AM +0300, Jussi Kivilinna wrote: > Hello, > > On 12.8.2019 6.31, Nathan Chancellor wrote: > > From: Vladimir Serbinenko > > > > clang doesn't recognise =l / =h assembly operand specifiers but apparently > > handles C version we

Re: [PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-12 Thread Nathan Chancellor
On Mon, Aug 12, 2019 at 07:37:51AM +0200, Christophe Leroy wrote: > > > Le 12/08/2019 à 04:32, Nathan Chancellor a écrit : > > Commit aea447141c7e ("powerpc: Disable -Wbuiltin-requires-header when > > setjmp is used") disabled -Wbuiltin-requires-header because of

Re: [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang

2019-08-11 Thread Nathan Chancellor
On Sun, Aug 11, 2019 at 10:23:55PM -0700, Nathan Chancellor wrote: > On Sun, Aug 11, 2019 at 08:31:18PM -0700, Nathan Chancellor wrote: > > From: Vladimir Serbinenko > > > > clang doesn't recognise =l / =h assembly operand specifiers but apparently > > handles C ver

Re: [PATCH 4/5] lib/mpi: Fix for building for MIPS64 with Clang

2019-08-11 Thread Nathan Chancellor
On Sun, Aug 11, 2019 at 08:31:19PM -0700, Nathan Chancellor wrote: > From: Werner Koch > > * mpi/longlong.h [MIPS64][__clang__]: Use the C version like we > already do for 32 bit MIPS > > clang errors: > > lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of

Re: [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang

2019-08-11 Thread Nathan Chancellor
On Sun, Aug 11, 2019 at 08:31:18PM -0700, Nathan Chancellor wrote: > From: Vladimir Serbinenko > > clang doesn't recognise =l / =h assembly operand specifiers but apparently > handles C version well. > > lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a &g

[PATCH 4/5] lib/mpi: Fix for building for MIPS64 with Clang

2019-08-11 Thread Nathan Chancellor
fied subject line Removed GnuPG-bug-id Removed space between defined and (__clang__)] Signed-off-by: Nathan Chancellor --- lib/mpi/longlong.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 8a1507fc94dd..5636e6a09f7a 1

[PATCH 1/5] MIPS: Don't use bc_false uninitialized in __mm_isBranchInstr

2019-08-11 Thread Nathan Chancellor
e_unused as it will not be used when CONFIG_MIPS_FP_SUPPORT isn't enabled. Fixes: 6a1cc218b9cc ("MIPS: branch: Remove FP branch handling when CONFIG_MIPS_FP_SUPPORT=n") Link: https://github.com/ClangBuiltLinux/linux/issues/603 Signed-off-by: Nathan Chancellor --- arch/mips/kernel/branc

[PATCH 2/5] MIPS/ptrace: Update mips_get_syscall_arg's return type

2019-08-11 Thread Nathan Chancellor
uot;) Link: https://github.com/ClangBuiltLinux/linux/issues/604 Signed-off-by: Nathan Chancellor --- arch/mips/include/asm/syscall.h | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h index 83

[PATCH 0/5] Clang build fixes for MIPS

2019-08-11 Thread Nathan Chancellor
Hi all, As of clang 9.0.0 at r366299 [1], we can build a QEMU bootable malta_defconfig kernel with the following fixes (mostly due to -Werror) and Nick's patch [2]. This has helped catch some potentially dubious behavior with -Wuninitialized, which is stronger than GCC's -Wmaybe-uninitialized.

[PATCH 5/5] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean

2019-08-11 Thread Nathan Chancellor
r generated. Explicitly cast this value to a boolean so that clang understands we intend for this to be a non-zero value. Fixes: 00bf1c691d08 ("MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields") Link: https://github.com/ClangBuiltLinux/linux/issues/609 Signed-off-by: Nathan Ch

[PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang

2019-08-11 Thread Nathan Chancellor
mit Removed space between defined and (__clang__)] Signed-off-by: Nathan Chancellor --- lib/mpi/longlong.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h index 3bb6260d8f42..8a1507fc94dd 100644 --- a/lib/mpi/longlong.h +++ b/lib/m

[PATCH] net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx

2019-08-11 Thread Nathan Chancellor
is is checked in other parts of the tree. Because NET_IP_ALIGN is a build time constant, this check will be constant folded away during optimization. Fixes: 82a9928db560 ("tc35815: Enable StripCRC feature") Link: https://github.com/ClangBuiltLinux/linux/issues/608 Signed-off-by: Nathan Chancello

[PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-11 Thread Nathan Chancellor
ect/commit/3be25e79477db2d31ac46493d97eca8c20592b07 Signed-off-by: Nathan Chancellor --- It may be worth using -fno-builtin-setjmp and -fno-builtin-longjmp instead as it makes it clear to clang that we are not using the builtin longjmp and setjmp functions, which I think is why these warnings are appearing (at least

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Nathan Chancellor
On Sat, Aug 10, 2019 at 08:06:05PM -0700, Joe Perches wrote: > On Sat, 2019-08-10 at 19:04 -0700, Nathan Chancellor wrote: > > On a tangential note, how are you planning on doing the fallthrough > > comment to attribute conversion? The reason I ask is clang does not > >

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-10 Thread Nathan Chancellor
On Sat, Aug 10, 2019 at 01:18:22PM -0700, Joe Perches wrote: > On Sat, 2019-08-10 at 12:44 -0700, Linus Torvalds wrote: > > On Sat, Aug 10, 2019 at 12:32 PM Joe Perches wrote: > > > What does it take for this sort of patch to be applied by you? > > > > The basic rule tends to be: "normal

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.3-4 tag

2019-08-10 Thread Nathan Chancellor
On Sat, Aug 10, 2019 at 10:21:01AM -0700, Linus Torvalds wrote: > On Sat, Aug 10, 2019 at 3:11 AM Michael Ellerman wrote: > > > > Just one fix, a revert of a commit that was meant to be a minor improvement > > to > > some inline asm, but ended up having no real benefit with GCC and broke > >

[PATCH] firmware: arm_scmi: Eliminate local db variable in SCMI_PERF_FC_RING_DB

2019-08-09 Thread Nathan Chancellor
ot;firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol") Link: https://github.com/ClangBuiltLinux/linux/issues/635 Signed-off-by: Nathan Chancellor --- drivers/firmware/arm_scmi/perf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/fi

Re: [PATCH] powerpc: fix inline asm constraints for dcbz

2019-08-09 Thread Nathan Chancellor
: slightly improve cache helpers") > Debugged-by: Nathan Chancellor > Reported-by: Nathan Chancellor > Reported-by: kbuild test robot > Suggested-by: Arnd Bergmann > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers I applied this patch as well as a re

Re: [PATCH] arm64/cache: silence -Woverride-init warnings

2019-08-08 Thread Nathan Chancellor
On Thu, Aug 08, 2019 at 11:38:08AM +0100, Mark Rutland wrote: > On Wed, Aug 07, 2019 at 11:29:16PM -0400, Qian Cai wrote: > > The commit 155433cb365e ("arm64: cache: Remove support for ASID-tagged > > VIVT I-caches") introduced some compiation warnings from GCC (and > > Clang) with

Re: [PATCH] arm64/cache: silence -Woverride-init warnings

2019-08-07 Thread Nathan Chancellor
") > Signed-off-by: Qian Cai It's a shame we can't just use one cc-disable-warning statement but -Woverride-init wasn't added for GCC compatibility until clang 8.0.0 and we don't have an established minimum clang version. With that said, I applied your patch and I don't see with warning with W=1 anymore and I see both options get added to the clang command line with V=1. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Cheers!

[PATCH] phy-rockchip-inno-hdmi: Fix RK3328_TERM_RESISTOR_CALIB_SPEED_7_0's third value

2019-08-07 Thread Nathan Chancellor
ed-by: Andrzej Hajda Reported-by: Guenter Roeck Reported-by: kernelci.org bot Reported-by: Naresh Kamboju Suggested-by: Guenter Roeck Suggested-by: Robin Murphy Signed-off-by: Nathan Chancellor --- drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-08-06 Thread Nathan Chancellor
On Tue, Aug 06, 2019 at 03:37:42PM -0700, Nick Desaulniers wrote: > On Thu, Aug 1, 2019 at 12:11 AM Johannes Berg > wrote: > > > > > > > Luca, you said this was already fixed in your internal tree, and the fix > > > would appear soon in next, but I don't see anything in linux-next? > > > > Luca

[PATCH] pinctrl: aspeed: g6: Remove const specifier from aspeed_g6_sig_expr_set's ctx parameter

2019-08-06 Thread Nathan Chancellor
me because it wasn't merged yet). Fixes: 2eda1cdec49f ("pinctrl: aspeed: Add AST2600 pinmux support") Link: https://github.com/ClangBuiltLinux/linux/issues/632 Signed-off-by: Nathan Chancellor --- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH] Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang

2019-08-05 Thread Nathan Chancellor
so remove the =3 from an existing use in a parisc Makefile: > arch/parisc/math-emu/Makefile > > Signed-off-by: Joe Perches Looks good to me. I can see this warning get added to the command line even if it does nothing right now. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor

Re: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use

2019-08-04 Thread Nathan Chancellor
Hi Joe, On Sun, Aug 04, 2019 at 05:39:28PM -0700, Joe Perches wrote: > On Sun, 2019-08-04 at 11:09 -0700, Linus Torvalds wrote: > > On Sun, Aug 4, 2019 at 11:01 AM Joe Perches wrote: > > > Linus? Do you have an opinion about this RFC/patch? > > > > So my only real concern is that the comment

Re: [PATCH 4.14 054/293] sched/fair: Fix "runnable_avg_yN_inv" not used warnings

2019-07-30 Thread Nathan Chancellor
On Mon, Jul 29, 2019 at 09:19:05PM +0200, Greg Kroah-Hartman wrote: > [ Upstream commit 509466b7d480bc5d22e90b9fbe6122ae0e2fbe39 ] > > runnable_avg_yN_inv[] is only used in kernel/sched/pelt.c but was > included in several other places because they need other macros all > came from

Re: [PATCH v3] kbuild: Check for unknown options with cc-option usage in Kconfig and clang

2019-07-30 Thread Nathan Chancellor
able already has the -Werror=unknown-warning-option flag set. Thanks > to Doug for pointing out the different rule. > > [1] > https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option > Cc: Peter Smith > Cc: Nathan Chancellor > Cc: Nick Desaulniers >

Re: [PATCH] mips: avoid explicit UB in assignment of mips_io_port_base

2019-07-29 Thread Nathan Chancellor
k there's any > actual compiler bugs related, just runtime bugs due to UB. > > Link: https://github.com/ClangBuiltLinux/linux/issues/610 > Fixes: 966f4406d903 ("[MIPS] Work around bad code generation for .") > Reported-by: Nathan Chancellor > Debugged-by: Nathan Chancel

Re: [PATCH] driver core: platform: return -ENXIO for missing GpioInt

2019-07-29 Thread Nathan Chancellor
On Mon, Jul 29, 2019 at 01:49:54PM -0700, Brian Norris wrote: > Commit daaef255dc96 ("driver: platform: Support parsing GpioInt 0 in > platform_get_irq()") broke the Embedded Controller driver on most LPC > Chromebooks (i.e., most x86 Chromebooks), because cros_ec_lpc expects > platform_get_irq()

Re: [PATCH] powerpc: workaround clang codegen bug in dcbz

2019-07-29 Thread Nathan Chancellor
On Mon, Jul 29, 2019 at 01:45:35PM -0700, Nick Desaulniers wrote: > On Mon, Jul 29, 2019 at 1:32 PM Nathan Chancellor > wrote: > > > > On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote: > > > But I'm not sure how the inlined code generated would be affec

Re: [PATCH] powerpc: workaround clang codegen bug in dcbz

2019-07-29 Thread Nathan Chancellor
kml/20190721075846.GA97701@archlinux-threadripper/ > Debugged-by: Nathan Chancellor > Reported-by: Nathan Chancellor > Reported-by: kbuild test robot > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers > --- > Alternatively, we could just revert 6c5875843b8

Re: [PATCH] kbuild: initialize CLANG_FLAGS correctly in the top Makefile

2019-07-29 Thread Nathan Chancellor
ile everything needlessly due to the build command > change. > > Fix this by correctly initializing CLANG_FLAGS. > > Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags") > Cc: # v4.20+ > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor

Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

2019-07-26 Thread Nathan Chancellor
On Fri, Jul 26, 2019 at 09:19:52PM -0700, Andrew Morton wrote: > On Fri, 26 Jul 2019 20:42:05 -0700 Nathan Chancellor > wrote: > > > > @@ -2414,8 +2414,9 @@ void mem_cgroup_handle_over_high(void) > > >*/ > > > clamped_high = max(high, 1UL); > >

Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

2019-07-26 Thread Nathan Chancellor
On Thu, Jul 25, 2019 at 04:39:59PM -0700, Andrew Morton wrote: > On Thu, 25 Jul 2019 15:02:59 -0700 Randy Dunlap wrote: > > > On 7/24/19 9:40 PM, a...@linux-foundation.org wrote: > > > The mm-of-the-moment snapshot 2019-07-24-21-39 has been uploaded to > > > > > >

[PATCH] drivers: net: xgene: Move status variable declaration into CONFIG_ACPI block

2019-07-26 Thread Nathan Chancellor
so that there are no compiler warnings. Fixes: 570d785ba46b ("drivers: net: xgene: Remove acpi_has_method() calls") Signed-off-by: Nathan Chancellor --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c| 3 ++- drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 3 ++- drivers/net/et

Re: [PATCH v2] kbuild: Check for unknown options with cc-option usage in Kconfig and clang

2019-07-25 Thread Nathan Chancellor
able already has the -Werror=unknown-warning-option flag set. Thanks > to Doug for pointing out the different rule. > > [1] > https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option > Cc: Peter Smith > Cc: Nathan Chancellor > Cc: Nick Desaulniers >

Re: [PATCH] kbuild: Check for unknown options with cc-option and clang in Kbuild

2019-07-25 Thread Nathan Chancellor
On Thu, Jul 25, 2019 at 08:41:25AM -0700, Stephen Boyd wrote: > Quoting Nathan Chancellor (2019-07-24 22:18:57) > > Hi Stephen, > > > > Was the second Kbuild in the subject line supposed to be Kconfig? > > Sure. I'll change it to Kconfig. > > > > >

Re: [PATCH] kbuild: Check for unknown options with cc-option and clang in Kbuild

2019-07-24 Thread Nathan Chancellor
s -Werror=unknown-warning-option. Thanks to > Doug for pointing out the different rule. > > [1] > https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option > Cc: Peter Smith > Cc: Nathan Chancellor > Cc: Nick Desaulniers > Cc: Douglas Anderson >

Re: [PATCH] objtool: Improve UACCESS coverage

2019-07-24 Thread Nathan Chancellor
g: objtool: eb_copy_relocations.isra.34()+0x0: <=== (func) > > Reported-by: Josh Poimboeuf > Reported-by: Thomas Gleixner > Signed-off-by: Peter Zijlstra (Intel) This doesn't regress clang and I see the warning on GCC now too. Tested-by: Nathan Chancellor

Re: [PATCH] asm-generic: fix -Wtype-limits compiler warnings

2019-07-23 Thread Nathan Chancellor
; function __get_order(), and leave get_order() as a single-line macro in > order to avoid compilation errors. Wouldn't it just be better to rename __get_order to get_order? > Fixes: d66acc39c7ce ("bitops: Optimise get_order()") > Signed-off-by: Qian Cai Other than that, LGTM. Reviewed-by: Nathan Chancellor

Re: [PATCH] [v2] waitqueue: shut up clang -Wuninitialized warnings

2019-07-23 Thread Nathan Chancellor
On Tue, Jul 23, 2019 at 01:03:05PM +0200, Arnd Bergmann wrote: > On Tue, Jul 23, 2019 at 12:50 PM Peter Zijlstra wrote: > > On Fri, Jul 19, 2019 at 01:36:00PM +0200, Arnd Bergmann wrote: > > > --- a/include/linux/wait.h > > > +++ b/include/linux/wait.h > > > @@ -70,8 +70,17 @@ extern void

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-07-21 Thread Nathan Chancellor
On Mon, Jun 03, 2019 at 03:11:58PM -0700, Nathan Chancellor wrote: > When building with -Wsometimes-uninitialized, clang warns: > > drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is > used uninitialized whenever 'for' loop exits because its condition is > fal

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Nathan Chancellor
Hi Segher, On Sun, Jul 21, 2019 at 01:01:50PM -0500, Segher Boessenkool wrote: > On Sun, Jul 21, 2019 at 12:58:46AM -0700, Nathan Chancellor wrote: > > I have attached the disassembly of arch/powerpc/kernel/mem.o with > > clear_page (working) and broken_clear_page (broken), alon

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-21 Thread Nathan Chancellor
On Fri, Jul 19, 2019 at 09:04:55AM -0700, Nathan Chancellor wrote: > On Fri, Jul 19, 2019 at 10:23:03AM -0500, Segher Boessenkool wrote: > > On Thu, Jul 18, 2019 at 08:24:56PM -0700, Nathan Chancellor wrote: > > > On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wro

Re: [PATCH] [v2] waitqueue: shut up clang -Wuninitialized warnings

2019-07-19 Thread Nathan Chancellor
d=31829 > Link: https://bugs.llvm.org/show_bug.cgi?id=42604 > Link: https://lore.kernel.org/lkml/20190703081119.209976-1-a...@arndb.de/ > Link: https://reviews.llvm.org/D64678 > Link: > https://storage.kernelci.org/next/master/next-20190717/arm64/allmodconfig/clang-8/build-warnings.l

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-19 Thread Nathan Chancellor
On Fri, Jul 19, 2019 at 10:23:03AM -0500, Segher Boessenkool wrote: > On Thu, Jul 18, 2019 at 08:24:56PM -0700, Nathan Chancellor wrote: > > On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > > > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Chri

Re: x86 - clang / objtool status

2019-07-19 Thread Nathan Chancellor
On Fri, Jul 19, 2019 at 08:39:00AM +0200, Thomas Gleixner wrote: > On Thu, 18 Jul 2019, Nathan Chancellor wrote: > > > Hi Thomas, > > > > I can't comment on the objtool stuff as it is a bit outside of my area > > of expertise (probably going to be my next major l

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-18 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > Is that a Clang bug ? > > No idea, it happens with clang-8 and clang-9 though (pretty sure there > were fixes for PowerPC in clang-8 s

Re: x86 - clang / objtool status

2019-07-18 Thread Nathan Chancellor
Hi Thomas, I can't comment on the objtool stuff as it is a bit outside of my area of expertise (probably going to be my next major learning project) but I can comment on the other errors. On Thu, Jul 18, 2019 at 10:40:09PM +0200, Thomas Gleixner wrote: > Build fails with: > > clang-10:

Re: [PATCH v2] kbuild: Fail if gold linker is detected

2019-07-16 Thread Nathan Chancellor
ld folks, fail > the build when gold is detected. > > Signed-off-by: Thomas Gleixner > Acked-by: Peter Zijlstra (Intel) > Link: > https://lore.kernel.org/r/came9roqmqkq0lnpm25ye_yt0fkp05wmhorwc0ardb53mifk...@mail.gmail.com Based on the crude little testing script I wrote bel

Re: kbuild: Fail if gold linker is detected

2019-07-16 Thread Nathan Chancellor
On Tue, Jul 16, 2019 at 02:47:56PM +0200, Thomas Gleixner wrote: > The gold linker has known issues of failing the build in random and > predictible ways. H.J. stated: > > "Since building a workable kernel for different kernel configurations >isn't a requirement for gold, I don't recommend

Re: [PATCH net v2] skbuff: fix compilation warnings in skb_dump()

2019-07-16 Thread Nathan Chancellor
ut the argument has type 'unsigned int' [-Wformat] >level, sk->sk_family, sk->sk_type, > sk->sk_protocol); > ^~~ > > Fix them by using the proper types. > > Fixes: 6413139dfc64 ("skbuff: increase verbosity when dumping skb data") > Signed-off-by: Qian Cai Reviewed-by: Nathan Chancellor

Re: [PATCH] kbuild: add --hash-style= and --build-id unconditionally

2019-07-13 Thread Nathan Chancellor
by ld.lld; I tested both arm and x86, the build ID shows up fine. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor

Re: [GIT PULL] Driver core patches for 5.3-rc1

2019-07-12 Thread Nathan Chancellor
On Fri, Jul 12, 2019 at 02:43:28PM -0700, Linus Torvalds wrote: > On Fri, Jul 12, 2019 at 2:37 PM Linus Torvalds > wrote: > > > > My bad. Will apply the fix properly. > > Ok, _now_ your fix is finally in my tree. D'oh. > > Linus Great, thank you for the quick response! :) Nathan

Re: [GIT PULL] Driver core patches for 5.3-rc1

2019-07-12 Thread Nathan Chancellor
er for you. > > > > Other than the debugfs cleanups, in this set of changes we have: > > - bus iteration function cleanups (will cause build warnings > > with s390 and coresight drivers in your tree) > > And here is the patch that should resolve the coresight

Re: [PATCH] acpi: fix false-positive -Wuninitialized warning

2019-07-12 Thread Nathan Chancellor
g and won't be fixed. > > Changing the acpi_get_override_irq() macro to an inline function > reliably avoids the issue. > > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor

Re: [PATCH] [v3] x86: kvm: avoid -Wsometimes-uninitized warning

2019-07-12 Thread Nathan Chancellor
dition is false [-Werror,-Wsometimes-uninitialized] > arch/x86/kvm/hyperv.c:1610:6: error: variable 'param' is used uninitialized > whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] > > Flip the condition around to avoid the conditional execution on i386. > > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor

Re: [PATCH] xen/trace: avoid clang warning on function pointers

2019-07-12 Thread Nathan Chancellor
hink it's reasonable to work around it in this one location since this is indeed the only instance of this warning that I see in the kernel tree across all of my builds. Reviewed-by: Nathan Chancellor

Re: [PATCH] dma: ste_dma40: fix unneeded variable warning

2019-07-12 Thread Nathan Chancellor
rnal-declaration] > static u32 d40_backup_regs_chan[] = { > > Mark these __maybe_unused to shut up the warning. > > Signed-off-by: Arnd Bergmann Might be worth mentioning that this warning will only appear when CONFIG_PM is unset (they are both used in d40_save_restore_registers). Reviewed-by: Nathan Chancellor

Re: [PATCH] waitqueue: fix clang -Wuninitialized warnings

2019-07-12 Thread Nathan Chancellor
On Fri, Jul 12, 2019 at 09:45:06AM +0200, Arnd Bergmann wrote: > On Fri, Jul 12, 2019 at 2:49 AM Andrew Morton > wrote: > > On Wed, 3 Jul 2019 10:10:55 +0200 Arnd Bergmann wrote: > > > > > > > Surely clang is being extraordinarily dumb here? > > > > DECLARE_WAIT_QUEUE_HEAD_ONSTACK() is

Re: [PATCH v2] ASoC: audio-graph-card: Constify reg in graph_get_dai_id

2019-07-11 Thread Nathan Chancellor
christmas tree look. > > > > Fixes: c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in > > graph_get_dai_id()") > > Link: https://github.com/ClangBuiltLinux/linux/issues/600 > > Signed-off-by: Nathan Chancellor > > --- > > Maybe

[PATCH v2] ASoC: audio-graph-card: Constify reg in graph_get_dai_id

2019-07-11 Thread Nathan Chancellor
uot;, NULL); ^ ~~ 1 error generated. Move the declaration up a bit to keep the reverse christmas tree look. Fixes: c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()") Link: https://github.com/ClangBuiltLinux/linux/issues/600 Signed-off-b

[PATCH] ASoC: audio-graph-card: Constify reg in graph_get_dai_id

2019-07-11 Thread Nathan Chancellor
uot;, NULL); ^ ~~ 1 error generated. Move the declaration up a bit to keep the reverse christmas tree look. Fixes: c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()") Link: https://github.com/ClangBuiltLinux/linux/issues/599 Signed-off-b

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-07-11 Thread Nathan Chancellor
.llvm.org/show_bug.cgi?id=42580 > Link: https://github.com/ClangBuiltLinux/linux/issues/580 > Reported-by: Arnd Bergmann > Reported-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers Applied on next-20190711 and I can confirm that this fixes the issue we observed. Thanks to you for w

Re: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status

2019-07-11 Thread Nathan Chancellor
On Thu, Jul 11, 2019 at 02:18:08PM -0300, Jason Gunthorpe wrote: > On Thu, Jul 11, 2019 at 10:16:44AM -0700, Nick Desaulniers wrote: > > On Thu, Jul 11, 2019 at 6:39 AM Jason Gunthorpe wrote: > > > > > > On Thu, Jul 11, 2019 at 01:14:34AM -0700, Nathan Chancello

Re: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status

2019-07-11 Thread Nathan Chancellor
Hi Bernard, On Thu, Jul 11, 2019 at 07:44:22AM +, Bernard Metzler wrote: > Nathan, thanks very much. That's correct. Thanks for the confirmation that the fix was correct. > I don't know how this could pass w/o warning. Unfortunately, it appears that GCC only warns when two different

Re: [PATCH] net/mlx5e: Move priv variable into case statement in mlx5e_setup_tc

2019-07-11 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 11:02:00PM -0700, Saeed Mahameed wrote: > On Wed, Jul 10, 2019 at 12:05 PM Nathan Chancellor > wrote: > > > > There is an unused variable warning on arm64 defconfig when > > CONFIG_MLX5_ESWITCH is unset: > > > > drivers/net/ethernet/

Re: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status

2019-07-10 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 04:53:50PM -0700, Nick Desaulniers wrote: > On Wed, Jul 10, 2019 at 11:26 AM Jason Gunthorpe wrote: > > > > On Wed, Jul 10, 2019 at 10:48:00AM -0700, Nathan Chancellor wrote: > > > clang warns several times: > > > > > > driver

[PATCH] net/mlx5e: Move priv variable into case statement in mlx5e_setup_tc

2019-07-10 Thread Nathan Chancellor
generated. Move it down into the case statement where it is used. Fixes: 4e95bc268b91 ("net: flow_offload: add flow_block_cb_setup_simple()") Link: https://github.com/ClangBuiltLinux/linux/issues/597 Signed-off-by: Nathan Chancellor --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7

[PATCH] rdma/siw: Use proper enumerated type in map_cqe_status

2019-07-10 Thread Nathan Chancellor
("rdma/siw: completion queue methods") Link: https://github.com/ClangBuiltLinux/linux/issues/596 Signed-off-by: Nathan Chancellor --- drivers/infiniband/sw/siw/siw_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/siw_cq.c b/drivers/inf

Re: [PATCH] [net-next] net/mlx5e: avoid uninitialized variable use

2019-07-10 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 03:06:25PM +0200, Arnd Bergmann wrote: > clang points to a variable being used in an unexpected > code path: > > drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:251:2: warning: > variable 'rec_seq_sz' is used uninitialized whenever switch default is taken >

Re: [PATCH] acpi: blacklist: fix clang warning for unused dmi table

2019-07-10 Thread Nathan Chancellor
> static const struct dmi_system_id acpi_rev_dmi_table[] __initconst; > > As the variable is not actually used here, hide it entirely > in an #ifdef to shut up the warning. > > Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor

Re: [PATCH v2] IB/rdmavt: Fix variable shadowing issue in rvt_create_cq

2019-07-10 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 02:02:16PM -0300, Jason Gunthorpe wrote: > > Applied to for-next with Mike's ack > > Thanks, > Jason Thank you Jason, much appreciated! Nathan

Re: [PATCH v2] IB/rdmavt: Fix variable shadowing issue in rvt_create_cq

2019-07-10 Thread Nathan Chancellor
On Wed, Jul 10, 2019 at 10:03:23AM -0700, Ira Weiny wrote: > What version of the kernel was this found on? > > I don't see the problem with 5.2. AFAICS there is no 'err' in the function > scope and the if scoped 'err' is initialized properly on line 239. > > Ira > $ git describe --contains

Re: [PATCH] vsyscall: use __iter_div_u64_rem()

2019-07-10 Thread Nathan Chancellor
se_vsyscall(vdata)) > update_vdso_data(vdata, tk); > -- > 2.20.0 > What an interesting function. Looks good to me and I can confirm it fixes the link error. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor

[PATCH net-next v3] net/mlx5e: Convert single case statement switch statements into if statements

2019-07-10 Thread Nathan Chancellor
Romanovsky Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v1 -> v2: * Refactor switch statements into if statements v2 -> v3: * Rebase on net-next after v1 was already applied, patch just refactors switch statements to if statements. .../mellanox/mlx5/core/en

Re: [PATCH v2] net/mlx5e: Refactor switch statements to avoid using uninitialized variables

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 10:36:57PM -0700, David Miller wrote: > > I applied your simpler addition of the return statement so that I could > get the net-next pull request out tonight, just FYI... Thanks for the heads up, I'll spin up a v3 just focusing on the refactoring. Cheers, Nathan

[PATCH v2] net/mlx5e: Refactor switch statements to avoid using uninitialized variables

2019-07-09 Thread Nathan Chancellor
since there is only one cipher supported. Do that to clear up the code. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Link: https://github.com/ClangBuiltLinux/linux/issues/590 Suggested-by: Leon Romanovsky Suggested-by: Nick Desaulniers Signed-off-by: Nathan

Re: [PATCH] net/mlx5e: Return in default case statement in tx_post_resync_params

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 03:44:59PM -0700, Nick Desaulniers wrote: > On Mon, Jul 8, 2019 at 4:13 PM Nathan Chancellor > wrote: > > > > clang warns: > > > > drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:251:2: > > warning: variable 'rec_seq_sz' i

[PATCH v2] IB/rdmavt: Fix variable shadowing issue in rvt_create_cq

2019-07-09 Thread Nathan Chancellor
ed err declaration so that there is only one copy of the err variable for this function. Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory") Link: https://github.com/ClangBuiltLinux/linux/issues/594 Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v1 -

Re: [PATCH] IB/rdmavt: Remove err declaration in if statement in rvt_create_cq

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 03:38:57PM -0700, Nick Desaulniers wrote: > On Tue, Jul 9, 2019 at 3:13 PM Nathan Chancellor > wrote: > > > > clang warns: > > > > drivers/infiniband/sw/rdmavt/cq.c:260:7: warning: variable 'err' is used > > Oh, !$*@, this is a t

[PATCH] IB/rdmavt: Remove err declaration in if statement in rvt_create_cq

2019-07-09 Thread Nathan Chancellor
/hfi1: Move rvt_cq_wc struct into uapi directory") Link: https://github.com/ClangBuiltLinux/linux/issues/594 Signed-off-by: Nathan Chancellor --- drivers/infiniband/sw/rdmavt/cq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/sw/rdmavt/cq.c b/drivers/infiniband/sw/r

[PATCH] watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe

2019-07-09 Thread Nathan Chancellor
ink: https://github.com/ClangBuiltLinux/linux/issues/591 Reported-by: kernelci.org bot Signed-off-by: Nathan Chancellor --- drivers/watchdog/digicolor_wdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/watchdog/digicolor_wdt.c b/drivers/watchdog/digicolor_wdt.c index 33cda95bd238..073d37867

Re: [linux-next][P9]Build error at drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69 error: field mirror has incomplete type

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 09:56:37PM +0530, Abdul Haleem wrote: > Greeting's > > linux-next failed to build on Power 9 Box with below error > > In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0, > from drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:39: >

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > > Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : > > On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > > > On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > >

[PATCH] net/mlx5e: Return in default case statement in tx_post_resync_params

2019-07-08 Thread Nathan Chancellor
: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Link: https://github.com/ClangBuiltLinux/linux/issues/590 Signed-off-by: Nathan Chancellor --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-08 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > > that are summed to obtain the target address. Using 'Z' constraint > > and '%y0' argument gives

Re: [PATCH] ceph: fix uninitialized return code

2019-07-08 Thread Nathan Chancellor
ixes: 108f95bfaa56 ("vfs: Convert ceph to use the new mount API") > Signed-off-by: Arnd Bergmann Thanks for the patch! Reviewed-by: Nathan Chancellor

Re: [PATCH] waitqueue: fix clang -Wuninitialized warnings

2019-07-03 Thread Nathan Chancellor
I can see across various defconfig and allyesconfig testing. This resolves all of them. Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor

Re: [PATCH] soc: rockchip: work around clang warning

2019-07-03 Thread Nathan Chancellor
ang side. It might be worth holding off on this to see if it can make it into LLVM 9, which will branch in about two weeks and be released at the end of August (according to llvm.org). I don't feel strongly about it though so if this is going in: Reviewed-by: Nathan Chancellor

Re: [PATCH] arm64: mm: Fix dead assignment of old_pte

2019-07-02 Thread Nathan Chancellor
On Tue, Jul 02, 2019 at 04:13:02PM -0700, 'Nathan Huckleberry' via Clang Built Linux wrote: > When analyzed with the clang static analyzer the > following warning occurs > > line 251, column 2 > Value stored to 'old_pte' is never read > > This warning is repeated every time pgtable.h is >

Re: [PATCH] MAINTAINERS: Add FSI subsystem

2019-07-02 Thread Nathan Chancellor
Hi Joel, On Tue, Jul 02, 2019 at 02:07:05PM +0930, Joel Stanley wrote: > The subsystem was merged some time ago but we did not have a maintainers > entry. > > Signed-off-by: Joel Stanley > --- > MAINTAINERS | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/MAINTAINERS

Re: linux-next: manual merge of the char-misc tree with the driver-core tree

2019-07-01 Thread Nathan Chancellor
> -- > Cheers, > Stephen Rothwell Hi Stephen and Michael, It looks like a similar fix is needed for the vhost tree because of commit edcd69ab9a32 ("iommu: Add virtio-iommu driver") interacting with commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_f

Re: linux-next: manual merge of the char-misc tree with the driver-core tree

2019-07-01 Thread Nathan Chancellor
-- > Cheers, > Stephen Rothwell Hi Stephen, The attached patch is needed in addition to this to avoid a build error about incompatible pointer types (in the commit message). Cheers, Nathan >From 2b2dd836a7370d9b33fb0f70515ecd7bc8462c0a Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Dat

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-27 Thread Nathan Chancellor
On Mon, Jun 03, 2019 at 03:11:58PM -0700, Nathan Chancellor wrote: > When building with -Wsometimes-uninitialized, clang warns: > > drivers/pci/hotplug/rpaphp_core.c:243:14: warning: variable 'fndit' is > used uninitialized whenever 'for' loop exits because its condition is > fal

[PATCH] kbuild: Add ability to test Clang's integrated assembler

2019-06-27 Thread Nathan Chancellor
/ClangBuiltLinux/linux/issues/577 Suggested-by: Dmitry Golovin Signed-off-by: Nathan Chancellor --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 5102b2bbd224..d77481129339 100644 --- a/Makefile +++ b/Makefile @@ -527,7 +527,9 @@ endif ifneq ($(GCC_TOOLCHAIN

<    3   4   5   6   7   8   9   10   11   12   >