From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, deepakx.nagaraju@intel.com,
joyce.ooi@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, Nagaraju DeepakX <deepakx.nagaraju@intel.com>,
Andy Schevchenko <andriy.schevchenko@linux.intel.com>
Subject: Re: [PATCH 5/5] net: ethernet: altera: rename functions and their prototypes
Date: Wed, 3 Jan 2024 14:23:18 +0300 [thread overview]
Message-ID: <ca5c5be7-9270-412b-a868-d5e28116f983@moroto.mountain> (raw)
In-Reply-To: <20231213071112.18242-6-deepakx.nagaraju@intel.com>
Hi,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/deepakx-nagaraju-intel-com/net-ethernet-altera-remove-unneeded-assignments/20231213-151600
base: net/main
patch link: https://lore.kernel.org/r/20231213071112.18242-6-deepakx.nagaraju%40intel.com
patch subject: [PATCH 5/5] net: ethernet: altera: rename functions and their prototypes
config: m68k-randconfig-r081-20231218 (https://download.01.org/0day-ci/archive/20231220/202312200739.79WGCuyb-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202312200739.79WGCuyb-lkp@intel.com/
New smatch warnings:
drivers/net/ethernet/altera/altera_tse_main.c:266 alloc_init_skbufs() warn: double check that we're allocating correct size: 24 vs 164
Old smatch warnings:
drivers/net/ethernet/altera/altera_tse_main.c:271 alloc_init_skbufs() warn: double check that we're allocating correct size: 24 vs 164
drivers/net/ethernet/altera/altera_tse_main.c:988 tse_open() warn: 'priv->tx_irq' from request_irq() not released on lines: 988.
vim +266 drivers/net/ethernet/altera/altera_tse_main.c
bbd2190ce96d8f Vince Bridgers 2014-03-17 257 static int alloc_init_skbufs(struct altera_tse_private *priv)
bbd2190ce96d8f Vince Bridgers 2014-03-17 258 {
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 259 struct altera_dma_private *dma = &priv->dma_priv;
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 260 unsigned int rx_descs = dma->rx_ring_size;
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 261 unsigned int tx_descs = dma->tx_ring_size;
bbd2190ce96d8f Vince Bridgers 2014-03-17 262 int ret = -ENOMEM;
bbd2190ce96d8f Vince Bridgers 2014-03-17 263 int i;
bbd2190ce96d8f Vince Bridgers 2014-03-17 264
bbd2190ce96d8f Vince Bridgers 2014-03-17 265 /* Create Rx ring buffer */
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 @266 dma->rx_ring = kcalloc(rx_descs, sizeof(struct altera_dma_private), GFP_KERNEL);
There is a mismatch here. dma->rx_ring was changed to altera_dma_buffer
but the sizeof was changed to altera_dma_private.
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 267 if (!dma->rx_ring)
bbd2190ce96d8f Vince Bridgers 2014-03-17 268 goto err_rx_ring;
bbd2190ce96d8f Vince Bridgers 2014-03-17 269
bbd2190ce96d8f Vince Bridgers 2014-03-17 270 /* Create Tx ring buffer */
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 271 dma->tx_ring = kcalloc(tx_descs, sizeof(struct altera_dma_private), GFP_KERNEL);
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 272 if (!dma->tx_ring)
bbd2190ce96d8f Vince Bridgers 2014-03-17 273 goto err_tx_ring;
bbd2190ce96d8f Vince Bridgers 2014-03-17 274
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 275 dma->tx_cons = 0;
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 276 dma->tx_prod = 0;
bbd2190ce96d8f Vince Bridgers 2014-03-17 277
bbd2190ce96d8f Vince Bridgers 2014-03-17 278 /* Init Rx ring */
bbd2190ce96d8f Vince Bridgers 2014-03-17 279 for (i = 0; i < rx_descs; i++) {
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 280 ret = tse_init_rx_buffer(priv, &priv->dma_priv.rx_ring[i], dma->rx_dma_buf_sz);
bbd2190ce96d8f Vince Bridgers 2014-03-17 281 if (ret)
bbd2190ce96d8f Vince Bridgers 2014-03-17 282 goto err_init_rx_buffers;
bbd2190ce96d8f Vince Bridgers 2014-03-17 283 }
bbd2190ce96d8f Vince Bridgers 2014-03-17 284
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 285 dma->rx_cons = 0;
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 286 dma->rx_prod = 0;
bbd2190ce96d8f Vince Bridgers 2014-03-17 287
bbd2190ce96d8f Vince Bridgers 2014-03-17 288 return 0;
bbd2190ce96d8f Vince Bridgers 2014-03-17 289 err_init_rx_buffers:
bbd2190ce96d8f Vince Bridgers 2014-03-17 290 while (--i >= 0)
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 291 tse_free_rx_buffer(priv, &priv->dma_priv.rx_ring[i]);
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 292 kfree(dma->tx_ring);
bbd2190ce96d8f Vince Bridgers 2014-03-17 293 err_tx_ring:
ad6f888f174e6a Nagaraju DeepakX 2023-12-13 294 kfree(dma->rx_ring);
bbd2190ce96d8f Vince Bridgers 2014-03-17 295 err_rx_ring:
bbd2190ce96d8f Vince Bridgers 2014-03-17 296 return ret;
bbd2190ce96d8f Vince Bridgers 2014-03-17 297 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-01-03 11:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 7:11 [PATCH 0/5] Rename functions and their prototypes and move to common files deepakx.nagaraju
2023-12-13 7:11 ` [PATCH 1/5] net: ethernet: altera: remove unneeded assignments deepakx.nagaraju
2023-12-16 20:03 ` Simon Horman
2023-12-13 7:11 ` [PATCH 2/5] net: ethernet: altera: fix indentation warnings deepakx.nagaraju
2023-12-13 7:11 ` [PATCH 3/5] net: ethernet: altera: move read write functions deepakx.nagaraju
2023-12-16 20:03 ` Simon Horman
2023-12-13 7:11 ` [PATCH 4/5] net: ethernet: altera: sorting headers in alphabetical order deepakx.nagaraju
2023-12-14 19:06 ` Jakub Kicinski
2023-12-13 7:11 ` [PATCH 5/5] net: ethernet: altera: rename functions and their prototypes deepakx.nagaraju
2023-12-21 13:40 ` [PATCH v2 0/4] Rename functions and their prototypes and move to common files deepakx.nagaraju
2023-12-21 13:40 ` [PATCH v2 1/4] net: ethernet: altera: remove unneeded assignments deepakx.nagaraju
2023-12-21 13:40 ` [PATCH v2 2/4] net: ethernet: altera: fix indentation warnings deepakx.nagaraju
2023-12-23 14:57 ` Simon Horman
2023-12-21 13:40 ` [PATCH v2 3/4] net: ethernet: altera: move read write functions deepakx.nagaraju
2023-12-21 13:40 ` [PATCH v2 4/4] net: ethernet: altera: rename functions and their prototypes deepakx.nagaraju
2023-12-23 14:54 ` Simon Horman
2023-12-23 15:06 ` Simon Horman
2024-01-03 11:23 ` Dan Carpenter [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=ca5c5be7-9270-412b-a868-d5e28116f983@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=andriy.schevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=deepakx.nagaraju@intel.com \
--cc=edumazet@google.com \
--cc=joyce.ooi@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®