kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iio: fix some warning messages
@ 2015-11-21 10:33 Dan Carpenter
  2015-11-21 16:01 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-11-21 10:33 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-iio,
	kernel-janitors

WARN_ON() only takes a condition argument.  I have changed these to
WARN() instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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);

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

* Re: [patch] iio: fix some warning messages
  2015-11-21 10:33 [patch] iio: fix some warning messages Dan Carpenter
@ 2015-11-21 16:01 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-11-21 16:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-iio,
	kernel-janitors

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);
> 


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

end of thread, other threads:[~2015-11-21 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-21 10:33 [patch] iio: fix some warning messages Dan Carpenter
2015-11-21 16:01 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).