All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: kbuild test robot <lkp@intel.com>,
	Alexander Loktionov <Alexander.Loktionov@aquantia.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
	David VomLehn <vomlehn@texas.net>,
	"David S . Miller" <davem@davemloft.net>,
	Simon Edelhaus <Simon.Edelhaus@aquantia.com>,
	Dmitrii Tarakanov <Dmitrii.Tarakanov@aquantia.com>,
	Pavel Belous <Pavel.Belous@aquantia.com>,
	Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com>
Subject: Re: [PATCH] net: ethernet: aquantia: fix alloc_cast.cocci warnings
Date: Fri, 20 Jan 2017 00:19:57 -0800	[thread overview]
Message-ID: <1484900397.12563.1.camel@perches.com> (raw)
In-Reply-To: <20170119090931.GA28354@lkp-ne04.lkp.intel.com>

On Thu, 2017-01-19 at 17:09 +0800, kbuild test robot wrote:
> drivers/net/ethernet/aquantia/atlantic/aq_ring.c:24:20-41: WARNING: casting value returned by memory allocation function to (struct aq_ring_buff_s *) is useless.
> 
>  Remove casting the values returned by memory allocation functions
>  like kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc.
[]
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
> @@ -21,7 +21,7 @@ static struct aq_ring_s *aq_ring_alloc(s
>  {
>  	int err = 0;
>  
> -	self->buff_ring = (struct aq_ring_buff_s *)
> +	self->buff_ring =
>  		kzalloc(sizeof(struct aq_ring_buff_s) * self->size, GFP_KERNEL);

This should likely be kcalloc 

  reply	other threads:[~2017-01-20  8:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19  1:07 [PATCH v6 00/13] net: ethernet: aquantia: Add AQtion 2.5/5 GB NIC driver Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 01/13] net: ethernet: aquantia: Make and configuration files Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 02/13] net: ethernet: aquantia: Common functions and definitions Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 03/13] net: ethernet: aquantia: Add ring support code Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 04/13] net: ethernet: aquantia: Low-level hardware interfaces Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 05/13] net: ethernet: aquantia: Support for NIC-specific code Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 06/13] net: ethernet: aquantia: Atlantic A0 and B0 specific functions Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 07/13] net: ethernet: aquantia: Vector operations Alexander Loktionov
2017-01-19  1:07 ` [PATCH v6 08/13] net: ethernet: aquantia: PCI operations Alexander Loktionov
2017-01-19  1:08 ` [PATCH v6 09/13] net: ethernet: aquantia: Atlantic hardware abstraction layer Alexander Loktionov
2017-01-19  1:08 ` [PATCH v6 10/13] net: ethernet: aquantia: Hardware interface and utility functions Alexander Loktionov
2017-01-19  1:08 ` [PATCH v6 11/13] net: ethernet: aquantia: Ethtool support Alexander Loktionov
2017-01-19  1:08 ` [PATCH v6 12/13] net: ethernet: aquantia: Receive side scaling Alexander Loktionov
2017-01-19  1:08 ` [PATCH v6 13/13] net: ethernet: aquantia: Integrate AQtion 2.5/5 GB NIC driver Alexander Loktionov
2017-01-19  9:09   ` [PATCH] net: ethernet: aquantia: fix alloc_cast.cocci warnings kbuild test robot
2017-01-20  8:19     ` Joe Perches [this message]
2017-01-19  9:09   ` [PATCH v6 13/13] net: ethernet: aquantia: Integrate AQtion 2.5/5 GB NIC driver kbuild test robot
2017-01-20 13:49   ` kbuild test robot
2017-01-19 16:55 ` [PATCH v6 00/13] net: ethernet: aquantia: Add " David Miller

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=1484900397.12563.1.camel@perches.com \
    --to=joe@perches.com \
    --cc=Alexander.Loktionov@aquantia.com \
    --cc=Dmitrii.Tarakanov@aquantia.com \
    --cc=Dmitry.Bezrukov@aquantia.com \
    --cc=Pavel.Belous@aquantia.com \
    --cc=Simon.Edelhaus@aquantia.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@01.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=vomlehn@texas.net \
    /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.