From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933668AbeAIP4I (ORCPT + 1 other); Tue, 9 Jan 2018 10:56:08 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41054 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933579AbeAIP4G (ORCPT ); Tue, 9 Jan 2018 10:56:06 -0500 X-Google-Smtp-Source: ACJfBotmS0DdjhMRDzR13Cna+pOOchJTrp2A//GtJR/KwT4PQa/fgUBR5o8vJPHZusBvZLP+Z9Jryg== Date: Tue, 9 Jan 2018 16:56:02 +0100 From: Johan Hovold To: Greg Kroah-Hartman Cc: Johan Hovold , Rob Herring , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, =?iso-8859-1?Q?Fr=E9d=E9ric?= Danis Subject: Re: [PATCH 1/2] serdev: do not generate modaliases for controllers Message-ID: <20180109155602.GU11344@localhost> References: <20180108124233.26729-1-johan@kernel.org> <20180108124233.26729-2-johan@kernel.org> <20180109154803.GA10213@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180109154803.GA10213@kroah.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 04:48:03PM +0100, Greg Kroah-Hartman wrote: > On Mon, Jan 08, 2018 at 01:42:32PM +0100, Johan Hovold wrote: > > Serdev controllers are not bound to any drivers and it therefore makes > > no sense to generate modaliases for them. > > > > This has already been fixed separately for ACPI controllers for which > > uevent errors were also being logged during probe due to the missing > > ACPI companions (from which ACPI modaliases are generated). > > > > This patch moves the modalias handling from the bus type to the client > > device type. Specifically, this means that only serdev devices (a.k.a. > > clients or slaves) will have have MODALIAS fields in their uevent > > environments and corresponding modalias sysfs attributes. > > > > Reported-by: Hans de Goede > > Signed-off-by: Johan Hovold > > --- > > drivers/tty/serdev/core.c | 72 ++++++++++++++++++++++------------------------- > > 1 file changed, 34 insertions(+), 38 deletions(-) > > > > diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c > > index 5dc88f61f506..61c85e49e178 100644 > > --- a/drivers/tty/serdev/core.c > > +++ b/drivers/tty/serdev/core.c > > @@ -19,6 +19,38 @@ > > static bool is_registered; > > static DEFINE_IDA(ctrl_ida); > > > > +static ssize_t modalias_show(struct device *dev, > > + struct device_attribute *attr, char *buf) > > +{ > > + int len; > > + > > + len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1); > > + if (len != -ENODEV) > > + return len; > > + > > + return of_device_modalias(dev, buf, PAGE_SIZE); > > +} > > +DEVICE_ATTR_RO(modalias); > > static? > > Sorry, minor nit :( Heh, no worries. I didn't notice that as I was just moving code around here, but I'll make sure to add that missing static in a v2. Thanks, Johan