Skip to content

Commit

Permalink
iio: fix some warning messages
Browse files Browse the repository at this point in the history
WARN_ON() only takes a condition argument.  I have changed these to
WARN() instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Dan Carpenter authored and Jonathan Cameron committed Nov 21, 2015
1 parent 8386c27 commit 231bfe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/iio/industrialio-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,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;
}
Expand Down

0 comments on commit 231bfe5

Please sign in to comment.