]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: fix some warning messages
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 21 Nov 2015 10:33:00 +0000 (13:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 19:58:53 +0000 (11:58 -0800)
commit 231bfe53c57e89857753c940192acba933cba56c upstream.

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c

index 37b52bd44f864d4e714bc9c3e89a796db6247c5b..a9164b51b5dc30a4e58fe6a11430cb1ba92a22ff 100644 (file)
@@ -830,7 +830,7 @@ 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);
index acc911a836ca19e94d6ef0e0cebaee1df9935888..a7b073b5e26307117303525d23903a1e7e3bdd59 100644 (file)
@@ -589,7 +589,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;
                        }