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] [day] [month] [year] [list]
Message-Id: <1399630109-18701-3-git-send-email-mpappas@fastmail.fm>
Date:	Fri,  9 May 2014 18:08:22 +0800
From:	Michalis Pappas <mpappas@...tmail.fm>
To:	gregkh@...uxfoundation.org, dan.carpenter@...cle.com
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Michalis Pappas <mpappas@...tmail.fm>
Subject: [PATCH v5 03/10] staging: gdm72xx: Modify a struct allocation to match coding standards

Fixes the following checkpatch.pl issue:

CHECK: Prefer kmalloc(sizeof(*entry)...) over kmalloc(sizeof(struct qos_entry_s)...)

Signed-off-by: Michalis Pappas <mpappas@...tmail.fm>
---
 drivers/staging/gdm72xx/gdm_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c
index 50d43ad..519db48 100644
--- a/drivers/staging/gdm72xx/gdm_qos.c
+++ b/drivers/staging/gdm72xx/gdm_qos.c
@@ -56,7 +56,7 @@ static void *alloc_qos_entry(void)
 	}
 	spin_unlock_irqrestore(&qos_free_list.lock, flags);
 
-	entry = kmalloc(sizeof(struct qos_entry_s), GFP_ATOMIC);
+	entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
 	return entry;
 }
 
-- 
1.8.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