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: <1360173659-22409-1-git-send-email-emilgoode@gmail.com>
Date:	Wed,  6 Feb 2013 19:00:59 +0100
From:	Emil Goode <emilgoode@...il.com>
To:	ptyser@...-inc.com, sameo@...ux.intel.com
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Emil Goode <emilgoode@...il.com>
Subject: [PATCH] mfd: lpc_ich: Fix arguments to kmalloc

This patch changes the order of the arguments to kmalloc,
the allocation flag should be the second argument.

Sparse warnings:

drivers/mfd/lpc_ich.c:881:24: warning:
	incorrect type in argument 1 (different base types)
	drivers/mfd/lpc_ich.c:881:24:
	expected unsigned long [unsigned] [usertype] size
	drivers/mfd/lpc_ich.c:881:24:    got restricted gfp_t

drivers/mfd/lpc_ich.c:881:36: warning:
	incorrect type in argument 2 (different base types)
	drivers/mfd/lpc_ich.c:881:36:
	expected restricted gfp_t [usertype] flags
	drivers/mfd/lpc_ich.c:881:36:    got unsigned long

Signed-off-by: Emil Goode <emilgoode@...il.com>
---
 drivers/mfd/lpc_ich.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index a0cfdf9..3af8590 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -878,7 +878,7 @@ static int lpc_ich_probe(struct pci_dev *dev,
 	int ret;
 	bool cell_added = false;
 
-	priv = kmalloc(GFP_KERNEL, sizeof(struct lpc_ich_priv));
+	priv = kmalloc(sizeof(struct lpc_ich_priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
 
-- 
1.7.10.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