linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: lorenzo.bianconi@redhat.com, linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: imu: st_lsm6dsx: fix checkpatch warning
Date: Sun, 1 Dec 2019 21:00:05 +0000	[thread overview]
Message-ID: <20191201210005.61876122@archlinux> (raw)
In-Reply-To: <4a1fefa9f941bf2c350b4a886fd05909e5ba8ea3.1575017118.git.lorenzo@kernel.org>

On Fri, 29 Nov 2019 10:46:44 +0200
Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Fix following checkpatch warning:
> 
> CHECK: Alignment should match open parenthesis
> +static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
> +                                  const struct iio_chan_spec *chan,
Fair enough on this tidy up, but the other bit of reorganization?
Why and why not mention it in the patch description?

Also, why the extra line break?  As far as I can see it can
be just fixed without that and still be under 80 chars.
Right now the only issue is that it's indented 2 spaces too many.

Jonathan


> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> index a7d40c02ce6b..990643da9f4e 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> @@ -1607,12 +1607,13 @@ static int st_lsm6dsx_event_setup(struct st_lsm6dsx_hw *hw, int state)
>  					     hw->irq_routing->mask, data);
>  }
>  
> -static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
> -				   const struct iio_chan_spec *chan,
> -				   enum iio_event_type type,
> -				   enum iio_event_direction dir,
> -				   enum iio_event_info info,
> -				   int *val, int *val2)
> +static int
> +st_lsm6dsx_read_event(struct iio_dev *iio_dev,
> +		      const struct iio_chan_spec *chan,
> +		      enum iio_event_type type,
> +		      enum iio_event_direction dir,
> +		      enum iio_event_info info,
> +		      int *val, int *val2)
>  {
>  	struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
>  	struct st_lsm6dsx_hw *hw = sensor->hw;
> @@ -1620,8 +1621,8 @@ static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
>  	if (type != IIO_EV_TYPE_THRESH)
>  		return -EINVAL;
>  
> -	*val2 = 0;
>  	*val = hw->event_threshold;
> +	*val2 = 0;
>  
>  	return IIO_VAL_INT;
>  }


      reply	other threads:[~2019-12-01 21:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29  8:46 [PATCH] iio: imu: st_lsm6dsx: fix checkpatch warning Lorenzo Bianconi
2019-12-01 21:00 ` 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=20191201210005.61876122@archlinux \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).