All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: st_accel_core: Remove unneeded define
@ 2015-12-03 23:54 Robert Kmiec
  2015-12-05 17:29 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Kmiec @ 2015-12-03 23:54 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, denis.ciocca, linus.walleij,
	giuseppe.barba, alban.bedel, linux-iio, linux-kernel
  Cc: Robert Kmiec

Definition of ST_SENSORS_WAI_ADDRESS was introduced within a very
first commit of this driver, but it was never used.
This address is already defined as ST_SENSORS_DEFAULT_WAI_ADDRESS
in include/linux/iio/common/st_sensors.h

To avoid duplication of the same constant in two different places
called almost exactly the same, the one which was never used
should be removed.

Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com>
---
 drivers/iio/common/st_sensors/st_sensors_core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index 25258e2..8447c31 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -18,9 +18,6 @@
 #include <asm/unaligned.h>
 #include <linux/iio/common/st_sensors.h>
 
-
-#define ST_SENSORS_WAI_ADDRESS		0x0f
-
 static inline u32 st_sensors_get_unaligned_le24(const u8 *p)
 {
 	return (s32)((p[0] | p[1] << 8 | p[2] << 16) << 8) >> 8;
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: st_accel_core: Remove unneeded define
  2015-12-03 23:54 [PATCH] iio: st_accel_core: Remove unneeded define Robert Kmiec
@ 2015-12-05 17:29 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-12-05 17:29 UTC (permalink / raw)
  To: Robert Kmiec, knaack.h, lars, pmeerw, denis.ciocca,
	linus.walleij, giuseppe.barba, alban.bedel, linux-iio,
	linux-kernel

On 03/12/15 23:54, Robert Kmiec wrote:
> Definition of ST_SENSORS_WAI_ADDRESS was introduced within a very
> first commit of this driver, but it was never used.
> This address is already defined as ST_SENSORS_DEFAULT_WAI_ADDRESS
> in include/linux/iio/common/st_sensors.h
> 
> To avoid duplication of the same constant in two different places
> called almost exactly the same, the one which was never used
> should be removed.
> 
> Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com>
Fair enough.

Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/common/st_sensors/st_sensors_core.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
> index 25258e2..8447c31 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_core.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_core.c
> @@ -18,9 +18,6 @@
>  #include <asm/unaligned.h>
>  #include <linux/iio/common/st_sensors.h>
>  
> -
> -#define ST_SENSORS_WAI_ADDRESS		0x0f
> -
>  static inline u32 st_sensors_get_unaligned_le24(const u8 *p)
>  {
>  	return (s32)((p[0] | p[1] << 8 | p[2] << 16) << 8) >> 8;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-05 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03 23:54 [PATCH] iio: st_accel_core: Remove unneeded define Robert Kmiec
2015-12-05 17:29 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.