public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	kernel-janitors@vger.kernel.org, linux-ia64@vger.kernel.org,
	ceph-devel@vger.kernel.org, toralf.foerster@gmx.de,
	hmh@hmh.eng.br, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/9] drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c: use correct structure type name in sizeof
Date: Mon, 09 Nov 2015 22:48:26 +0200	[thread overview]
Message-ID: <1915769.aHlhsWqSsK@avalon> (raw)
In-Reply-To: <1406647011-8543-2-git-send-email-Julia.Lawall@lip6.fr>

Hi Julia,

Thank you for the patch.

On Tuesday 29 July 2014 17:16:43 Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Correct typo in the name of the type given to sizeof.  Because it is the
> size of a pointer that is wanted, the typo has no impact on compilation or
> execution.
> 
> This problem was found using Coccinelle (http://coccinelle.lip6.fr/).  The
> semantic patch used can be found in message 0 of this patch series.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index
> cda8388..255590f 100644
> --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> @@ -227,7 +227,7 @@ static int vpfe_enable_clock(struct vpfe_device
> *vpfe_dev) return 0;
> 
>  	vpfe_dev->clks = kzalloc(vpfe_cfg->num_clocks *
> -				   sizeof(struct clock *), GFP_KERNEL);
> +				   sizeof(struct clk *), GFP_KERNEL);

I'd use sizeof(*vpfe_dev->clks) to avoid such issues.

Apart from that,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I've applied the patch to my tree with the above change, there's no need to 
resubmit if you agree with the proposal.

>  	if (vpfe_dev->clks == NULL) {
>  		v4l2_err(vpfe_dev->pdev->driver, "Memory allocation failed\n");
>  		return -ENOMEM;

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-11-09 20:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 15:16 [PATCH 0/9] use correct structure type name in sizeof Julia Lawall
2014-07-29 15:16 ` [PATCH 1/9] drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c: " Julia Lawall
2015-11-09 20:48   ` Laurent Pinchart [this message]
2014-07-29 15:16 ` [PATCH 2/9] CAPI: " Julia Lawall
2014-07-31  2:14   ` David Miller
2014-07-29 15:16 ` [PATCH 3/9] i40e: " Julia Lawall
2014-07-29 20:22   ` Brown, Aaron F
2014-07-31  2:14   ` David Miller
2014-07-29 15:16 ` [PATCH 4/9] reiserfs: " Julia Lawall
2014-07-29 15:16 ` [PATCH 5/9] scsi: " Julia Lawall
2014-07-29 15:16 ` [PATCH 6/9] gpiolib: devres: " Julia Lawall
2014-07-30  8:27   ` Alexandre Courbot
2014-07-30  8:48     ` Julia Lawall
2014-08-08 13:26   ` Linus Walleij
2014-07-29 15:16 ` [PATCH 7/9] scsi: " Julia Lawall
2014-07-29 15:16 ` [PATCH 8/9] iwlegacy: " Julia Lawall
2014-07-29 15:16 ` [PATCH 9/9] uwb/whci: " Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1915769.aHlhsWqSsK@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=ceph-devel@vger.kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hmh@hmh.eng.br \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=toralf.foerster@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox