public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Bhaskar Upadhaya <bupadhaya@marvell.com>,
	netdev@vger.kernel.org, kuba@kernel.org, aelior@marvell.com,
	irusskikh@marvell.com
Cc: lkp@intel.com, kbuild-all@lists.01.org, davem@davemloft.net,
	bupadhaya@marvell.com
Subject: [kbuild] Re: [PATCH v2 net-next 2/3] qede: add per queue coalesce support for qede driver
Date: Wed, 10 Feb 2021 11:57:35 +0300	[thread overview]
Message-ID: <20210210085734.GS20820@kadam> (raw)
In-Reply-To: <1612906019-31724-3-git-send-email-bupadhaya@marvell.com>

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

Hi Bhaskar,

url:    https://github.com/0day-ci/linux/commits/Bhaskar-Upadhaya/qede-add-netpoll-and-per-queue-coalesce-support/20210210-080747 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git  6626a0266566c5aea16178c5e6cd7fc4db3f2f56
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

New smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2188 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'

Old smatch warnings:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:2193 qede_get_per_coalesce() warn: assigning (-22) to unsigned variable 'rc'

vim +/rc +2188 drivers/net/ethernet/qlogic/qede/qede_ethtool.c

75a56157c75052 Bhaskar Upadhaya 2021-02-09  2171  static int qede_get_per_coalesce(struct net_device *dev,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2172  				 u32 queue,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2173  				 struct ethtool_coalesce *coal)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2174  {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2175  	void *rx_handle = NULL, *tx_handle = NULL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2176  	struct qede_dev *edev = netdev_priv(dev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2177  	u16 rx_coal, tx_coal, rc = 0;

"rc" needs to be int.

75a56157c75052 Bhaskar Upadhaya 2021-02-09  2178  	struct qede_fastpath *fp;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2179  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2180  	rx_coal = QED_DEFAULT_RX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2181  	tx_coal = QED_DEFAULT_TX_USECS;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2182  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2183  	memset(coal, 0, sizeof(struct ethtool_coalesce));
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2184  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2185  	__qede_lock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2186  	if (queue >= edev->num_queues) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2187  		DP_INFO(edev, "Invalid queue\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09 @2188  		rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2189  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2190  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2191  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2192  	if (edev->state != QEDE_STATE_OPEN) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2193  		rc = -EINVAL;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2194  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2195  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2196  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2197  	fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2198  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2199  	if (fp->type & QEDE_FASTPATH_RX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2200  		rx_handle = fp->rxq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2201  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2202  	rc = edev->ops->get_coalesce(edev->cdev, &rx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2203  				     rx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2204  	if (rc) {
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2205  		DP_INFO(edev, "Read Rx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2206  		goto out;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2207  	}
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2208  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2209  	fp = &edev->fp_array[queue];
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2210  	if (fp->type & QEDE_FASTPATH_TX)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2211  		tx_handle = fp->txq->handle;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2212  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2213  	rc = edev->ops->get_coalesce(edev->cdev, &tx_coal,
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2214  				      tx_handle);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2215  	if (rc)
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2216  		DP_INFO(edev, "Read Tx coalesce error\n");
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2217  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2218  out:
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2219  	__qede_unlock(edev);
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2220  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2221  	coal->rx_coalesce_usecs = rx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2222  	coal->tx_coalesce_usecs = tx_coal;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2223  
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2224  	return rc;
75a56157c75052 Bhaskar Upadhaya 2021-02-09  2225  }

---
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: 37136 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

  reply	other threads:[~2021-02-10  9:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 21:26 [PATCH v2 net-next 0/3] qede: add netpoll and per-queue coalesce support Bhaskar Upadhaya
2021-02-09 21:26 ` [PATCH v2 net-next 1/3] qede: add netpoll support for qede driver Bhaskar Upadhaya
2021-02-09 21:26 ` [PATCH v2 net-next 2/3] qede: add per queue coalesce " Bhaskar Upadhaya
2021-02-10  8:57   ` Dan Carpenter [this message]
2021-02-09 21:26 ` [PATCH v2 net-next 3/3] qede: preserve per queue stats across up/down of interface Bhaskar Upadhaya

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=20210210085734.GS20820@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=aelior@marvell.com \
    --cc=bupadhaya@marvell.com \
    --cc=davem@davemloft.net \
    --cc=irusskikh@marvell.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    /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