All of lore.kernel.org
 help / color / mirror / Atom feed
* [frank-w-bpi-r2-4.14:6.12-rsslro 71/71] drivers/net/ethernet/mediatek/mtk_eth_dbg.c:66:13: warning: variable 'ret' set but not used
@ 2024-10-31 16:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-31 16:05 UTC (permalink / raw)
  To: Frank Wunderlich; +Cc: oe-kbuild-all

tree:   https://github.com/frank-w/BPI-R2-4.14 6.12-rsslro
head:   ee43e37385973e1a8f997188dff7a58321371b92
commit: ee43e37385973e1a8f997188dff7a58321371b92 [71/71] debug: try to add mtk debugfs for RSS
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20241101/202411010018.QmnmbvuM-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241101/202411010018.QmnmbvuM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411010018.QmnmbvuM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/mediatek/mtk_eth_dbg.c: In function 'rss_ctrl_write':
>> drivers/net/ethernet/mediatek/mtk_eth_dbg.c:66:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      66 |         int ret;
         |             ^~~


vim +/ret +66 drivers/net/ethernet/mediatek/mtk_eth_dbg.c

    56	
    57	static ssize_t rss_ctrl_write(struct file *file, const char __user *buffer,
    58			       size_t count, loff_t *data)
    59	{
    60		char buf[32];
    61		char *p_buf;
    62		char *p_token = NULL;
    63		char *p_delimiter = " \t";
    64		long num = 4;
    65		u32 len = count;
  > 66		int ret;
    67		if (len >= sizeof(buf)) {
    68			pr_info("Input handling fail!\n");
    69			return -1;
    70		}
    71		if (copy_from_user(buf, buffer, len))
    72			return -EFAULT;
    73		buf[len] = '\0';
    74		p_buf = buf;
    75		p_token = strsep(&p_buf, p_delimiter);
    76		if (!p_token)
    77			num = 4;
    78		else
    79			ret = kstrtol(p_token, 10, &num);
    80		if (!mtk_rss_set_indr_tbl(g_eth, num))
    81			cur_rss_num = num;
    82		return count;
    83	}
    84	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-31 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 16:05 [frank-w-bpi-r2-4.14:6.12-rsslro 71/71] drivers/net/ethernet/mediatek/mtk_eth_dbg.c:66:13: warning: variable 'ret' set but not used 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.