* [PATCH] mfd: lpc_ich: Fix arguments to kmalloc
@ 2013-02-06 18:00 ` Emil Goode
0 siblings, 0 replies; 4+ messages in thread
From: Emil Goode @ 2013-02-06 17:59 UTC (permalink / raw)
To: ptyser, sameo; +Cc: linux-kernel, kernel-janitors, Emil Goode
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@gmail.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mfd: lpc_ich: Fix arguments to kmalloc
@ 2013-02-06 18:00 ` Emil Goode
0 siblings, 0 replies; 4+ messages in thread
From: Emil Goode @ 2013-02-06 18:00 UTC (permalink / raw)
To: ptyser, sameo; +Cc: linux-kernel, kernel-janitors, Emil Goode
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@gmail.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mfd: lpc_ich: Fix arguments to kmalloc
2013-02-06 18:00 ` Emil Goode
@ 2013-02-06 18:17 ` Samuel Ortiz
-1 siblings, 0 replies; 4+ messages in thread
From: Samuel Ortiz @ 2013-02-06 18:17 UTC (permalink / raw)
To: Emil Goode; +Cc: ptyser, linux-kernel, kernel-janitors
HI Emil,
On Wed, Feb 06, 2013 at 07:00:59PM +0100, Emil Goode wrote:
> 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@gmail.com>
> ---
> drivers/mfd/lpc_ich.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
This patch does not apply to my for-next branch.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mfd: lpc_ich: Fix arguments to kmalloc
@ 2013-02-06 18:17 ` Samuel Ortiz
0 siblings, 0 replies; 4+ messages in thread
From: Samuel Ortiz @ 2013-02-06 18:17 UTC (permalink / raw)
To: Emil Goode; +Cc: ptyser, linux-kernel, kernel-janitors
HI Emil,
On Wed, Feb 06, 2013 at 07:00:59PM +0100, Emil Goode wrote:
> 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@gmail.com>
> ---
> drivers/mfd/lpc_ich.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
This patch does not apply to my for-next branch.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-06 18:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 17:59 [PATCH] mfd: lpc_ich: Fix arguments to kmalloc Emil Goode
2013-02-06 18:00 ` Emil Goode
2013-02-06 18:17 ` Samuel Ortiz
2013-02-06 18:17 ` Samuel Ortiz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.