From: Lee Jones <lee.jones@linaro.org> To: haver <haver@linux.vnet.ibm.com> Cc: arnd@arndb.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michael Jung <mijung@gmx.net>, Michael Ruettger <michael@ibmra.de>, Frank Haverkamp <haver@linux.ibm.com>, Joerg-Stephan Vogt <jsvogt@de.ibm.com> Subject: Re: [PATCH 16/20] misc: genwqe: card_base: Remove set but unused variable 'rc' Date: Tue, 30 Jun 2020 09:12:47 +0100 [thread overview] Message-ID: <20200630081247.GI1179328@dell> (raw) In-Reply-To: <770e66e5f2d7efcea61fc9d57e1053f0@linux.vnet.ibm.com> On Tue, 30 Jun 2020, haver wrote: > On 2020-06-30 09:42, Lee Jones wrote: > > On Tue, 30 Jun 2020, haver wrote: > > > > > On 2020-06-29 16:04, Lee Jones wrote: > > > > Variable 'rc' hasn't been checked since the driver's inception > > > > in 2013. If it hasn't caused any issues since then, it's unlikely > > > > to in the future. Let's take it out for now. > > > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > > > drivers/misc/genwqe/card_base.c: In function > > > > ‘genwqe_health_check_stop’: > > > > > > > > /home/lee/projects/linux/kernel/drivers/misc/genwqe/card_base.c:1046:6: > > > > warning: variable ‘rc’ set but not used > > > > [-Wunused-but-set-variable] > > > > 1046 | int rc; > > > > | ^~ > > > > > > > > Cc: Michael Jung <mijung@gmx.net> > > > > Cc: Michael Ruettger <michael@ibmra.de> > > > > Cc: Frank Haverkamp <haver@linux.ibm.com> > > > > Cc: Joerg-Stephan Vogt <jsvogt@de.ibm.com> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > > > --- > > > > drivers/misc/genwqe/card_base.c | 4 +--- > > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > > > > > diff --git a/drivers/misc/genwqe/card_base.c > > > > b/drivers/misc/genwqe/card_base.c > > > > index 1dc6c7c5cbce9..bceebf49de2d5 100644 > > > > --- a/drivers/misc/genwqe/card_base.c > > > > +++ b/drivers/misc/genwqe/card_base.c > > > > @@ -1043,12 +1043,10 @@ static int genwqe_health_thread_running(struct > > > > genwqe_dev *cd) > > > > > > > > static int genwqe_health_check_stop(struct genwqe_dev *cd) > > > > { > > > > - int rc; > > > > - > > > > if (!genwqe_health_thread_running(cd)) > > > > return -EIO; > > > > > > > > - rc = kthread_stop(cd->health_thread); > > > > + kthread_stop(cd->health_thread); > > > > cd->health_thread = NULL; > > > > return 0; > > > > } > > > > > > Good idea. Let's remove it Thanks for the contribution. > > > > No problem, and you are welcome. > > > > > Signed-off-by: Frank Haverkamp <haver@linux.ibm.com> > > > > Just as an aside, this should be Acked-by, unless you either > > contributed to the patch directly or are in the delivery path i.e. you > > plan to pick the patch and send it to, say Linus, via a pull-request. > > Right. Thanks for reminding me. Feel free to send it yourself. > When was the documentation checking introduced? At the time we > contributed the code there was no such checking. The checking scripts have been in place for many years, but it looks like doc checking became part of EXTRA_GCC_CHECKS builds in 2017: > commit 3a025e1d1c2ea42fa497c9c6b21c284e0f69e28b Author: Matthew Wilcox <willy@infradead.org> Date: Mon Nov 20 10:40:40 2017 -0800 Add optional check for bad kernel-doc comments Implement a '-none' output mode for kernel-doc which will only output warning messages, and suppresses the warning message about there being no kernel-doc in the file. If the build has requested additional warnings, automatically check all .c files. This patch does not check .h files. Enabling the warning by default would add about 1300 warnings, so it's default off for now. People who care can use this to check they didn't break the docs and maybe we'll get all the warnings fixed and be able to enable this check by default in the future. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 2e3a10e79ca9e..aceac0ba07451 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -108,6 +108,10 @@ ifneq ($(KBUILD_CHECKSRC),0) endif endif +ifneq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),) + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< ; +endif + # Do section mismatch analysis for each module/built-in.o ifdef CONFIG_DEBUG_SECTION_MISMATCH cmd_secanalysis = ; scripts/mod/modpost $@ @@ -289,6 +293,7 @@ define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ $(call cmd_and_fixdep,cc_o_c) \ $(cmd_modversions_c) \ + $(cmd_checkdoc) \ $(call echo-cmd,objtool) $(cmd_objtool) \ $(call echo-cmd,record_mcount) $(cmd_record_mcount) endef -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org> To: haver <haver@linux.vnet.ibm.com> Cc: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, arnd@arndb.de, gregkh@linuxfoundation.org, Frank Haverkamp <haver@linux.ibm.com>, Michael Jung <mijung@gmx.net>, linux-kernel@vger.kernel.org, Michael Ruettger <michael@ibmra.de>, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 16/20] misc: genwqe: card_base: Remove set but unused variable 'rc' Date: Tue, 30 Jun 2020 09:12:47 +0100 [thread overview] Message-ID: <20200630081247.GI1179328@dell> (raw) In-Reply-To: <770e66e5f2d7efcea61fc9d57e1053f0@linux.vnet.ibm.com> On Tue, 30 Jun 2020, haver wrote: > On 2020-06-30 09:42, Lee Jones wrote: > > On Tue, 30 Jun 2020, haver wrote: > > > > > On 2020-06-29 16:04, Lee Jones wrote: > > > > Variable 'rc' hasn't been checked since the driver's inception > > > > in 2013. If it hasn't caused any issues since then, it's unlikely > > > > to in the future. Let's take it out for now. > > > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > > > drivers/misc/genwqe/card_base.c: In function > > > > ‘genwqe_health_check_stop’: > > > > > > > > /home/lee/projects/linux/kernel/drivers/misc/genwqe/card_base.c:1046:6: > > > > warning: variable ‘rc’ set but not used > > > > [-Wunused-but-set-variable] > > > > 1046 | int rc; > > > > | ^~ > > > > > > > > Cc: Michael Jung <mijung@gmx.net> > > > > Cc: Michael Ruettger <michael@ibmra.de> > > > > Cc: Frank Haverkamp <haver@linux.ibm.com> > > > > Cc: Joerg-Stephan Vogt <jsvogt@de.ibm.com> > > > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > > > --- > > > > drivers/misc/genwqe/card_base.c | 4 +--- > > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > > > > > diff --git a/drivers/misc/genwqe/card_base.c > > > > b/drivers/misc/genwqe/card_base.c > > > > index 1dc6c7c5cbce9..bceebf49de2d5 100644 > > > > --- a/drivers/misc/genwqe/card_base.c > > > > +++ b/drivers/misc/genwqe/card_base.c > > > > @@ -1043,12 +1043,10 @@ static int genwqe_health_thread_running(struct > > > > genwqe_dev *cd) > > > > > > > > static int genwqe_health_check_stop(struct genwqe_dev *cd) > > > > { > > > > - int rc; > > > > - > > > > if (!genwqe_health_thread_running(cd)) > > > > return -EIO; > > > > > > > > - rc = kthread_stop(cd->health_thread); > > > > + kthread_stop(cd->health_thread); > > > > cd->health_thread = NULL; > > > > return 0; > > > > } > > > > > > Good idea. Let's remove it Thanks for the contribution. > > > > No problem, and you are welcome. > > > > > Signed-off-by: Frank Haverkamp <haver@linux.ibm.com> > > > > Just as an aside, this should be Acked-by, unless you either > > contributed to the patch directly or are in the delivery path i.e. you > > plan to pick the patch and send it to, say Linus, via a pull-request. > > Right. Thanks for reminding me. Feel free to send it yourself. > When was the documentation checking introduced? At the time we > contributed the code there was no such checking. The checking scripts have been in place for many years, but it looks like doc checking became part of EXTRA_GCC_CHECKS builds in 2017: > commit 3a025e1d1c2ea42fa497c9c6b21c284e0f69e28b Author: Matthew Wilcox <willy@infradead.org> Date: Mon Nov 20 10:40:40 2017 -0800 Add optional check for bad kernel-doc comments Implement a '-none' output mode for kernel-doc which will only output warning messages, and suppresses the warning message about there being no kernel-doc in the file. If the build has requested additional warnings, automatically check all .c files. This patch does not check .h files. Enabling the warning by default would add about 1300 warnings, so it's default off for now. People who care can use this to check they didn't break the docs and maybe we'll get all the warnings fixed and be able to enable this check by default in the future. Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 2e3a10e79ca9e..aceac0ba07451 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -108,6 +108,10 @@ ifneq ($(KBUILD_CHECKSRC),0) endif endif +ifneq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),) + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< ; +endif + # Do section mismatch analysis for each module/built-in.o ifdef CONFIG_DEBUG_SECTION_MISMATCH cmd_secanalysis = ; scripts/mod/modpost $@ @@ -289,6 +293,7 @@ define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ $(call cmd_and_fixdep,cc_o_c) \ $(cmd_modversions_c) \ + $(cmd_checkdoc) \ $(call echo-cmd,objtool) $(cmd_objtool) \ $(call echo-cmd,record_mcount) $(cmd_record_mcount) endef -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-30 8:12 UTC|newest] Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-29 14:04 [PATCH 00/20] Fix a bunch more W=1 warnings in Misc Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 01/20] misc: pti: Repair kerneldoc formatting issues Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 02/20] misc: pti: Remove unparsable empty line in function header Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 03/20] misc: habanalabs: firmware_if: Add missing 'fw_name' and 'dst' entries to " Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:57 ` Oded Gabbay 2020-06-29 14:57 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 04/20] misc: habanalabs: pci: Fix a variety of kerneldoc issues Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:58 ` Oded Gabbay 2020-06-29 14:58 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 05/20] misc: habanalabs: irq: Repair kerneldoc formatting issues Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:59 ` Oded Gabbay 2020-06-29 14:59 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 06/20] misc: habanalabs: goya: Omit pointless check ensuring addr is >=0 Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 15:00 ` Oded Gabbay 2020-06-29 15:00 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 07/20] misc: habanalabs: pci: Scrub documentation for non-present function argument Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 15:00 ` Oded Gabbay 2020-06-29 15:00 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 08/20] misc: habanalabs: goya: goya_coresight: Remove set but unused variable 'val' Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 15:01 ` Oded Gabbay 2020-06-29 15:01 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 09/20] misc: habanalabs: gaudi: Remove ill placed asterisk from kerneldoc header Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 15:01 ` Oded Gabbay 2020-06-29 15:01 ` Oded Gabbay 2020-06-29 14:04 ` [PATCH 10/20] misc: habanalabs: gaudi: gaudi_security: Repair incorrectly named function arg Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 15:02 ` Oded Gabbay 2020-06-29 15:02 ` Oded Gabbay 2020-06-29 16:23 ` [PATCH v2 " Lee Jones 2020-06-29 16:23 ` Lee Jones 2020-06-29 14:04 ` [PATCH 11/20] misc: enclosure: Fix some kerneldoc anomalies Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 12/20] misc: lattice-ecp3-config: Remove set but clearly unused variable 'ret' Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 13/20] misc: pch_phub: Provide descriptions for 'chip' argument Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 14/20] misc: pch_phub: Remove superfluous descriptions to non-existent args 'offset_address' Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 15/20] misc: enclosure: Update enclosure_remove_device() documentation to match reality Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-29 14:04 ` [PATCH 16/20] misc: genwqe: card_base: Remove set but unused variable 'rc' Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-30 7:17 ` haver 2020-06-30 7:17 ` haver 2020-06-30 7:42 ` Lee Jones 2020-06-30 7:42 ` Lee Jones 2020-06-30 8:03 ` haver 2020-06-30 8:03 ` haver 2020-06-30 8:12 ` Lee Jones [this message] 2020-06-30 8:12 ` Lee Jones 2020-06-29 14:04 ` [PATCH 17/20] misc: genwqe: card_base: Do not pass unused argument 'fatal_err' Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-30 7:35 ` haver 2020-06-30 7:35 ` haver 2020-06-30 9:10 ` Lee Jones 2020-06-30 9:10 ` Lee Jones 2020-06-30 9:54 ` haver 2020-06-30 9:54 ` haver 2020-06-30 14:00 ` Lee Jones 2020-06-30 14:00 ` Lee Jones 2020-06-29 14:04 ` [PATCH 18/20] misc: genwqe: card_base: Whole host of kerneldoc fixes Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-30 7:24 ` haver 2020-06-30 7:24 ` haver 2020-06-29 14:04 ` [PATCH 19/20] misc: genwqe: card_dev: " Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-30 7:25 ` haver 2020-06-30 7:25 ` haver 2020-06-29 14:04 ` [PATCH 20/20] misc: genwqe: card_utils: Whole a plethora of documentation issues Lee Jones 2020-06-29 14:04 ` Lee Jones 2020-06-30 7:26 ` haver 2020-06-30 7:26 ` haver
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200630081247.GI1179328@dell \ --to=lee.jones@linaro.org \ --cc=arnd@arndb.de \ --cc=gregkh@linuxfoundation.org \ --cc=haver@linux.ibm.com \ --cc=haver@linux.vnet.ibm.com \ --cc=jsvogt@de.ibm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michael@ibmra.de \ --cc=mijung@gmx.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.