From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cameron Subject: Re: [PATCH v2 09/10] iio: mpu6050: improve code readability Date: Sun, 3 Mar 2019 15:30:07 +0000 Message-ID: <20190303153007.643fe422@archlinux> References: <1493d22e5c0710a4ced34bf3bc714d367bdf58a3.1550768574.git.hns@goldelico.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1493d22e5c0710a4ced34bf3bc714d367bdf58a3.1550768574.git.hns@goldelico.com> Sender: linux-kernel-owner@vger.kernel.org To: "H. Nikolaus Schaller" Cc: Linus Walleij , Rob Herring , Mark Rutland , Andy Shevchenko , Charles Keepax , Song Qiang , Jean-Baptiste Maneyrol , Martin Kelly , Jonathan Marek , Brian Masney , Stephan Gerhold , letux-kernel@openphoenux.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: devicetree@vger.kernel.org On Thu, 21 Feb 2019 18:02:54 +0100 "H. Nikolaus Schaller" wrote: > - use temporary variable in get_mount_matrix() > - remove , after { } > > Signed-off-by: H. Nikolaus Schaller Applied. Thanks, Jonathan > --- > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c > index 533d1f8321ac..e7721b6fb441 100644 > --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c > +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c > @@ -765,12 +765,14 @@ static const struct iio_mount_matrix * > inv_get_mount_matrix(const struct iio_dev *indio_dev, > const struct iio_chan_spec *chan) > { > - return &((struct inv_mpu6050_state *)iio_priv(indio_dev))->orientation; > + struct inv_mpu6050_state *data = iio_priv(indio_dev); > + > + return &data->orientation; > } > > static const struct iio_chan_spec_ext_info inv_ext_info[] = { > IIO_MOUNT_MATRIX(IIO_SHARED_BY_TYPE, inv_get_mount_matrix), > - { }, > + { } > }; > > #define INV_MPU6050_CHAN(_type, _channel2, _index) \