From: kernel test robot <lkp@intel.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Fri, 1 Nov 2024 00:05:18 +0800 [thread overview]
Message-ID: <202411010018.QmnmbvuM-lkp@intel.com> (raw)
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
reply other threads:[~2024-10-31 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202411010018.QmnmbvuM-lkp@intel.com \
--to=lkp@intel.com \
--cc=frank-w@public-files.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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.