public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...)
@ 2017-02-14 17:01 Arushi Singhal
  2017-02-15 12:06 ` [PATCH] staging:nvec:nvec_ps2.c: Preferingkzalloc(sizeof(*ser_dev)...) " Marc Dietrich
  0 siblings, 1 reply; 2+ messages in thread
From: Arushi Singhal @ 2017-02-14 17:01 UTC (permalink / raw)
  To: marvin24-Mmb7MZpHnFY
  Cc: Greg Kroah-Hartman, ac100-oU9gvf+ajcQ97yFScArB1dHuzzzSOjJt,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct
serio)...) as reported by checkpatch.pl.

Signed-off-by: Arushi Singhal <arushisinghal19971997-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/staging/nvec/nvec_ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 499952c8ef39..3b7bce3ffd19 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -107,7 +107,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
 	struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
 	struct serio *ser_dev;
 
-	ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
+	ser_dev = kzalloc(sizeof(*ser_dev), GFP_KERNEL);
 	if (!ser_dev)
 		return -ENOMEM;
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging:nvec:nvec_ps2.c: Preferingkzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...)
  2017-02-14 17:01 [PATCH] staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) Arushi Singhal
@ 2017-02-15 12:06 ` Marc Dietrich
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Dietrich @ 2017-02-15 12:06 UTC (permalink / raw)
  To: Arushi Singhal, linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: Greg Kroah-Hartman, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

Am Dienstag, 14. Februar 2017, 22:31:20 CET schrieb Arushi Singhal:
> Prefer kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct
> serio)...) as reported by checkpatch.pl.
> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

looks like we are in a (make everyone) happy week.

Acked-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>


> ---
>  drivers/staging/nvec/nvec_ps2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/nvec/nvec_ps2.c
> b/drivers/staging/nvec/nvec_ps2.c index 499952c8ef39..3b7bce3ffd19 100644
> --- a/drivers/staging/nvec/nvec_ps2.c
> +++ b/drivers/staging/nvec/nvec_ps2.c
> @@ -107,7 +107,7 @@ static int nvec_mouse_probe(struct platform_device
> *pdev) struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
>  	struct serio *ser_dev;
> 
> -	ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
> +	ser_dev = kzalloc(sizeof(*ser_dev), GFP_KERNEL);
>  	if (!ser_dev)
>  		return -ENOMEM;


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-15 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 17:01 [PATCH] staging:nvec:nvec_ps2.c: Prefering kzalloc(sizeof(*ser_dev)...) over kzalloc(sizeof(struct serio)...) Arushi Singhal
2017-02-15 12:06 ` [PATCH] staging:nvec:nvec_ps2.c: Preferingkzalloc(sizeof(*ser_dev)...) " Marc Dietrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox