diff mbox series

[09/13] iio: imu: st_lsm6dsx: fix checkpatch warning

Message ID 7c8a7e5f17befae7ac541cfb155ec7fefa78b10e.1570367532.git.lorenzo@kernel.org (mailing list archive)
State New, archived
Headers show
Series various st_lsm6dsx fixes and missing bits | expand

Commit Message

Lorenzo Bianconi Oct. 6, 2019, 1:22 p.m. UTC
Fix following checkpatch warnings:

CHECK: Alignment should match open parenthesis
+static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
+				   const struct iio_chan_spec *chan,

CHECK: Alignment should match open parenthesis
+static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
+				    const struct iio_chan_spec *chan,

CHECK: Alignment should match open parenthesis
+static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
+					  const struct iio_chan_spec *chan,

CHECK: Alignment should match open parenthesis
+static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
+					   const struct iio_chan_spec *chan,

WARNING: line over 80 characters
+	if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 35 +++++++++++---------
 1 file changed, 19 insertions(+), 16 deletions(-)

Comments

Jonathan Cameron Oct. 12, 2019, 12:24 p.m. UTC | #1
On Sun,  6 Oct 2019 15:22:03 +0200
Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Fix following checkpatch warnings:
> 
> CHECK: Alignment should match open parenthesis
> +static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
> +				   const struct iio_chan_spec *chan,
> 
> CHECK: Alignment should match open parenthesis
> +static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
> +				    const struct iio_chan_spec *chan,
> 
> CHECK: Alignment should match open parenthesis
> +static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
> +					  const struct iio_chan_spec *chan,
> 
> CHECK: Alignment should match open parenthesis
> +static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
> +					   const struct iio_chan_spec *chan,
> 
> WARNING: line over 80 characters
> +	if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Applied.
> ---
>  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 35 +++++++++++---------
>  1 file changed, 19 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> index 04231710ab9c..b0623b837abd 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> @@ -1523,12 +1523,13 @@ static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
>  	return IIO_VAL_INT;
>  }
>  
> -static int st_lsm6dsx_write_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_write_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;
> @@ -1554,10 +1555,11 @@ static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
>  	return 0;
>  }
>  
> -static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
> -					  const struct iio_chan_spec *chan,
> -					  enum iio_event_type type,
> -					  enum iio_event_direction dir)
> +static int
> +st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
> +			     const struct iio_chan_spec *chan,
> +			     enum iio_event_type type,
> +			     enum iio_event_direction dir)
>  {
>  	struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
>  	struct st_lsm6dsx_hw *hw = sensor->hw;
> @@ -1568,11 +1570,11 @@ static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
>  	return !!(hw->enable_event & BIT(chan->channel2));
>  }
>  
> -static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
> -					   const struct iio_chan_spec *chan,
> -					   enum iio_event_type type,
> -					   enum iio_event_direction dir,
> -					   int state)
> +static int
> +st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
> +			      const struct iio_chan_spec *chan,
> +			      enum iio_event_type type,
> +			      enum iio_event_direction dir, int state)
>  {
>  	struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
>  	struct st_lsm6dsx_hw *hw = sensor->hw;
> @@ -2150,7 +2152,8 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
>  			return err;
>  	}
>  
> -	if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
> +	if (dev->of_node &&
> +	    of_property_read_bool(dev->of_node, "wakeup-source"))
>  		device_init_wakeup(dev, true);
>  
>  	return 0;
diff mbox series

Patch

diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 04231710ab9c..b0623b837abd 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -1523,12 +1523,13 @@  static int st_lsm6dsx_read_event(struct iio_dev *iio_dev,
 	return IIO_VAL_INT;
 }
 
-static int st_lsm6dsx_write_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_write_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;
@@ -1554,10 +1555,11 @@  static int st_lsm6dsx_write_event(struct iio_dev *iio_dev,
 	return 0;
 }
 
-static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
-					  const struct iio_chan_spec *chan,
-					  enum iio_event_type type,
-					  enum iio_event_direction dir)
+static int
+st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
+			     const struct iio_chan_spec *chan,
+			     enum iio_event_type type,
+			     enum iio_event_direction dir)
 {
 	struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
 	struct st_lsm6dsx_hw *hw = sensor->hw;
@@ -1568,11 +1570,11 @@  static int st_lsm6dsx_read_event_config(struct iio_dev *iio_dev,
 	return !!(hw->enable_event & BIT(chan->channel2));
 }
 
-static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
-					   const struct iio_chan_spec *chan,
-					   enum iio_event_type type,
-					   enum iio_event_direction dir,
-					   int state)
+static int
+st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
+			      const struct iio_chan_spec *chan,
+			      enum iio_event_type type,
+			      enum iio_event_direction dir, int state)
 {
 	struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
 	struct st_lsm6dsx_hw *hw = sensor->hw;
@@ -2150,7 +2152,8 @@  int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
 			return err;
 	}
 
-	if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
+	if (dev->of_node &&
+	    of_property_read_bool(dev->of_node, "wakeup-source"))
 		device_init_wakeup(dev, true);
 
 	return 0;