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]
Message-ID: <534AE1D9.1000005@orange.fr>
Date:	Sun, 13 Apr 2014 21:13:29 +0200
From:	Pascal COMBES <pascom@...nge.fr>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	devel@...verdev.osuosl.org,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
	Jarod Wilson <jarod@...sonet.com>,
	Jingoo Han <jg1.han@...sung.com>,
	Valentina Manea <valentina.manea.m@...il.com>,
	linux-kernel@...r.kernel.org, Naren Sankar <nsankar@...adcom.com>,
	Monam Agarwal <monamagarwal123@...il.com>,
	Scott Davilla <davilla@....com>,
	Amarjargal Gundjalam <amarjargal16@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Robert Foss <dev@...ertfoss.se>
Subject: [PATCH v2 3/3] Fix coding style problem (sizeof with type) in drivers/staging/crystalhd/crystalhd_lnx.c

From: Pascal COMBES <pascom@...nge.fr>

Replace sizeof(type) by sizeof(variable) in
drivers/staging/crystalhd/crystalhd_lnx.c.

Signed-off-by: Pascal COMBES <pascom@...nge.fr>
---
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c
b/drivers/staging/crystalhd/crystalhd_lnx.c
index 15e8f02..7b14b28 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -399,8 +399,7 @@ static int chd_dec_init_chdev(struct crystalhd_adp *adp)

 	/* Allocate general purpose ioctl pool. */
 	for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
-		temp = kzalloc(sizeof(struct crystalhd_ioctl_data),
-			       GFP_KERNEL);
+		temp = kzalloc(sizeof(*temp), GFP_KERNEL);
 		if (!temp) {
 			BCMLOG_ERR("ioctl data pool kzalloc failed\n");
 			rc = -ENOMEM;
@@ -555,7 +554,7 @@ static int chd_dec_pci_probe(struct pci_dev *pdev,
 	       pdev->vendor, pdev->device, pdev->subsystem_vendor,
 	       pdev->subsystem_device);

-	pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
+	pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
 	if (!pinfo) {
 		BCMLOG_ERR("Failed to allocate memory\n");
 		return -ENOMEM;

--
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