All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix multiple definition error under lto
@ 2016-11-26 22:25 Peter Foley
  2016-12-12  3:45 ` Zhang Rui
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Foley @ 2016-11-26 22:25 UTC (permalink / raw)
  To: linux-kernel, rui.zhang, edubezval, linux-pm; +Cc: Peter Foley

drivers/thermal/built-in.o: In function `type_show.lto_priv.33':
(.text+0x3d80): multiple definition of `type_show.lto_priv.33'
drivers/base/built-in.o:(.text+0x2a40): first defined here

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
---
 drivers/thermal/thermal_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 226b0b4aced6..23ec1dd2ff3b 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -643,7 +643,7 @@ static void thermal_zone_device_check(struct work_struct *work)
 	container_of(_dev, struct thermal_zone_device, device)
 
 static ssize_t
-type_show(struct device *dev, struct device_attribute *attr, char *buf)
+thermal_type_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
 	struct thermal_zone_device *tz = to_thermal_zone(dev);
 
@@ -1159,7 +1159,7 @@ int power_actor_set_power(struct thermal_cooling_device *cdev,
 	return 0;
 }
 
-static DEVICE_ATTR(type, 0444, type_show, NULL);
+static DEVICE_ATTR(type, 0444, thermal_type_show, NULL);
 static DEVICE_ATTR(temp, 0444, temp_show, NULL);
 static DEVICE_ATTR(mode, 0644, mode_show, mode_store);
 static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show, passive_store);
-- 
2.11.0.rc2

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

* Re: [PATCH] Fix multiple definition error under lto
  2016-11-26 22:25 [PATCH] Fix multiple definition error under lto Peter Foley
@ 2016-12-12  3:45 ` Zhang Rui
  2016-12-13  3:18   ` Eduardo Valentin
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang Rui @ 2016-12-12  3:45 UTC (permalink / raw)
  To: Peter Foley, linux-kernel, edubezval, linux-pm

On Sat, 2016-11-26 at 17:25 -0500, Peter Foley wrote:
> drivers/thermal/built-in.o: In function `type_show.lto_priv.33':
> (.text+0x3d80): multiple definition of `type_show.lto_priv.33'
> drivers/base/built-in.o:(.text+0x2a40): first defined here
> 
can you illustrate how to reproduce this problem?

thanks,
rui
> Signed-off-by: Peter Foley <pefoley2@pefoley.com>
> ---
>  drivers/thermal/thermal_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_core.c
> b/drivers/thermal/thermal_core.c
> index 226b0b4aced6..23ec1dd2ff3b 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -643,7 +643,7 @@ static void thermal_zone_device_check(struct
> work_struct *work)
>  	container_of(_dev, struct thermal_zone_device, device)
>  
>  static ssize_t
> -type_show(struct device *dev, struct device_attribute *attr, char
> *buf)
> +thermal_type_show(struct device *dev, struct device_attribute *attr,
> char *buf)
>  {
>  	struct thermal_zone_device *tz = to_thermal_zone(dev);
>  
> @@ -1159,7 +1159,7 @@ int power_actor_set_power(struct
> thermal_cooling_device *cdev,
>  	return 0;
>  }
>  
> -static DEVICE_ATTR(type, 0444, type_show, NULL);
> +static DEVICE_ATTR(type, 0444, thermal_type_show, NULL);
>  static DEVICE_ATTR(temp, 0444, temp_show, NULL);
>  static DEVICE_ATTR(mode, 0644, mode_show, mode_store);
>  static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show,
> passive_store);

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

* Re: [PATCH] Fix multiple definition error under lto
  2016-12-12  3:45 ` Zhang Rui
@ 2016-12-13  3:18   ` Eduardo Valentin
  2016-12-13 14:36     ` Jiri Kosina
  0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Valentin @ 2016-12-13  3:18 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Peter Foley, linux-kernel, linux-pm

On Mon, Dec 12, 2016 at 11:45:06AM +0800, Zhang Rui wrote:
> On Sat, 2016-11-26 at 17:25 -0500, Peter Foley wrote:
> > drivers/thermal/built-in.o: In function `type_show.lto_priv.33':
> > (.text+0x3d80): multiple definition of `type_show.lto_priv.33'
> > drivers/base/built-in.o:(.text+0x2a40): first defined here
> > 
> can you illustrate how to reproduce this problem?

same here. I am not able to see this. Can you please describe your
environment?

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

* Re: [PATCH] Fix multiple definition error under lto
  2016-12-13  3:18   ` Eduardo Valentin
@ 2016-12-13 14:36     ` Jiri Kosina
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2016-12-13 14:36 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: Zhang Rui, Peter Foley, linux-kernel, linux-pm

On Mon, 12 Dec 2016, Eduardo Valentin wrote:

> > > drivers/thermal/built-in.o: In function `type_show.lto_priv.33':
> > > (.text+0x3d80): multiple definition of `type_show.lto_priv.33'
> > > drivers/base/built-in.o:(.text+0x2a40): first defined here
> > > 
> > can you illustrate how to reproduce this problem?
> 
> same here. I am not able to see this. Can you please describe your
> environment?

I'm pretty sure he's experimenting with LTO and hitting the LTO phase 
getting link-time symbol conflicts between definitions coming from thermal 
and base. I'd even say this to be a toolchain bug, given the fact that 
both symbols are static.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2016-12-13 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-26 22:25 [PATCH] Fix multiple definition error under lto Peter Foley
2016-12-12  3:45 ` Zhang Rui
2016-12-13  3:18   ` Eduardo Valentin
2016-12-13 14:36     ` Jiri Kosina

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.