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: <db7a5f16-21d4-59da-ae8c-31bdeafe63a2@users.sourceforge.net>
Date:   Thu, 11 May 2017 15:46:07 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-c6x-dev@...ux-c6x.org, Aurelien Jacquiot <a-jacquiot@...com>,
        Mark Salter <msalter@...hat.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/4] C6X/megamode-pic: Improve a size determination in
 init_megamod_pic()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 11 May 2017 14:56:57 +0200

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/c6x/platforms/megamod-pic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c
index 43afc03e4125..72b5f143c105 100644
--- a/arch/c6x/platforms/megamod-pic.c
+++ b/arch/c6x/platforms/megamod-pic.c
@@ -205,6 +205,5 @@ static struct megamod_pic * __init init_megamod_pic(struct device_node *np)
 	int mapping[NR_MUX_OUTPUTS];
 
 	pr_info("Initializing C64x+ Megamodule PIC\n");
-
-	pic = kzalloc(sizeof(struct megamod_pic), GFP_KERNEL);
+	pic = kzalloc(sizeof(*pic), GFP_KERNEL);
 	if (!pic) {
-- 
2.12.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ