All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [staging:staging-next 86/151] drivers/staging/iio/iio_hwmon.c:96:21-27: ERROR: application of si
Date: Wed, 19 Sep 2012 17:06:39 +0000	[thread overview]
Message-ID: <5059FB9F.9060900@metafoo.de> (raw)
In-Reply-To: <20120919163132.GA596@localhost>

On 09/19/2012 06:31 PM, Fengguang Wu wrote:
> Hi Lars-Peter,
> 
> FYI, there are new coccinelle warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
> head:   5d06e3df280bd230e2eadc16372e62818c63e894
> commit: a0e545e0e75006a7de0e9bc5397f6b44c61990b2 [86/151] staging:iio:hwmon bridge: Use iio_read_channel_processed

Hi,

Thanks for info, patch looks good, but the warning is not introduced by the
commit you mention, though.

- Lars

> 
> All coccinelle warnings:
> 
> + drivers/staging/iio/iio_hwmon.c:96:21-27: ERROR: application of sizeof to pointer
> 
> vim +96 drivers/staging/iio/iio_hwmon.c
>     86		st->channels = iio_channel_get_all(dev_name(&pdev->dev));
>     87		if (IS_ERR(st->channels)) {
>     88			ret = PTR_ERR(st->channels);
>     89			goto error_free_state;
>     90		}
>     91	
>     92		/* count how many attributes we have */
>     93		while (st->channels[st->num_channels].indio_dev)
>     94			st->num_channels++;
>     95	
>   > 96		st->attrs = kzalloc(sizeof(st->attrs) * (st->num_channels + 1),
>     97				    GFP_KERNEL);
>     98		if (st->attrs = NULL) {
>     99			ret = -ENOMEM;
>    100			goto error_release_channels;
>    101		}
>    102		for (i = 0; i < st->num_channels; i++) {
>    103			a = kzalloc(sizeof(*a), GFP_KERNEL);
>    104			if (a = NULL) {
>    105				ret = -ENOMEM;
>    106				goto error_free_attrs;
> 
> Please consider folding the attached diff :-)
> 
> ---
> 0-DAY kernel build testing backend         Open Source Technology Centre
> Fengguang Wu, Yuanhan Liu                              Intel Corporation


  reply	other threads:[~2012-09-19 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 16:31 [staging:staging-next 86/151] drivers/staging/iio/iio_hwmon.c:96:21-27: ERROR: application of sizeof Fengguang Wu
2012-09-19 17:06 ` Lars-Peter Clausen [this message]
2012-09-19 17:19 ` [staging:staging-next 86/151] drivers/staging/iio/iio_hwmon.c:96:21-27: ERROR: application of si Fengguang Wu
2012-09-19 19:15 ` Lars-Peter Clausen

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=5059FB9F.9060900@metafoo.de \
    --to=lars@metafoo.de \
    --cc=kernel-janitors@vger.kernel.org \
    /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 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.