All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
@ 2010-11-19 13:55 Jean Delvare
  2010-11-19 14:42 ` Guenter Roeck
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jean Delvare @ 2010-11-19 13:55 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Thu, 18 Nov 2010 21:10:52 -0800, Guenter Roeck wrote:
> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>

When sending a patch which removes a warning, I suggest including that
warning in the description. Without the warning, it's difficult to
review the proposed code change.

> ---
>  drivers/hwmon/lis3lv02d_i2c.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
> index 9f4bae0..16c1f48 100644
> --- a/drivers/hwmon/lis3lv02d_i2c.c
> +++ b/drivers/hwmon/lis3lv02d_i2c.c
> @@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)/join  #bonjour j
>  
>  	return 0;
>  }
> -#else
> -#define lis3lv02d_i2c_suspend	NULL
> -#define lis3lv02d_i2c_resume	NULL
> -#define lis3lv02d_i2c_shutdown	NULL
> -#endif
> +#endif /* CONFIG_PM */
>  
> +#ifdef CONFIG_PM_RUNTIME
>  static int lis3_i2c_runtime_suspend(struct device *dev)
>  {
>  	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> @@ -236,6 +233,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
>  	lis3lv02d_poweron(lis3);
>  	return 0;
>  }
> +#endif /* CONFIG_PM_RUNTIME */
>  
>  static const struct i2c_device_id lis3lv02d_id[] = {
>  	{"lis3lv02d", 0 },

The fix looks sane to me.

Acked-by: Jean Delvare <khali@linux-fr.org>

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
  2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
@ 2010-11-19 14:42 ` Guenter Roeck
  2010-11-19 14:59 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile warnings if Guenter Roeck
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2010-11-19 14:42 UTC (permalink / raw)
  To: lm-sensors

On Fri, Nov 19, 2010 at 08:55:10AM -0500, Jean Delvare wrote:
> Hi Guenter,
> 
> On Thu, 18 Nov 2010 21:10:52 -0800, Guenter Roeck wrote:
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> 
> When sending a patch which removes a warning, I suggest including that
> warning in the description. Without the warning, it's difficult to
> review the proposed code change.
> 
Good point. Resent with warnings added. Hopefully it makes it to the list this time.

The warnings are from the "Build regressions/improvements in v2.6.37-rc2" post sent to lkml.
There is another one in there, but I have no idea how to fix it. I'll send it to the list for input.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile warnings if
  2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
  2010-11-19 14:42 ` Guenter Roeck
@ 2010-11-19 14:59 ` Guenter Roeck
  2010-11-19 15:49 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2010-11-19 14:59 UTC (permalink / raw)
  To: lm-sensors

This commit fixes the following compile warnings.

From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used

From v2.6.37-rc2/sh4/sh-allyesconfig:
drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
---
Resent. Previous post did not make it to the mailing list. Also added the fixed
warnings.

 drivers/hwmon/lis3lv02d_i2c.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
index 9f4bae0..16c1f48 100644
--- a/drivers/hwmon/lis3lv02d_i2c.c
+++ b/drivers/hwmon/lis3lv02d_i2c.c
@@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#else
-#define lis3lv02d_i2c_suspend	NULL
-#define lis3lv02d_i2c_resume	NULL
-#define lis3lv02d_i2c_shutdown	NULL
-#endif
+#endif /* CONFIG_PM */
 
+#ifdef CONFIG_PM_RUNTIME
 static int lis3_i2c_runtime_suspend(struct device *dev)
 {
 	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
@@ -236,6 +233,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
 	lis3lv02d_poweron(lis3);
 	return 0;
 }
+#endif /* CONFIG_PM_RUNTIME */
 
 static const struct i2c_device_id lis3lv02d_id[] = {
 	{"lis3lv02d", 0 },
-- 
1.7.3.1


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
  2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
  2010-11-19 14:42 ` Guenter Roeck
  2010-11-19 14:59 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile warnings if Guenter Roeck
@ 2010-11-19 15:49 ` Jean Delvare
  2010-11-19 16:01 ` Guenter Roeck
  2010-11-19 18:10 ` Guenter Roeck
  4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2010-11-19 15:49 UTC (permalink / raw)
  To: lm-sensors

Hi Guenter,

On Fri, 19 Nov 2010 06:59:53 -0800, Guenter Roeck wrote:
> This commit fixes the following compile warnings.
> 
> From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
> drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
> drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used

Your patch definitely fixes that one.

> 
> From v2.6.37-rc2/sh4/sh-allyesconfig:
> drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
> drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used

But that one? I doubt it. If CONFIG_PM is set but CONFIG_PM_SLEEP
isn't, it's still present. I don't think it can happen on x86, but
apparently on sh4 it can.

> 
> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> ---
> Resent. Previous post did not make it to the mailing list. Also added the fixed
> warnings.
> 
>  drivers/hwmon/lis3lv02d_i2c.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
> index 9f4bae0..16c1f48 100644
> --- a/drivers/hwmon/lis3lv02d_i2c.c
> +++ b/drivers/hwmon/lis3lv02d_i2c.c
> @@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#else
> -#define lis3lv02d_i2c_suspend	NULL
> -#define lis3lv02d_i2c_resume	NULL
> -#define lis3lv02d_i2c_shutdown	NULL
> -#endif
> +#endif /* CONFIG_PM */
>  
> +#ifdef CONFIG_PM_RUNTIME
>  static int lis3_i2c_runtime_suspend(struct device *dev)
>  {
>  	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> @@ -236,6 +233,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
>  	lis3lv02d_poweron(lis3);
>  	return 0;
>  }
> +#endif /* CONFIG_PM_RUNTIME */
>  
>  static const struct i2c_device_id lis3lv02d_id[] = {
>  	{"lis3lv02d", 0 },


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
  2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
                   ` (2 preceding siblings ...)
  2010-11-19 15:49 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
@ 2010-11-19 16:01 ` Guenter Roeck
  2010-11-19 18:10 ` Guenter Roeck
  4 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2010-11-19 16:01 UTC (permalink / raw)
  To: lm-sensors

On Fri, Nov 19, 2010 at 10:49:29AM -0500, Jean Delvare wrote:
> Hi Guenter,
> 
> On Fri, 19 Nov 2010 06:59:53 -0800, Guenter Roeck wrote:
> > This commit fixes the following compile warnings.
> > 
> > From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used
> 
> Your patch definitely fixes that one.
> 
> > 
> > From v2.6.37-rc2/sh4/sh-allyesconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used
> 
> But that one? I doubt it. If CONFIG_PM is set but CONFIG_PM_SLEEP
> isn't, it's still present. I don't think it can happen on x86, but
> apparently on sh4 it can.
> 
One never stops learning. Looks like I'll have to use #ifdef CONFIG_PM_SLEEP.

Guenter

> > 
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> > Resent. Previous post did not make it to the mailing list. Also added the fixed
> > warnings.
> > 
> >  drivers/hwmon/lis3lv02d_i2c.c |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
> > index 9f4bae0..16c1f48 100644
> > --- a/drivers/hwmon/lis3lv02d_i2c.c
> > +++ b/drivers/hwmon/lis3lv02d_i2c.c
> > @@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)
> >  
> >  	return 0;
> >  }
> > -#else
> > -#define lis3lv02d_i2c_suspend	NULL
> > -#define lis3lv02d_i2c_resume	NULL
> > -#define lis3lv02d_i2c_shutdown	NULL
> > -#endif
> > +#endif /* CONFIG_PM */
> >  
> > +#ifdef CONFIG_PM_RUNTIME
> >  static int lis3_i2c_runtime_suspend(struct device *dev)
> >  {
> >  	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> > @@ -236,6 +233,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
> >  	lis3lv02d_poweron(lis3);
> >  	return 0;
> >  }
> > +#endif /* CONFIG_PM_RUNTIME */
> >  
> >  static const struct i2c_device_id lis3lv02d_id[] = {
> >  	{"lis3lv02d", 0 },
> 
> 
> -- 
> Jean Delvare

-- 
Guenter Roeck
Distinguished Engineer
PDU IP Systems

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
  2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
                   ` (3 preceding siblings ...)
  2010-11-19 16:01 ` Guenter Roeck
@ 2010-11-19 18:10 ` Guenter Roeck
  4 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2010-11-19 18:10 UTC (permalink / raw)
  To: lm-sensors

On Fri, Nov 19, 2010 at 10:49:29AM -0500, Jean Delvare wrote:
> Hi Guenter,
> 
> On Fri, 19 Nov 2010 06:59:53 -0800, Guenter Roeck wrote:
> > This commit fixes the following compile warnings.
> > 
> > From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used
> 
> Your patch definitely fixes that one.
> 
> > 
> > From v2.6.37-rc2/sh4/sh-allyesconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used
> 
> But that one? I doubt it. If CONFIG_PM is set but CONFIG_PM_SLEEP
> isn't, it's still present. I don't think it can happen on x86, but
> apparently on sh4 it can.
> 
It can happen on x86 as well. You have to disable hibernation, suspend, and xen support.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2010-11-19 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
2010-11-19 14:42 ` Guenter Roeck
2010-11-19 14:59 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile warnings if Guenter Roeck
2010-11-19 15:49 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
2010-11-19 16:01 ` Guenter Roeck
2010-11-19 18:10 ` Guenter Roeck

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.