All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias)
@ 2018-04-27  3:33 David Lechner
  2018-04-27  7:07 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: David Lechner @ 2018-04-27  3:33 UTC (permalink / raw)
  To: stable
  Cc: David Lechner, Hans de Goede, Johan Hovold, Sebastian Reichel,
	Greg Kroah-Hartman

This fixes the compile error "multiple definition of `dev_attr_modalias'"
by adding the static modifier to DEVICE_ATTR_RO(modalias).

This change was made in the mainline kernel in 2460942f51f1 ("serdev: do
not generate modaliases for controllers") along with some other changes.

Fixes: 4fe99816a1ab ("tty: serdev: use dev_groups and not dev_attrs for bus_type")
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org> # 4.14.x
Signed-off-by: David Lechner <david@lechnology.com>
---

Should we pick up the patch 2460942f51f1 ("serdev: do not generate modaliases
for controllers") for stable or is this patch good enough?

 drivers/tty/serdev/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 97db76afced2..25298b7b2419 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -276,7 +276,7 @@ static ssize_t modalias_show(struct device *dev,
 {
 	return of_device_modalias(dev, buf, PAGE_SIZE);
 }
-DEVICE_ATTR_RO(modalias);
+static DEVICE_ATTR_RO(modalias);
 
 static struct attribute *serdev_device_attrs[] = {
 	&dev_attr_modalias.attr,
-- 
2.17.0

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

* Re: [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias)
  2018-04-27  3:33 [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias) David Lechner
@ 2018-04-27  7:07 ` Greg Kroah-Hartman
  2018-04-27 19:46   ` David Lechner
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-27  7:07 UTC (permalink / raw)
  To: David Lechner; +Cc: stable, Hans de Goede, Johan Hovold, Sebastian Reichel

On Thu, Apr 26, 2018 at 10:33:58PM -0500, David Lechner wrote:
> This fixes the compile error "multiple definition of `dev_attr_modalias'"
> by adding the static modifier to DEVICE_ATTR_RO(modalias).
> 
> This change was made in the mainline kernel in 2460942f51f1 ("serdev: do
> not generate modaliases for controllers") along with some other changes.
> 
> Fixes: 4fe99816a1ab ("tty: serdev: use dev_groups and not dev_attrs for bus_type")
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: <stable@vger.kernel.org> # 4.14.x
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
> 
> Should we pick up the patch 2460942f51f1 ("serdev: do not generate modaliases
> for controllers") for stable or is this patch good enough?
> 
>  drivers/tty/serdev/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index 97db76afced2..25298b7b2419 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -276,7 +276,7 @@ static ssize_t modalias_show(struct device *dev,
>  {
>  	return of_device_modalias(dev, buf, PAGE_SIZE);
>  }
> -DEVICE_ATTR_RO(modalias);
> +static DEVICE_ATTR_RO(modalias);
>  
>  static struct attribute *serdev_device_attrs[] = {
>  	&dev_attr_modalias.attr,

This patch implies that there is also another "global" modalias variable
somewhere in the system, right?  Where is that one being defined?

And I do like to keep original commits for stable trees, but this one
might be ok here, if we figure out what this is conflicting with.

thanks,

greg k-h

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

* Re: [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias)
  2018-04-27  7:07 ` Greg Kroah-Hartman
@ 2018-04-27 19:46   ` David Lechner
  2018-04-28  4:49     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: David Lechner @ 2018-04-27 19:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: stable, Hans de Goede, Johan Hovold, Sebastian Reichel

On 04/27/2018 02:07 AM, Greg Kroah-Hartman wrote:
> On Thu, Apr 26, 2018 at 10:33:58PM -0500, David Lechner wrote:
>> This fixes the compile error "multiple definition of `dev_attr_modalias'"
>> by adding the static modifier to DEVICE_ATTR_RO(modalias).
>>
>> This change was made in the mainline kernel in 2460942f51f1 ("serdev: do
>> not generate modaliases for controllers") along with some other changes.
>>
>> Fixes: 4fe99816a1ab ("tty: serdev: use dev_groups and not dev_attrs for bus_type")
>> Cc: Hans de Goede <hdegoede@redhat.com>
>> Cc: Johan Hovold <johan@kernel.org>
>> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: <stable@vger.kernel.org> # 4.14.x
>> Signed-off-by: David Lechner <david@lechnology.com>
>> ---
>>
>> Should we pick up the patch 2460942f51f1 ("serdev: do not generate modaliases
>> for controllers") for stable or is this patch good enough?
>>
>>   drivers/tty/serdev/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
>> index 97db76afced2..25298b7b2419 100644
>> --- a/drivers/tty/serdev/core.c
>> +++ b/drivers/tty/serdev/core.c
>> @@ -276,7 +276,7 @@ static ssize_t modalias_show(struct device *dev,
>>   {
>>   	return of_device_modalias(dev, buf, PAGE_SIZE);
>>   }
>> -DEVICE_ATTR_RO(modalias);
>> +static DEVICE_ATTR_RO(modalias);
>>   
>>   static struct attribute *serdev_device_attrs[] = {
>>   	&dev_attr_modalias.attr,
> 
> This patch implies that there is also another "global" modalias variable
> somewhere in the system, right?  Where is that one being defined?

It is in an out-of-tree driver I am using.

> 
> And I do like to keep original commits for stable trees, but this one
> might be ok here, if we figure out what this is conflicting with.
> 
> thanks,
> 
> greg k-h
> 

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

* Re: [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias)
  2018-04-27 19:46   ` David Lechner
@ 2018-04-28  4:49     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-28  4:49 UTC (permalink / raw)
  To: David Lechner; +Cc: stable, Hans de Goede, Johan Hovold, Sebastian Reichel

On Fri, Apr 27, 2018 at 02:46:15PM -0500, David Lechner wrote:
> On 04/27/2018 02:07 AM, Greg Kroah-Hartman wrote:
> > On Thu, Apr 26, 2018 at 10:33:58PM -0500, David Lechner wrote:
> > > This fixes the compile error "multiple definition of `dev_attr_modalias'"
> > > by adding the static modifier to DEVICE_ATTR_RO(modalias).
> > > 
> > > This change was made in the mainline kernel in 2460942f51f1 ("serdev: do
> > > not generate modaliases for controllers") along with some other changes.
> > > 
> > > Fixes: 4fe99816a1ab ("tty: serdev: use dev_groups and not dev_attrs for bus_type")
> > > Cc: Hans de Goede <hdegoede@redhat.com>
> > > Cc: Johan Hovold <johan@kernel.org>
> > > Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: <stable@vger.kernel.org> # 4.14.x
> > > Signed-off-by: David Lechner <david@lechnology.com>
> > > ---
> > > 
> > > Should we pick up the patch 2460942f51f1 ("serdev: do not generate modaliases
> > > for controllers") for stable or is this patch good enough?
> > > 
> > >   drivers/tty/serdev/core.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> > > index 97db76afced2..25298b7b2419 100644
> > > --- a/drivers/tty/serdev/core.c
> > > +++ b/drivers/tty/serdev/core.c
> > > @@ -276,7 +276,7 @@ static ssize_t modalias_show(struct device *dev,
> > >   {
> > >   	return of_device_modalias(dev, buf, PAGE_SIZE);
> > >   }
> > > -DEVICE_ATTR_RO(modalias);
> > > +static DEVICE_ATTR_RO(modalias);
> > >   static struct attribute *serdev_device_attrs[] = {
> > >   	&dev_attr_modalias.attr,
> > 
> > This patch implies that there is also another "global" modalias variable
> > somewhere in the system, right?  Where is that one being defined?
> 
> It is in an out-of-tree driver I am using.

Then please fix that obviously broken out-of-tree driver :)

good luck!

greg k-h

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

end of thread, other threads:[~2018-04-28  4:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27  3:33 [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias) David Lechner
2018-04-27  7:07 ` Greg Kroah-Hartman
2018-04-27 19:46   ` David Lechner
2018-04-28  4:49     ` Greg Kroah-Hartman

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.