Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio: fix some warning messages
Date: Sat, 21 Nov 2015 16:01:48 +0000	[thread overview]
Message-ID: <5650956C.2090509@kernel.org> (raw)
In-Reply-To: <20151121103300.GD7002@mwanda>

On 21/11/15 10:33, Dan Carpenter wrote:
> WARN_ON() only takes a condition argument.  I have changed these to
> WARN() instead.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Oops and good spot.

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 37697d5..fe80366 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -654,7 +654,7 @@ int __iio_device_attr_init(struct device_attribute *dev_attr,
>  			break;
>  		case IIO_SEPARATE:
>  			if (!chan->indexed) {
> -				WARN_ON("Differential channels must be indexed\n");
> +				WARN(1, "Differential channels must be indexed\n");
>  				ret = -EINVAL;
>  				goto error_free_full_postfix;
>  			}
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index d7e908a..0f6f63b 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -302,7 +302,7 @@ static int iio_scan_mask_set(struct iio_dev *indio_dev,
>  	if (trialmask == NULL)
>  		return -ENOMEM;
>  	if (!indio_dev->masklength) {
> -		WARN_ON("Trying to set scanmask prior to registering buffer\n");
> +		WARN(1, "Trying to set scanmask prior to registering buffer\n");
>  		goto err_invalid_mask;
>  	}
>  	bitmap_copy(trialmask, buffer->scan_mask, indio_dev->masklength);
> 


      reply	other threads:[~2015-11-21 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 10:33 [patch] iio: fix some warning messages Dan Carpenter
2015-11-21 16:01 ` Jonathan Cameron [this message]

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=5650956C.2090509@kernel.org \
    --to=jic23@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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