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-next>] [day] [month] [year] [list]
Message-ID: <1305738728.1881.84.camel@anish-desktop>
Date:	Wed, 18 May 2011 22:42:08 +0530
From:	anish <anish198519851985@...il.com>
To:	greg@...ah.com, teddy.wang@...iconmotion.com.cn
Cc:	linux-kernel@...r.kernel.org, harryxiyou@...il.com
Subject: [patch 2/3] Staging: sm7xx: preferred form for passing a size to
 memory allocation routines

 The preferred form for passing a size of a struct is the following:
         p = kmalloc(sizeof(*p), ...);
 Please refer Documentation/Codingstyle chapter 14

 Signed-off-by: anish kumar <anish198519851985@...il.com>
 Acked-by: Harry Wei <harryxiyou@...il.com>

---
 drivers/staging/sm7xx/smtcfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c
index 1aca0cb..c41d2f7 100644
--- a/drivers/staging/sm7xx/smtcfb.c
+++ b/drivers/staging/sm7xx/smtcfb.c
@@ -714,7 +714,7 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *dev,
 {
 	struct smtcfb_info *sfb;
 
-	sfb = kzalloc(sizeof(struct smtcfb_info), GFP_KERNEL);
+	sfb = kzalloc(sizeof(*sfb), GFP_KERNEL);
 
 	if (!sfb)
 		return NULL;
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ