From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD58553800 for ; Tue, 23 Apr 2024 23:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713916749; cv=none; b=P0p0+dluThuNZtkOuC3B5t06SZt6pU9OyQcyzi6OJWpAwlElRmi3KBhpgnw41cnudAALHFBIi7LQT8LCvsozX0K2LRaEvmLWCuDuFJcnhH974RUrure6ysgRVYNZQJmWRtd6GbxDwj1Mcn85FvfDVpd8ESV3R2Q3kJL0nG7J5Po= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713916749; c=relaxed/simple; bh=v5HpaNzjnS+nzagCgPnhRXGNmlFHAWypeXId0ro+rLs=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ow8hSuiRg7R+YYwHZStA6ALyqcCnzM7PgH9D/HpXvJbY/Pdk1b0g+Dtd1uttJz9UNK0W1C0HRvVHOpZpa0/vLlbh2dhUE6eOD91dUEQLiDSL4W/tmRN96lrOk3lVay6dw2UXFpilZxUrg6T9gt6NEH7W3N+x3dvbMKnbeHO6UkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-25-208.elisa-laajakaista.fi [88.113.25.208]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 772b339a-01cd-11ef-b972-005056bdfda7; Wed, 24 Apr 2024 02:59:05 +0300 (EEST) From: Andy Shevchenko Date: Wed, 24 Apr 2024 02:59:04 +0300 To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , "open list:SYNOPSYS DESIGNWARE I2C DRIVER" , "open list:WANGXUN ETHERNET DRIVER" Subject: Re: [PATCH 1/4] i2c: designware: Create shared header hosting driver name Message-ID: References: <20240423233622.1494708-1-florian.fainelli@broadcom.com> <20240423233622.1494708-2-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240423233622.1494708-2-florian.fainelli@broadcom.com> Tue, Apr 23, 2024 at 04:36:19PM -0700, Florian Fainelli kirjoitti: > We have a number of drivers that reference the string "i2c_designware" > yet this is copied all over the places with opportunities for this > string being mis-used. Create a shared header that defines this as a > constant that other drivers can reference. ... > #include > +#include Can it be hidden in the subfolder? ... > -#define DRIVER_NAME "i2c-designware-pci" > +#define DRIVER_NAME I2C_DESIGNWARE_NAME "-pci" Oh, this makes all the things hard to read. > /* Work with hotplug and coldplug */ > -MODULE_ALIAS("i2c_designware-pci"); > +MODULE_ALIAS(DRIVER_NAME); I believe we shouldn't use MODULE_ALIAS() without real justification. ... > --- a/drivers/i2c/busses/i2c-designware-platdrv.c > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c All as per above. -- With Best Regards, Andy Shevchenko