Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-26 Thread Nathan Chancellor
On Wed, Jun 26, 2019 at 09:46:02PM +0200, Thomas Gleixner wrote: > On Wed, 26 Jun 2019, Nathan Chancellor wrote: > > On Wed, Jun 26, 2019 at 05:18:37PM +0200, Thomas Gleixner wrote: > > > tarball with log and the preprocessed source and run scripts: > > > > &g

Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-26 Thread Nathan Chancellor
On Wed, Jun 26, 2019 at 05:18:37PM +0200, Thomas Gleixner wrote: > tarball with log and the preprocessed source and run scripts: > > https://tglx.de/~tglx/tc-crash.tar.bz2 > > The machine runs up to date debian stretch which has backports enabled and > I just used the install command from

Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-25 Thread Nathan Chancellor
On Tue, Jun 25, 2019 at 08:46:26PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jun 25, 2019 at 01:27:46PM -0700, Nathan Chancellor escreveu: > > On Tue, Jun 25, 2019 at 09:53:09PM +0200, Thomas Gleixner wrote: > > > On Tue, 25 Jun 2019, Nathan Chancellor wrote: > >

Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-25 Thread Nathan Chancellor
On Tue, Jun 25, 2019 at 11:47:06PM +0200, Thomas Gleixner wrote: > On Tue, 25 Jun 2019, Nathan Chancellor wrote: > > On Tue, Jun 25, 2019 at 09:53:09PM +0200, Thomas Gleixner wrote: > > > > > > But can the script please check for a minimal clang version require

[PATCH] arm64/efi: Mark __efistub_stext_offset as an absolute symbol explicitly

2019-06-25 Thread Nathan Chancellor
Signed-off-by: Nathan Chancellor --- arch/arm64/kernel/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h index 04ca08086d35..9a2d2227907c 100644 --- a/arch/arm64/kernel/image.h +++ b/arch/arm64/kernel/image.h @@ -67,7

Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-25 Thread Nathan Chancellor
Hi Thomas, On Tue, Jun 25, 2019 at 09:53:09PM +0200, Thomas Gleixner wrote: > On Tue, 25 Jun 2019, Nathan Chancellor wrote: > > On Tue, Jun 25, 2019 at 10:12:42AM -0700, Kees Cook wrote: > > > On Tue, Jun 25, 2019 at 09:18:46AM +0200, Peter Zijlstra wrote: > > > >

[PATCH] xsk: Properly terminate assignment in xskq_produce_flush_desc

2019-06-25 Thread Nathan Chancellor
k: add Rx receive functions and poll support") Link: https://github.com/ClangBuiltLinux/linux/issues/544 Signed-off-by: Nathan Chancellor --- net/xdp/xsk_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h index 88b9ae24658d..cba4a64

Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

2019-06-25 Thread Nathan Chancellor
On Tue, Jun 25, 2019 at 10:12:42AM -0700, Kees Cook wrote: > On Tue, Jun 25, 2019 at 09:18:46AM +0200, Peter Zijlstra wrote: > > Can it build a kernel without patches yet? That is, why should I care > > what LLVM does? > > Yes. LLVM trunk builds and boots x86 now. As for distro availability, >

[PATCH] pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard

2019-06-21 Thread Nathan Chancellor
ACPI support") Link: https://github.com/ClangBuiltLinux/linux/issues/569 Signed-off-by: Nathan Chancellor --- drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm8

Re: [PATCH] gen_compile_command: Add support for separate KBUILD_OUTPUT directory

2019-06-20 Thread Nathan Chancellor
On Thu, Jun 20, 2019 at 01:25:36PM -0700, Nick Desaulniers wrote: > On Thu, Jun 20, 2019 at 1:13 PM Doug Anderson wrote: > > On Thu, Jun 20, 2019 at 12:53 PM Nick Desaulniers > > wrote: > > > > > > I do miss Doug's Kbuild caching patches' speedup. > > > > You actually get quite a bit of this by

Re: [PATCH] mtd: mtd-abi: Don't use C++ comments

2019-06-20 Thread Nathan Chancellor
On Thu, Jun 20, 2019 at 12:56:58PM -0700, Nick Desaulniers wrote: > On Thu, Jun 20, 2019 at 8:55 AM Nathan Chancellor > wrote: > > > > When compiled standalone after commit b91976b7c0e3 ("kbuild: > > compile-test UAPI headers to ensure they are self-contained

Re: [PATCH v2 4/6] mm/memory_hotplug: Rename walk_memory_range() and pass start+size instead of pfns

2019-06-20 Thread Nathan Chancellor
On Thu, Jun 20, 2019 at 12:35:18PM +0200, David Hildenbrand wrote: > walk_memory_range() was once used to iterate over sections. Now, it > iterates over memory blocks. Rename the function, fixup the > documentation. Also, pass start+size instead of PFNs, which is what most > callers already have

[PATCH] mtd: mtd-abi: Don't use C++ comments

2019-06-20 Thread Nathan Chancellor
is warning no longer occurs. Signed-off-by: Nathan Chancellor --- include/uapi/mtd/mtd-abi.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index aff5b5e59845..3fe9237f723a 100644 --- a/include/uapi/mtd/mtd-abi.h +++

Re: [PATCH 1/1] staging: media: fix style problem

2019-06-19 Thread Nathan Chancellor
On Thu, Jun 20, 2019 at 10:32:48AM +0530, Aliasgar Surti wrote: > From: Aliasgar Surti > > checkpatch reported "WARNING: line over 80 characters". > This patch fixes the warning for file davinci_vpfe/dm365_isif.c > > Signed-off-by: Aliasgar Surti > --- >

Re: [PATCH v2] MAINTAINERS: add CLANG/LLVM BUILD SUPPORT info

2019-06-19 Thread Nathan Chancellor
are paid to support > building the Linux kernel with Clang and LLVM. > > Signed-off-by: Nick Desaulniers FWIW, if it is not too late: Reviewed-by: Nathan Chancellor > --- > Changes V1 -> V2: > - tabs vs spaces as per Joe Perches > > MAINTAINERS | 8 > 1

[PATCH] drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings

2019-06-19 Thread Nathan Chancellor
negated. Fixes: 3dbbf8f09e83 ("drm/msm/dsi: Add old timings quirk for 10nm phy") Link: https://github.com/ClangBuiltLinux/linux/547 Reported-by: kbuild test robot Reviewed-by: Jeffrey Hugo Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 2 +- 1

Re: [PATCH] net/ipv4: fib_trie: Avoid cryptic ternary expressions

2019-06-18 Thread Nathan Chancellor
On Tue, Jun 18, 2019 at 02:14:40PM -0700, Matthias Kaehlcke wrote: > empty_child_inc/dec() use the ternary operator for conditional > operations. The conditions involve the post/pre in/decrement > operator and the operation is only performed when the condition > is *not* true. This is hard to

Re: [PATCH] clk: imx6q: Annotate imx6q_obtain_fixed_clk_hw with __init

2019-06-18 Thread Nathan Chancellor
On Tue, Jun 18, 2019 at 09:42:55PM +0800, Shawn Guo wrote: > On Mon, Jun 17, 2019 at 07:24:05PM -0700, Nathan Chancellor wrote: > > When building with clang, the following modpost warning occurs: > > > > WARNING: vmlinux.o(.text+0x974dbc): Section mismatch in reference

[PATCH] clk: imx6q: Annotate imx6q_obtain_fixed_clk_hw with __init

2019-06-17 Thread Nathan Chancellor
this warning. Fixes: 992b703b5b38 ("clk: imx6q: Switch to clk_hw based API") Link: https://github.com/ClangBuiltLinux/linux/issues/541 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/clk/imx/clk-imx6q.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletion

[PATCH] ARM: iop13xx: Simplify iop13xx_atu{e,x}_pci_status checks

2019-06-17 Thread Nathan Chancellor
readable. Link: https://github.com/ClangBuiltLinux/linux/issues/543 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- arch/arm/mach-iop13xx/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c

arm32 build failure after 992aa864dca068554802a65a467a2640985cc213

2019-06-17 Thread Nathan Chancellor
Hi all, A 32-bit ARM allyesconfig fails to link after commit 992aa864dca0 ("mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations") because of 64-bit division: arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.o: in function

[PATCH] kbuild: Enable -Wuninitialized

2019-06-14 Thread Nathan Chancellor
://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019...@lca.pw/ We very much want to catch these so turn this warning on so that CI is aware of it. Link: https://github.com/ClangBuiltLinux/linux/issues/381 Signed-off-by: Nathan Chancellor --- scripts/Makefile.extrawarn | 1 - 1 file changed, 1

Re: [PATCH] mfd: stmfx: Fix macro definition spelling

2019-06-13 Thread Nathan Chancellor
On Tue, May 14, 2019 at 07:54:04PM +0100, Lee Jones wrote: > On Tue, 14 May 2019, Nathan Chancellor wrote: > > > On Mon, May 13, 2019 at 08:30:59AM +0100, Lee Jones wrote: > > > On Fri, 10 May 2019, Nathan Chancellor wrote: > > > > > > > Clang war

Re: [PATCH] clk: qcom: Fix -Wunused-const-variable

2019-06-11 Thread Nathan Chancellor
MSM8996 Global Clock Control (GCC) > driver") > Cc: clang-built-li...@googlegroups.com > Link: https://github.com/ClangBuiltLinux/linux/issues/518 > Suggested-by: Nathan Chancellor > Signed-off-by: Nathan Huckleberry LGTM, this doesn't introduce any warnings/errors on arm32 or

[PATCH] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS

2019-06-11 Thread Nathan Chancellor
osticsReference.html#wunknown-warning-option Link: https://github.com/ClangBuiltLinux/linux/issues/511 Link: https://github.com/ClangBuiltLinux/linux/issues/517 Suggested-by: Peter Smith Signed-off-by: Nathan Chancellor --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefil

[PATCH v2] arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS

2019-06-11 Thread Nathan Chancellor
uot;arm64: Silence gcc warnings about arch ABI drift") Link: https://github.com/ClangBuiltLinux/linux/issues/511 Reported-by: Qian Cai Acked-by: Dave Martin Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v1 -> v2: * Improve commit message explanation, I w

[PATCH] arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS

2019-06-07 Thread Nathan Chancellor
Clang. Fixes: ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift") Link: https://github.com/ClangBuiltLinux/linux/issues/511 Reported-by: Qian Cai Signed-off-by: Nathan Chancellor --- arch/arm64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ar

Re: [BUG 4.4.178] x86_64 compat mode futexes broken

2019-06-06 Thread Nathan Chancellor
On Fri, Jun 07, 2019 at 01:01:36AM +, Joe Korty wrote: > Hi Nathan, > I started with 4.4.179-rt181 and worked backwards from there. Per your > suggestion, I tried 4.4.180 and it does work properly. > > Thanks, > Joe Great, thank you for testing and sorry for the breakage in the first place,

Re: [BUG 4.4.178] x86_64 compat mode futexes broken

2019-06-06 Thread Nathan Chancellor
On Thu, Jun 06, 2019 at 09:11:43PM +, Joe Korty wrote: > Starting with 4.4.178, the LTP test > > pthread_cond_wait/2-3 > > when compiled on x86_64 with 'gcc -m32', started failing. It generates this > log output: > > [16:18:38]Implementation supports the MONOTONIC CLOCK but option is

Re: [PATCH] ASoC: rt1011: Mark format integer literals as unsigned

2019-06-06 Thread Nathan Chancellor
On Thu, Jun 06, 2019 at 11:50:10AM -0700, Nick Desaulniers wrote: > On Wed, Jun 5, 2019 at 10:13 PM Nathan Chancellor > wrote: > > > > Clang warns: > > > > sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large > > to be represented in type 'l

Re: [PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-06-06 Thread Nathan Chancellor
y me, I figured that might be preferred (since clang will warn if VHOST_ARCH_CAN_ACCEL_UACCESS is not defined so you'd know if the header was forgotten). Thank you for the fix :) Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor > > > diff --git a/drivers/vhost/vhost.h b/drive

[PATCH] scsi: lpfc: Fix backport of faf5a744f4f8 ("scsi: lpfc: avoid uninitialized variable warning")

2019-06-06 Thread Nathan Chancellor
it was placed after the allocation so we leaked memory whenever this function was called and that conditional was true (so whenever CONFIG_NVME_FC is disabled). Move the IS_ENABLED if statement above the allocation since it is not needed when the condition is true. Reported-by: Pavel Machek Signed-off-b

[PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-06-06 Thread Nathan Chancellor
adata through kernel virtual address") Link: https://github.com/ClangBuiltLinux/linux/issues/508 Signed-off-by: Nathan Chancellor --- drivers/vhost/vhost.c | 44 +-- drivers/vhost/vhost.h | 7 --- 2 files changed, 26 insertions(+), 25 deletions(-) di

Re: [PATCH 4.19 237/276] scsi: lpfc: avoid uninitialized variable warning

2019-06-06 Thread Nathan Chancellor
On Thu, Jun 06, 2019 at 02:53:23PM +0200, Pavel Machek wrote: > Hi! > > > [ Upstream commit faf5a744f4f8d76e7c03912b5cd381ac8045f6ec ] > > > > clang -Wuninitialized incorrectly sees a variable being used without > > initialization: > > > > drivers/scsi/lpfc/lpfc_nvme.c:2102:37: error: variable

[PATCH] scsi: lpfc: Avoid unused function warnings

2019-06-05 Thread Nathan Chancellor
] These functions are only compiled when CONFIG_NVME_TARGET_FC is enabled. Use that same condition so there is no more warning. While the fixes commit did not introduce these functions, it caused these warnings. Fixes: 4064b27417a7 ("scsi: lpfc: Make some symbols static") Signed-off-

[PATCH] ASoC: rt1011: Mark format integer literals as unsigned

2019-06-05 Thread Nathan Chancellor
BuiltLinux/linux/issues/506 Signed-off-by: Nathan Chancellor --- sound/soc/codecs/rt1011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 349d6db7ecd4..3a0ae80c5ee0 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/

[PATCH v3] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Nathan Chancellor
;scsi: ibmvscsi: redo driver work thread to use enum action states") Link: https://github.com/ClangBuiltLinux/linux/issues/502 Suggested-by: Michael Ellerman Suggested-by: Tyrel Datwyler Signed-off-by: Nathan Chancellor --- v1 -> v2: * Initialize rc in the case statements, rather th

[PATCH v2] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-03 Thread Nathan Chancellor
github.com/ClangBuiltLinux/linux/issues/502 Suggested-by: Michael Ellerman Signed-off-by: Nathan Chancellor --- v1 -> v2: * Initialize rc in the case statements, rather than at the top of the function, as suggested by Michael. drivers/scsi/ibmvscsi/ibmvscsi.c | 6 +++--- 1 file changed,

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

2019-06-03 Thread Nathan Chancellor
which will fix this warning. Link: https://github.com/ClangBuiltLinux/linux/issues/504 Fixes: 2fcf3ae508c2 ("hotplug/drc-info: Add code to search ibm,drc-info property") Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- v1 -> v2: * Eliminate fndit altogether by sh

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

2019-06-03 Thread Nathan Chancellor
Hi Nick, On Mon, Jun 03, 2019 at 02:07:50PM -0700, Nick Desaulniers wrote: > On Mon, Jun 3, 2019 at 10:44 AM Nathan Chancellor > wrote: > > Looking at the loop in a vacuum as clang would, fndit could be > > uninitialized if entries was ever zero or the if statement was >

[PATCH] net: mscc: ocelot: Fix some struct initializations

2019-06-03 Thread Nathan Chancellor
/20181128.215241.702406654469517539.da...@davemloft.net/ [3]: https://lore.kernel.org/lkml/20181116150432.2408a...@redhat.com/ Fixes: b596229448dd ("net: mscc: ocelot: Add support for tcam") Link: https://github.com/ClangBuiltLinux/linux/issues/505 Signed-off-by: Nathan Chancellor --- drivers/ne

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

2019-06-03 Thread Nathan Chancellor
ug/drc-info: Add code to search ibm,drc-info property") Signed-off-by: Nathan Chancellor --- drivers/pci/hotplug/rpaphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index bcd5d35

Re: [PATCH] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-02 Thread Nathan Chancellor
Hi Michael, On Sun, Jun 02, 2019 at 08:15:38PM +1000, Michael Ellerman wrote: > Hi Nathan, > > It's always preferable IMHO to keep any initialisation as localised as > possible, so that the compiler can continue to warn about uninitialised > usages elsewhere. In this case that would mean doing

Re: [PATCH] ARM: xor-neon: Replace __GNUC__ checks with CONFIG_CC_IS_GCC

2019-05-31 Thread Nathan Chancellor
On Fri, May 31, 2019 at 11:03:19PM +0200, Arnd Bergmann wrote: > On Fri, May 31, 2019 at 10:06 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Fri, May 31, 2019 at 12:21 PM Arnd Bergmann wrote: > > > clang, I would suggest dropping your patch then, and instead adding > > > > I

Re: [PATCH] ARM: xor-neon: Replace __GNUC__ checks with CONFIG_CC_IS_GCC

2019-05-31 Thread Nathan Chancellor
On Fri, May 31, 2019 at 01:06:13PM -0700, Nick Desaulniers wrote: > On Fri, May 31, 2019 at 12:21 PM Arnd Bergmann wrote: > > clang, I would suggest dropping your patch then, and instead adding > > I disagree. The minimum version of gcc required to build the kernel > is 4.6, so the comment

[PATCH] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-05-31 Thread Nathan Chancellor
inux/linux/issues/502 Signed-off-by: Nathan Chancellor --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 727c31dc11a0..6714d8043e62 100644 --- a/drivers/scsi/ibmvscsi/

Re: [PATCH] ARM: xor-neon: Replace __GNUC__ checks with CONFIG_CC_IS_GCC

2019-05-31 Thread Nathan Chancellor
On Fri, May 31, 2019 at 10:05:22AM +0200, Arnd Bergmann wrote: > If I remember correctly, we also had the same issue with older versions > of clang, possibly even newer ones. Shouldn't we check for a minimum > compiler version when building with clang to ensure that the code is > really

Re: [PATCH v3 1/2] dma-contiguous: Abstract dma_{alloc,free}_contiguous()

2019-05-29 Thread Nathan Chancellor
Hi Nicolin, On Thu, May 23, 2019 at 09:06:32PM -0700, Nicolin Chen wrote: > Both dma_alloc_from_contiguous() and dma_release_from_contiguous() > are very simply implemented, but requiring callers to pass certain > parameters like count and align, and taking a boolean parameter to > check

[PATCH] ARM: xor-neon: Replace __GNUC__ checks with CONFIG_CC_IS_GCC

2019-05-28 Thread Nathan Chancellor
.com/ [3]: https://github.com/llvm/llvm-project/blob/eafe8ef6f2b44ba/clang/include/clang/Driver/Options.td#L1729 [4]: https://llvm.org/docs/Vectorizers.html#usage Link: https://github.com/ClangBuiltLinux/linux/issues/496 Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- arch/

[PATCH] misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa

2019-05-24 Thread Nathan Chancellor
d-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- drivers/misc/sgi-xp/xpc_partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c index 3eba1c420cc0..782ce95d3

[PATCH] misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa

2019-05-23 Thread Nathan Chancellor
: 279290294662 ("[IA64-SGI] cleanup the way XPC locates the reserved page") Link: https://github.com/ClangBuiltLinux/linux/issues/466 Suggested-by: Stephen Hines Signed-off-by: Nathan Chancellor --- Thanks Steve for the suggestion, don't know why that never crossed my mind... I tried to foll

Re: [PATCH][next] scsi: hpsa: fix an uninitialized read and dereference of pointer dev

2019-05-23 Thread Nathan Chancellor
ialized to null. > > Addresses-Coverity: ("Uninitialized pointer read") > Fixes: 14991a5bade5 ("scsi: hpsa: correct device resets") > Signed-off-by: Colin Ian King Reviewed-by: Nathan Chancellor Clang similarly warns about this, hence my identical submission after th

[PATCH v2 5.2] rsi: Properly initialize data in rsi_sdio_ta_reset

2019-05-23 Thread Nathan Chancellor
by put_unaligned_le32. Use kzalloc to properly initialize data, which matches a couple of other places in this driver. Fixes: e5a1ecc97e5f ("rsi: add firmware loading for 9116 device") Link: https://github.com/ClangBuiltLinux/linux/issues/464 Signed-off-by: Nathan Chancellor --- v1 -> v2: * Use RSI_

Re: -Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-22 Thread Nathan Chancellor
On Thu, May 02, 2019 at 08:33:40PM -0700, Nathan Chancellor wrote: > Hi all, > > When building with -Wuninitialized, Clang warns: > > drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is > uninitialized when used within its own initialization [-Wuninitializ

Re: [PATCH] rsi: Properly initialize data in rsi_sdio_ta_reset

2019-05-22 Thread Nathan Chancellor
On Thu, May 02, 2019 at 08:17:18PM -0700, Nathan Chancellor wrote: > On Thu, May 02, 2019 at 11:18:01AM -0700, Nick Desaulniers wrote: > > On Thu, May 2, 2019 at 8:16 AM Nathan Chancellor > > wrote: > > > > > > When building with -Wuninitialized, Clang warns: >

Re: [PATCH] kbuild: Enable -Wsometimes-uninitialized

2019-05-22 Thread Nathan Chancellor
On Tue, Apr 30, 2019 at 11:46:44AM +0200, Arnd Bergmann wrote: > Ah, I thought they were all fixed, as I don't see any remaining warnings > in my tree. It seems that I never send this workaround for > DECLARE_WAIT_QUEUE_HEAD_ONSTACK: > > diff --git a/include/linux/wait.h b/include/linux/wait.h >

Re: [PATCH v2] kasan: Initialize tag to 0xff in __kasan_kmalloc

2019-05-22 Thread Nathan Chancellor
On Thu, May 02, 2019 at 06:40:52PM +0200, Andrey Konovalov wrote: > On Thu, May 2, 2019 at 6:31 PM Nathan Chancellor > wrote: > > > > When building with -Wuninitialized and CONFIG_KASAN_SW_TAGS unset, Clang > > warns: > > > > mm/kasan/common.c:484:40: warning:

[PATCH] scsi: hpsa: Avoid using dev uninitialized in hpsa_eh_device_reset_handler

2019-05-22 Thread Nathan Chancellor
in its declaration so that it can be safely checked within the return_reset_status block. Fixes: 14991a5bade5 ("scsi: hpsa: correct device resets") Link: https://github.com/ClangBuiltLinux/linux/issues/492 Signed-off-by: Nathan Chancellor --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1

[PATCH] regulator: max77650: Move max77651_SBB1_desc's declaration down

2019-05-22 Thread Nathan Chancellor
max77650_regulator_desc's definition so this warning does not happen. Fixes: 3df4235ac41c ("regulator: max77650: Convert MAX77651 SBB1 to pickable linear range") Link: https://github.com/ClangBuiltLinux/linux/issues/491 Signed-off-by: Nathan Chancellor --- drivers/regulator/max77650-regulator.c | 4 ++-- 1 fi

Re: [PATCH V5 4/4] spi: tegra114: add support for TX and RX trimmers

2019-05-22 Thread Nathan Chancellor
Hi Sowjanya, On Mon, May 13, 2019 at 10:03:55PM -0700, Sowjanya Komatineni wrote: > Tegra SPI master controller has programmable trimmers to adjust the > data with respect to the clock. > > These trimmers are programmed in TX_CLK_TAP_DELAY and RX_CLK_TAP_DELAY > fields of COMMAND2 register. > >

Re: [PATCH] staging: rtl8192u: Remove an unnecessary NULL check

2019-05-22 Thread Nathan Chancellor
On Wed, May 22, 2019 at 10:04:18AM +0300, Dan Carpenter wrote: > On Tue, May 21, 2019 at 10:42:21AM -0700, Nathan Chancellor wrote: > > Clang warns: > > > > drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:47: warning: > > address of array 'param->u.wpa

[PATCH] staging: rtl8192u: Remove an unnecessary NULL check

2019-05-21 Thread Nathan Chancellor
ve it so clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/487 Signed-off-by: Nathan Chancellor --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_sof

[tip:core/urgent] objtool: Allow AR to be overridden with HOSTAR

2019-05-17 Thread tip-bot for Nathan Chancellor
Commit-ID: 8ea58f1e8b11cca3087b294779bf5959bf89cc10 Gitweb: https://git.kernel.org/tip/8ea58f1e8b11cca3087b294779bf5959bf89cc10 Author: Nathan Chancellor AuthorDate: Thu, 16 May 2019 12:49:42 -0500 Committer: Ingo Molnar CommitDate: Fri, 17 May 2019 11:10:42 +0200 objtool: Allow AR

Re: [GIT PULL] KVM changes for 5.2 merge window

2019-05-17 Thread Nathan Chancellor
On Fri, May 17, 2019 at 05:59:36AM +0200, Paolo Bonzini wrote: > Linus, > > The following changes since commit 7a223e06b1a411cef6c4cd7a9b9a33c8d225b10e: > > KVM: x86: avoid misreporting level-triggered irqs as edge-triggered in > tracing (2019-04-16 15:38:08 +0200) > > are available in the

Re: [PATCH v2] lkdtm: support llvm-objcopy

2019-05-15 Thread Nathan Chancellor
; Link: https://sourceware.org/bugzilla/show_bug.cgi?id=24554 > Link: https://github.com/ClangBuiltLinux/linux/issues/448 > Reported-by: Nathan Chancellor Doesn't look like this got updated. I don't want to make you send a v3 just for that though since it's purely cosmetic and adding my tag belo

[PATCH] objtool: Allow AR to be overridden with HOSTAR

2019-05-14 Thread Nathan Chancellor
/out/tools/objtool/libsubcmd.a /bin/sh: 1: ar: not found ... Follow the logic of HOST{CC,LD} and allow the user to specify a different ar tool via HOSTAR (which is used elsewhere in other tools/ Makefiles). Link: https://github.com/ClangBuiltLinux/linux/issues/481 Signed-off-by: Nathan

Re: [PATCH] mfd: stmfx: Fix macro definition spelling

2019-05-14 Thread Nathan Chancellor
On Tue, May 14, 2019 at 07:54:04PM +0100, Lee Jones wrote: > On Tue, 14 May 2019, Nathan Chancellor wrote: > > > On Mon, May 13, 2019 at 08:30:59AM +0100, Lee Jones wrote: > > > On Fri, 10 May 2019, Nathan Chancellor wrote: > > > > > > > Clang war

undefined reference to `__aeabi_uldivmod' after 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")

2019-05-14 Thread Nathan Chancellor
Hi all, I checked the RDMA mailing list and trees and I haven't seen this reported/fixed yet (forgive me if it has) but when building for arm32 with multi_v7_defconfig and the following configs (distilled from allyesconfig): CONFIG_INFINIBAND=y CONFIG_INFINIBAND_ON_DEMAND_PAGING=y

Re: [PATCH] mfd: stmfx: Fix macro definition spelling

2019-05-14 Thread Nathan Chancellor
On Mon, May 13, 2019 at 08:30:59AM +0100, Lee Jones wrote: > On Fri, 10 May 2019, Nathan Chancellor wrote: > > > Clang warns: > > > > In file included from drivers/mfd/stmfx.c:13: > > include/linux/mfd/stmfx.h:7:9: warning: 'MFD_STMFX_H' is used as a > > he

Re: [PATCH] lkdtm: support llvm-objcopy

2019-05-13 Thread Nathan Chancellor
On Mon, May 13, 2019 at 04:38:54PM -0700, Jordan Rupprecht wrote: > Nathan: is your version of llvm-objcopy later than r359639 (April 30)? > > > From: Nathan Chancellor > Date: Mon, May 13, 2019 at 4:29 PM > To: Nick Desaulniers > Cc: , , > Nathan Chancellor, Jordan

Re: [PATCH] lkdtm: support llvm-objcopy

2019-05-13 Thread Nathan Chancellor
h shows in the Flags field that .text is now renamed .rodata, the > append flag A is set, and the section is not flagged as writeable W. > > Link: https://github.com/ClangBuiltLinux/linux/issues/448 > Reported-by: Nathan Chancellor This should be natechancel...@gmail.com (altho

Re: [PATCH] kbuild: terminate Kconfig when $(CC) or $(LD) is missing

2019-05-12 Thread Nathan Chancellor
On Thu, May 09, 2019 at 04:35:55PM +0900, Masahiro Yamada wrote: > If the compiler specified by $(CC) is not present, the Kconfig stage > sprinkles 'not found' messages, then succeeds. > > $ make CROSS_COMPILE=foo defconfig > /bin/sh: 1: foogcc: not found > /bin/sh: 1: foogcc: not found >

Re: [PATCH] kbuild: add script check for cross compilation utilities

2019-05-10 Thread Nathan Chancellor
makefile' failed > make: *** [outputmakefile] Error 1 > > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor > --- > Note: this is probably more generally useful, but after a few minutes > wrestling with Make errors related to "recipe commences before first > targe

[PATCH] mfd: stmfx: Fix macro definition spelling

2019-05-10 Thread Nathan Chancellor
ink: https://github.com/ClangBuiltLinux/linux/issues/475 Signed-off-by: Nathan Chancellor --- include/linux/mfd/stmfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mfd/stmfx.h b/include/linux/mfd/stmfx.h index d890595b89b6..3c67983678ec 100644 --- a/include

[PATCH] Makefile: Don't try to add '-fcatch-undefined-behavior' flag

2019-05-09 Thread Nathan Chancellor
This is no longer a valid option in clang, it was removed in 3.5, which we don't support. https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4 Signed-off-by: Nathan Chancellor --- Let me know if you want this incremental to your patch. I figured it made more

Re: [PATCH] kbuild: add most of Clang-specific flags unconditionally

2019-05-09 Thread Nathan Chancellor
On Thu, May 09, 2019 at 08:35:05PM +0900, Masahiro Yamada wrote: > Hi. > > On Thu, May 9, 2019 at 8:15 PM Nathan Chancellor > wrote: > > > > On Thu, May 09, 2019 at 03:44:55PM +0900, Masahiro Yamada wrote: > > > We do not support old Clang versions. Upgrad

Re: [PATCH] kbuild: add most of Clang-specific flags unconditionally

2019-05-09 Thread Nathan Chancellor
ident the kernel can't be reliably compiled with anything earlier than Clang 4 (Pixel 2 was shipped with it but had some hacks, this commit is from Clang 3.5): https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4 Otherwise: Reviewed-by: Nathan Chancellor >

Re: [PATCH] kbuild: add some extra warning flags unconditionally

2019-05-09 Thread Nathan Chancellor
On Thu, May 09, 2019 at 03:46:35PM +0900, Masahiro Yamada wrote: > These flags are documented in the GCC 4.6 manual, and recognized by > Clang as well. Let's rip off the cc-option / cc-disable-warning switches. > > Signed-off-by: Masahiro Yamada Reviewed-by: Natha

Re: [PATCH] kbuild: add -Wvla flag unconditionally

2019-05-09 Thread Nathan Chancellor
On Thu, May 09, 2019 at 03:45:49PM +0900, Masahiro Yamada wrote: > This flag is documented in the GCC 4.6 manual, and recognized by > Clang as well. Let's rip off the cc-option switch. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > Make

-Wuninitialized warning in drivers/misc/sgi-xp/xpc_partition.c

2019-05-02 Thread Nathan Chancellor
Hi all, When building with -Wuninitialized, Clang warns: drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is uninitialized when used within its own initialization [-Wuninitialized] void *buf = buf; ~~~ ^~~ 1 warning generated. I am not really sure how

[PATCH] staging: kpc2000: kpc_spi: Fix build error for {read,write}q

2019-05-02 Thread Nathan Chancellor
as commit 91b6cb7216cd ("staging: kpc2000: fix up build problems with readq()"). Signed-off-by: Nathan Chancellor --- drivers/staging/kpc2000/kpc_spi/spi_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c b/drivers/staging/kpc20

Re: linux-next: Tree for May 2

2019-05-02 Thread Nathan Chancellor
On Thu, May 02, 2019 at 09:00:58PM +0200, Anders Roxell wrote: > On Thu, 2 May 2019 at 12:10, Stephen Rothwell wrote: > > > > Hi all, > > > > Changes since 20190501: > > > > The kbuild tree gained a conflict against Linus' tree. > > > > The f2fs tree gained a build failure for which I applied a

[PATCH v2] kasan: Initialize tag to 0xff in __kasan_kmalloc

2019-05-02 Thread Nathan Chancellor
change the meaning of the code. Link: https://github.com/ClangBuiltLinux/linux/issues/465 Signed-off-by: Nathan Chancellor --- v1 -> v2: * Initialize tag to 0xff at Andrey's request mm/kasan/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/common.c b

[PATCH] kasan: Zero initialize tag in __kasan_kmalloc

2019-05-02 Thread Nathan Chancellor
and doesn't change the meaning of the code. Link: https://github.com/ClangBuiltLinux/linux/issues/465 Signed-off-by: Nathan Chancellor --- mm/kasan/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/common.c b/mm/kasan/common.c index 36afcf64e016..4c5af68f2a8b 100644

Re: [PATCH] kbuild: Enable -Wsometimes-uninitialized

2019-04-30 Thread Nathan Chancellor
On Tue, Apr 30, 2019 at 11:46:44AM +0200, Arnd Bergmann wrote: > On Tue, Apr 30, 2019 at 11:33 AM Nathan Chancellor > wrote: > > On Tue, Apr 30, 2019 at 09:16:50AM +0200, Arnd Bergmann wrote: > > > On Tue, Apr 30, 2019 at 3:01 AM Nathan Chancellor > > > wrote: &

Re: [PATCH] of: replace be32_to_cpu to be32_to_cpup

2019-04-30 Thread Nathan Chancellor
+ Nick and the list On Tue, Apr 30, 2019 at 04:00:44PM +0700, Phong Tran wrote: > The cell is a pointer to __be32. > with the be32_to_cpu a lot of clang warning show that: > > ./include/linux/of.h:238:37: warning: multiple unsequenced modifications > to 'cell' [-Wunsequenced] > r

Re: [PATCH] kbuild: Enable -Wsometimes-uninitialized

2019-04-30 Thread Nathan Chancellor
On Tue, Apr 30, 2019 at 09:16:50AM +0200, Arnd Bergmann wrote: > On Tue, Apr 30, 2019 at 3:01 AM Nathan Chancellor > wrote: > > > > This is Clang's version of GCC's -Wmaybe-uninitialized. Up to this > > point, it has not been used because -Wuninitialized has been disabl

[PATCH] kbuild: Enable -Wsometimes-uninitialized

2019-04-29 Thread Nathan Chancellor
quot; | wc -l 45 [1]: https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019...@lca.pw/ Link: https://github.com/ClangBuiltLinux/linux/issues/381 Signed-off-by: Nathan Chancellor --- Masahiro, I am not sure how you want to handle merging this with regards to all of the patches float

Re: [PATCH 4.14 09/69] x86: vdso: Use $LD instead of $CC to link

2019-04-26 Thread Nathan Chancellor
On Fri, Apr 26, 2019 at 01:23:17PM +, Rantala, Tommi T. (Nokia - FI/Espoo) wrote: > On Fri, 2019-04-26 at 05:48 -0700, Nathan Chancellor wrote: > > On Fri, Apr 26, 2019 at 11:41:30AM +, Rantala, Tommi T. (Nokia - > > FI/Espoo) wrote: > > > On Mon, 2019-04-15 at

Re: [PATCH] bcache: avoid clang -Wunintialized warning

2019-04-26 Thread Nathan Chancellor
On Fri, Apr 26, 2019 at 10:43:01AM +0800, Coly Li wrote: > On 2019/4/26 2:08 上午, Nathan Chancellor wrote: > > On Fri, Mar 22, 2019 at 03:35:00PM +0100, Arnd Bergmann wrote: > >> clang has identified a code path in which it thinks a > >> variable may be unused: > >

Re: [PATCH 09/10] arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS

2019-04-26 Thread Nathan Chancellor
On Fri, Apr 26, 2019 at 12:05:57PM +0200, Rasmus Villemoes wrote: > On 26/04/2019 11.39, Arnd Bergmann wrote: > > On Tue, Apr 9, 2019 at 11:26 PM Rasmus Villemoes > > wrote: > >> > >> Similar to GENERIC_BUG_RELATIVE_POINTERS, one can now relativize the > >> four const char* members of struct

Re: [PATCH 4.14 09/69] x86: vdso: Use $LD instead of $CC to link

2019-04-26 Thread Nathan Chancellor
ps references to DISABLE_LTO; this option doesn't seem to be > > set > > anywhere, and not knowing what its possible values are, it's not > > clear how > > to convert it from CC to LD flag. > > > > Signed-off-by: Alistair Strachan > > Signed-off-by: T

Re: -Wsometimes-uninitialized Clang warning in drivers/net/ethernet/broadcom/bnxt/bnxt.c

2019-04-25 Thread Nathan Chancellor
On Thu, Apr 25, 2019 at 11:33:04AM -0700, Michael Chan wrote: > On Thu, Apr 25, 2019 at 11:14 AM Nathan Chancellor > wrote: > > > > Hi Arnd, > > > > On Fri, Mar 22, 2019 at 03:32:50PM +0100, Arnd Bergmann wrote: > > > On Wed, Mar 20, 2019 at 9:41 PM 'Nick D

Re: -Wsometimes-uninitialized Clang warning in drivers/net/ethernet/broadcom/bnxt/bnxt.c

2019-04-25 Thread Nathan Chancellor
ks like Michael wrote and is still maintaining > > the driver. > > > > On Wed, Mar 20, 2019 at 12:08 PM Nathan Chancellor > > wrote: > > > > > > On Thu, Mar 07, 2019 at 05:57:35PM -0700, Nathan Chancellor wrote: > > > > Hi all, > > >

Re: [PATCH] bcache: avoid clang -Wunintialized warning

2019-04-25 Thread Nathan Chancellor
On Fri, Mar 22, 2019 at 03:35:00PM +0100, Arnd Bergmann wrote: > clang has identified a code path in which it thinks a > variable may be unused: > > drivers/md/bcache/alloc.c:333:4: error: variable 'bucket' is used > uninitialized whenever 'if' condition is false >

Re: [PATCH] thunderbolt: Make priority unsigned in struct tb_path

2019-04-24 Thread Nathan Chancellor
On Wed, Apr 24, 2019 at 11:49:37AM -0700, Nick Desaulniers wrote: > On Wed, Apr 24, 2019 at 11:34 AM Nathan Chancellor > wrote: > > > > Clang warns: > > > > drivers/thunderbolt/tunnel.c:504:17: warning: implicit truncation from > > 'int' to bit-field change

[PATCH] staging: kpc2000: Use memset to initialize resources

2019-04-24 Thread Nathan Chancellor
/lkml/022e41c0-8465-dc7a-a45c-64187ecd9...@amd.com/ [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.da...@davemloft.net/ Link: https://github.com/ClangBuiltLinux/linux/issues/455 Signed-off-by: Nathan Chancellor --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 12

[PATCH] thunderbolt: Make priority unsigned in struct tb_path

2019-04-24 Thread Nathan Chancellor
: path->priority = 5; Furthmore, that value is only assigned to an unsigned integer in tb_path_activate (the priority member in struct tb_regs_hop). Fixes: 44242d6c9703 ("thunderbolt: Add support for DMA tunnels") Link: https://github.com/ClangBuiltLinux/linux/issues/454 Signed-

Re: [PATCH 3.18 055/104] arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value

2019-04-24 Thread Nathan Chancellor
t;, > + __futex_atomic_op("and %w3, %w1, %w4", > ret, oldval, uaddr, tmp, ~oparg); > break; > case FUTEX_OP_XOR: > - __futex_atomic_op("eor %w0, %w1, %w4", > + __futex

Re: scripts/selinux build error in 4.14 after glibc update

2019-04-22 Thread Nathan Chancellor
On Mon, Apr 22, 2019 at 09:59:47PM -0400, Paul Moore wrote: > On Mon, Apr 22, 2019 at 5:00 PM Nathan Chancellor > wrote: > > Hi all, > > > > After a glibc update to 2.29, my 4.14 builds started failing like so: > > ... > > > HOSTCC scripts/selinux/gen

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