netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vanillan Wang <songjinjian@hotmail.com>,
	chandrashekar.devegowda@intel.com,
	chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com,
	m.chetan.kumar@linux.intel.com, ricardo.martinez@linux.intel.com,
	loic.poulain@linaro.org, ryazanov.s.a@gmail.com,
	johannes@sipsolutions.net, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Jinjian Song <jinjian.song@fibocom.com>
Subject: Re: [net-next v1] net: wwan: t7xx: Add debug port
Date: Mon, 17 Jun 2024 09:04:38 +0800	[thread overview]
Message-ID: <202406170854.MYWoYsla-lkp@intel.com> (raw)
In-Reply-To: <MEYP282MB269762C5070B97CD769C8CD5BBC22@MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM>

Hi Vanillan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Vanillan-Wang/net-wwan-t7xx-Add-debug-port/20240614-175858
base:   net-next/main
patch link:    https://lore.kernel.org/r/MEYP282MB269762C5070B97CD769C8CD5BBC22%40MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM
patch subject: [net-next v1] net: wwan: t7xx: Add debug port
config: x86_64-randconfig-161-20240617 (https://download.01.org/0day-ci/archive/20240617/202406170854.MYWoYsla-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0

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/202406170854.MYWoYsla-lkp@intel.com/

smatch warnings:
drivers/net/wwan/t7xx/t7xx_port_debug.c:153 port_char_write() warn: unsigned 'txq_mtu' is never less than zero.

vim +/txq_mtu +153 drivers/net/wwan/t7xx/t7xx_port_debug.c

   132	
   133	static ssize_t port_char_write(struct file *file, const char __user *buf,
   134				       size_t count, loff_t *ppos)
   135	{
   136		unsigned int header_len = sizeof(struct ccci_header);
   137		size_t  offset, txq_mtu, chunk_len = 0;
   138		struct t7xx_port *port;
   139		struct sk_buff *skb;
   140		bool blocking;
   141		int ret;
   142	
   143		port = file->private_data;
   144	
   145		blocking = !(file->f_flags & O_NONBLOCK);
   146		if (!blocking)
   147			return -EAGAIN;
   148	
   149		if (!port->chan_enable)
   150			return -EINVAL;
   151	
   152		txq_mtu = t7xx_get_port_mtu(port);
 > 153		if (txq_mtu < 0)
   154			return -EINVAL;
   155	
   156		for (offset = 0; offset < count; offset += chunk_len) {
   157			chunk_len = min(count - offset, txq_mtu - header_len);
   158	
   159			skb = __dev_alloc_skb(chunk_len + header_len, GFP_KERNEL);
   160			if (!skb)
   161				return -ENOMEM;
   162	
   163			ret = copy_from_user(skb_put(skb, chunk_len), buf + offset, chunk_len);
   164	
   165			if (ret) {
   166				dev_kfree_skb(skb);
   167				return -EFAULT;
   168			}
   169	
   170			ret = t7xx_port_send_skb(port, skb, 0, 0);
   171			if (ret) {
   172				if (ret == -EBUSY && !blocking)
   173					ret = -EAGAIN;
   174				dev_kfree_skb_any(skb);
   175				return ret;
   176			}
   177		}
   178	
   179		return count;
   180	}
   181	

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

      parent reply	other threads:[~2024-06-17  1:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14  9:49 [net-next v1] net: wwan: t7xx: Add debug port Vanillan Wang
2024-06-14 15:11 ` Jakub Kicinski
2024-06-19 10:08   ` Jinjian Song
2024-06-15  1:46 ` Sergey Ryazanov
2024-06-19 10:23   ` Jinjian Song
2024-06-19 19:43     ` Sergey Ryazanov
2024-06-17  1:04 ` kernel test robot [this message]

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=202406170854.MYWoYsla-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chiranjeevi.rapolu@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haijun.liu@mediatek.com \
    --cc=jinjian.song@fibocom.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=ricardo.martinez@linux.intel.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=songjinjian@hotmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).