lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Jan 2017 17:09:31 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Alexander Loktionov <Alexander.Loktionov@...antia.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        David VomLehn <vomlehn@...as.net>,
        "David S . Miller" <davem@...emloft.net>,
        Simon Edelhaus <Simon.Edelhaus@...antia.com>,
        Alexander Loktionov <Alexander.Loktionov@...antia.com>,
        Dmitrii Tarakanov <Dmitrii.Tarakanov@...antia.com>,
        Pavel Belous <Pavel.Belous@...antia.com>,
        Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>
Subject: [PATCH] net: ethernet: aquantia: fix alloc_cast.cocci warnings

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.

Semantic patch information:
 This makes an effort to find cases of casting of values returned by
 kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc,
 kmem_cache_alloc_node, kmalloc_node and kzalloc_node and removes
 the casting as it is not required. The result in the patch case may
need some reformatting.

Generated by: scripts/coccinelle/api/alloc/alloc_cast.cocci

CC: David VomLehn <vomlehn@...as.net>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 aq_ring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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);
 
 	if (!self->buff_ring) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ