Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: buffer: cleanup messages in iio_update_buffers()
Date: Mon, 06 May 2013 17:14:01 +0100	[thread overview]
Message-ID: <5187D6C9.7040406@kernel.org> (raw)
In-Reply-To: <79b3b255142a0ec0ab891d0b4bb0dbc9a2532e74.1367671597.git.mirq-linux@rere.qmqm.pl>

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@rere.qmqm.pl>
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);
> 

      reply	other threads:[~2013-05-06 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04 13:19 [PATCH] iio: buffer: cleanup messages in iio_update_buffers() Michał Mirosław
2013-05-06 16:14 ` 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=5187D6C9.7040406@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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