All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cgel.zte@gmail.com, daniel@thingy.jp
Cc: kbuild-all@lists.01.org, romain.perier@gmail.com,
	daniel.lezcano@linaro.org, tglx@linutronix.de,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] clocksource/drivers: remove unnecessary return in switch statement
Date: Tue, 26 Apr 2022 02:05:25 +0800	[thread overview]
Message-ID: <202204260158.ccGqDClt-lkp@intel.com> (raw)
In-Reply-To: <20220425084644.3495153-1-chi.minghao@zte.com.cn>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/timers/core]
[also build test WARNING on v5.18-rc4 next-20220422]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/cgel-zte-gmail-com/clocksource-drivers-remove-unnecessary-return-in-switch-statement/20220425-170540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ce8abf340e40e1126bfcb9e7679b3d6b524ae3e0
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220426/202204260158.ccGqDClt-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.3.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/intel-lab-lkp/linux/commit/f185e49aea517bee5dfb706df47fa5f70bfac370
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review cgel-zte-gmail-com/clocksource-drivers-remove-unnecessary-return-in-switch-statement/20220425-170540
        git checkout f185e49aea517bee5dfb706df47fa5f70bfac370
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/clocksource/

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

All warnings (new ones prefixed by >>):

   drivers/clocksource/timer-msc313e.c: In function 'msc313e_timer_init':
>> drivers/clocksource/timer-msc313e.c:230:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     230 |         int ret = 0;
         |             ^~~


vim +/ret +230 drivers/clocksource/timer-msc313e.c

5fc1f93f69989e Romain Perier 2021-12-17  227  
5fc1f93f69989e Romain Perier 2021-12-17  228  static int __init msc313e_timer_init(struct device_node *np)
5fc1f93f69989e Romain Perier 2021-12-17  229  {
5fc1f93f69989e Romain Perier 2021-12-17 @230  	int ret = 0;
5fc1f93f69989e Romain Perier 2021-12-17  231  	static int num_called;
5fc1f93f69989e Romain Perier 2021-12-17  232  
5fc1f93f69989e Romain Perier 2021-12-17  233  	switch (num_called) {
5fc1f93f69989e Romain Perier 2021-12-17  234  	case 0:
5fc1f93f69989e Romain Perier 2021-12-17  235  		ret = msc313e_clksrc_init(np);
5fc1f93f69989e Romain Perier 2021-12-17  236  		break;
5fc1f93f69989e Romain Perier 2021-12-17  237  
5fc1f93f69989e Romain Perier 2021-12-17  238  	default:
5fc1f93f69989e Romain Perier 2021-12-17  239  		ret = msc313e_clkevt_init(np);
5fc1f93f69989e Romain Perier 2021-12-17  240  		break;
5fc1f93f69989e Romain Perier 2021-12-17  241  	}
5fc1f93f69989e Romain Perier 2021-12-17  242  
5fc1f93f69989e Romain Perier 2021-12-17  243  	num_called++;
5fc1f93f69989e Romain Perier 2021-12-17  244  
5fc1f93f69989e Romain Perier 2021-12-17  245  	return 0;
5fc1f93f69989e Romain Perier 2021-12-17  246  }
5fc1f93f69989e Romain Perier 2021-12-17  247  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: cgel.zte@gmail.com, daniel@thingy.jp
Cc: kbuild-all@lists.01.org, romain.perier@gmail.com,
	daniel.lezcano@linaro.org, tglx@linutronix.de,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] clocksource/drivers: remove unnecessary return in switch statement
Date: Tue, 26 Apr 2022 02:05:25 +0800	[thread overview]
Message-ID: <202204260158.ccGqDClt-lkp@intel.com> (raw)
In-Reply-To: <20220425084644.3495153-1-chi.minghao@zte.com.cn>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/timers/core]
[also build test WARNING on v5.18-rc4 next-20220422]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/cgel-zte-gmail-com/clocksource-drivers-remove-unnecessary-return-in-switch-statement/20220425-170540
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ce8abf340e40e1126bfcb9e7679b3d6b524ae3e0
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220426/202204260158.ccGqDClt-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.3.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/intel-lab-lkp/linux/commit/f185e49aea517bee5dfb706df47fa5f70bfac370
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review cgel-zte-gmail-com/clocksource-drivers-remove-unnecessary-return-in-switch-statement/20220425-170540
        git checkout f185e49aea517bee5dfb706df47fa5f70bfac370
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/clocksource/

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

All warnings (new ones prefixed by >>):

   drivers/clocksource/timer-msc313e.c: In function 'msc313e_timer_init':
>> drivers/clocksource/timer-msc313e.c:230:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     230 |         int ret = 0;
         |             ^~~


vim +/ret +230 drivers/clocksource/timer-msc313e.c

5fc1f93f69989e Romain Perier 2021-12-17  227  
5fc1f93f69989e Romain Perier 2021-12-17  228  static int __init msc313e_timer_init(struct device_node *np)
5fc1f93f69989e Romain Perier 2021-12-17  229  {
5fc1f93f69989e Romain Perier 2021-12-17 @230  	int ret = 0;
5fc1f93f69989e Romain Perier 2021-12-17  231  	static int num_called;
5fc1f93f69989e Romain Perier 2021-12-17  232  
5fc1f93f69989e Romain Perier 2021-12-17  233  	switch (num_called) {
5fc1f93f69989e Romain Perier 2021-12-17  234  	case 0:
5fc1f93f69989e Romain Perier 2021-12-17  235  		ret = msc313e_clksrc_init(np);
5fc1f93f69989e Romain Perier 2021-12-17  236  		break;
5fc1f93f69989e Romain Perier 2021-12-17  237  
5fc1f93f69989e Romain Perier 2021-12-17  238  	default:
5fc1f93f69989e Romain Perier 2021-12-17  239  		ret = msc313e_clkevt_init(np);
5fc1f93f69989e Romain Perier 2021-12-17  240  		break;
5fc1f93f69989e Romain Perier 2021-12-17  241  	}
5fc1f93f69989e Romain Perier 2021-12-17  242  
5fc1f93f69989e Romain Perier 2021-12-17  243  	num_called++;
5fc1f93f69989e Romain Perier 2021-12-17  244  
5fc1f93f69989e Romain Perier 2021-12-17  245  	return 0;
5fc1f93f69989e Romain Perier 2021-12-17  246  }
5fc1f93f69989e Romain Perier 2021-12-17  247  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-04-25 18:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25  8:46 [PATCH] clocksource/drivers: remove unnecessary return in switch statement cgel.zte
2022-04-25  8:46 ` cgel.zte
2022-04-25 18:05 ` kernel test robot [this message]
2022-04-25 18:05   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-05-02  0:01 kernel test robot

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=202204260158.ccGqDClt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=daniel.lezcano@linaro.org \
    --cc=daniel@thingy.jp \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=romain.perier@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=zealci@zte.com.cn \
    /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: link
Be 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.