Return-Path: Received: from mail.kernel.org ([198.145.29.99]:36494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757367AbeD0HIC (ORCPT ); Fri, 27 Apr 2018 03:08:02 -0400 Date: Fri, 27 Apr 2018 09:07:53 +0200 From: Greg Kroah-Hartman To: David Lechner Cc: stable@vger.kernel.org, Hans de Goede , Johan Hovold , Sebastian Reichel Subject: Re: [PATCH] tty: serdev: fix missing static modifier on DEVICE_ATTR_RO(modalias) Message-ID: <20180427070753.GB4931@kroah.com> References: <20180427033358.13167-1-david@lechnology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180427033358.13167-1-david@lechnology.com> Sender: stable-owner@vger.kernel.org List-ID: 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 > Cc: Johan Hovold > Cc: Sebastian Reichel > Cc: Greg Kroah-Hartman > Cc: # 4.14.x > Signed-off-by: David Lechner > --- > > 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