Re: [PATCH] iio: buffer: cleanup messages in iio_update_buffers()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/2013 02:19 PM, Michał Mirosław wrote:
> 1. make messages grepable (in one line)
> 2. include returned errno in them
> 
> Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
Thanks,

Applied to the togreg branch of iio.git.
> ---
> Please ignore checkpatch long lines warning.
> 
>  drivers/iio/industrialio-buffer.c |   10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index aaadd32..e73033f 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -542,8 +542,7 @@ int iio_update_buffers(struct iio_dev *indio_dev,
>  		ret = indio_dev->setup_ops->preenable(indio_dev);
>  		if (ret) {
>  			printk(KERN_ERR
> -			       "Buffer not started:"
> -			       "buffer preenable failed\n");
> +			       "Buffer not started: buffer preenable failed (%d)\n", ret);
>  			goto error_remove_inserted;
>  		}
>  	}
> @@ -556,8 +555,7 @@ int iio_update_buffers(struct iio_dev *indio_dev,
>  			ret = buffer->access->request_update(buffer);
>  			if (ret) {
>  				printk(KERN_INFO
> -				       "Buffer not started:"
> -				       "buffer parameter update failed\n");
> +				       "Buffer not started: buffer parameter update failed (%d)\n", ret);
>  				goto error_run_postdisable;
>  			}
>  		}
> @@ -566,7 +564,7 @@ int iio_update_buffers(struct iio_dev *indio_dev,
>  			->update_scan_mode(indio_dev,
>  					   indio_dev->active_scan_mask);
>  		if (ret < 0) {
> -			printk(KERN_INFO "update scan mode failed\n");
> +			printk(KERN_INFO "Buffer not started: update scan mode failed (%d)\n", ret);
>  			goto error_run_postdisable;
>  		}
>  	}
> @@ -590,7 +588,7 @@ int iio_update_buffers(struct iio_dev *indio_dev,
>  		ret = indio_dev->setup_ops->postenable(indio_dev);
>  		if (ret) {
>  			printk(KERN_INFO
> -			       "Buffer not started: postenable failed\n");
> +			       "Buffer not started: postenable failed (%d)\n", ret);
>  			indio_dev->currentmode = INDIO_DIRECT_MODE;
>  			if (indio_dev->setup_ops->postdisable)
>  				indio_dev->setup_ops->postdisable(indio_dev);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux