All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] arm: dma fix returnvar.cocci warnings
@ 2021-08-20  2:15 jing yangyang
  2021-08-20  8:39 ` Russell King - ARM Linux admin
  2021-08-22  2:59 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: jing yangyang @ 2021-08-20  2:15 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russell King, linux-omap, linux-kernel, jing yangyang, Zeal Robot

Remove unneeded variables when "0" can be returned.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 arch/arm/mach-omap2/dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index dfc9b21..ba4a48e 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -79,7 +79,6 @@
 
 static unsigned configure_dma_errata(void)
 {
-	unsigned errata = 0;
 
 	/*
 	 * Errata applicable for OMAP2430ES1.0 and all omap2420
@@ -158,7 +157,7 @@ static unsigned configure_dma_errata(void)
 	if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
 		SET_DMA_ERRATA(DMA_ROMCODE_BUG);
 
-	return errata;
+	return 0;
 }
 
 static const struct dma_slave_map omap24xx_sdma_dt_map[] = {
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] arm: dma fix returnvar.cocci warnings
  2021-08-20  2:15 [PATCH linux-next] arm: dma fix returnvar.cocci warnings jing yangyang
@ 2021-08-20  8:39 ` Russell King - ARM Linux admin
  2021-08-22  2:59 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux admin @ 2021-08-20  8:39 UTC (permalink / raw)
  To: jing yangyang
  Cc: Tony Lindgren, linux-omap, linux-kernel, jing yangyang, Zeal Robot

On Thu, Aug 19, 2021 at 07:15:18PM -0700, jing yangyang wrote:
> Remove unneeded variables when "0" can be returned.
> 
> Generated by: scripts/coccinelle/misc/returnvar.cocci
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>

NAK.  This is not the first time this _untested_ and _incorrect_
patch has been submitted.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] arm: dma fix returnvar.cocci warnings
  2021-08-20  2:15 [PATCH linux-next] arm: dma fix returnvar.cocci warnings jing yangyang
  2021-08-20  8:39 ` Russell King - ARM Linux admin
@ 2021-08-22  2:59 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-08-22  2:59 UTC (permalink / raw)
  To: jing yangyang, Tony Lindgren
  Cc: kbuild-all, Russell King, linux-omap, linux-kernel,
	jing yangyang, Zeal Robot

[-- Attachment #1: Type: text/plain, Size: 2685 bytes --]

Hi jing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20210819]

url:    https://github.com/0day-ci/linux/commits/jing-yangyang/arm-dma-fix-returnvar-cocci-warnings/20210820-101604
base:    33e65b1f975cd2814fc0ea9617250fc4c1d7a553
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/a5037ed7d3a617c82c996788afb1a703170eb192
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review jing-yangyang/arm-dma-fix-returnvar-cocci-warnings/20210820-101604
        git checkout a5037ed7d3a617c82c996788afb1a703170eb192
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm/mach-omap2/dma.c:30:
   arch/arm/mach-omap2/dma.c: In function 'configure_dma_errata':
>> include/linux/omap-dma.h:105:42: error: 'errata' undeclared (first use in this function)
     105 | #define SET_DMA_ERRATA(id)              (errata |= (id))
         |                                          ^~~~~~
   arch/arm/mach-omap2/dma.c:112:17: note: in expansion of macro 'SET_DMA_ERRATA'
     112 |                 SET_DMA_ERRATA(DMA_ERRATA_IFRAME_BUFFERING);
         |                 ^~~~~~~~~~~~~~
   include/linux/omap-dma.h:105:42: note: each undeclared identifier is reported only once for each function it appears in
     105 | #define SET_DMA_ERRATA(id)              (errata |= (id))
         |                                          ^~~~~~
   arch/arm/mach-omap2/dma.c:112:17: note: in expansion of macro 'SET_DMA_ERRATA'
     112 |                 SET_DMA_ERRATA(DMA_ERRATA_IFRAME_BUFFERING);
         |                 ^~~~~~~~~~~~~~


vim +/errata +105 include/linux/omap-dma.h

45c3eb7d3a07eb Tony Lindgren 2012-11-30  102  
45c3eb7d3a07eb Tony Lindgren 2012-11-30  103  /* Errata handling */
45c3eb7d3a07eb Tony Lindgren 2012-11-30  104  #define IS_DMA_ERRATA(id)		(errata & (id))
45c3eb7d3a07eb Tony Lindgren 2012-11-30 @105  #define SET_DMA_ERRATA(id)		(errata |= (id))
45c3eb7d3a07eb Tony Lindgren 2012-11-30  106  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54526 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-22  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  2:15 [PATCH linux-next] arm: dma fix returnvar.cocci warnings jing yangyang
2021-08-20  8:39 ` Russell King - ARM Linux admin
2021-08-22  2:59 ` kernel test robot

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.