lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZiokyEXqMTAs_M7M@smile.fi.intel.com>
Date: Thu, 25 Apr 2024 12:39:20 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: linux-kernel@...r.kernel.org,
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Jan Dabros <jsd@...ihalf.com>, Andi Shyti <andi.shyti@...nel.org>,
	Lee Jones <lee@...nel.org>, Jiawen Wu <jiawenwu@...stnetic.com>,
	Mengyuan Lou <mengyuanlou@...-swift.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
	Andrew Lunn <andrew@...n.ch>,
	Duanqiang Wen <duanqiangwen@...-swift.com>,
	"open list:SYNOPSYS DESIGNWARE I2C DRIVER" <linux-i2c@...r.kernel.org>,
	"open list:WANGXUN ETHERNET DRIVER" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 1/4] i2c: designware: Create shared header hosting
 driver name

On Wed, Apr 24, 2024 at 05:26:39PM -0700, Florian Fainelli wrote:
> We have a number of drivers that reference the string "i2c_designware"
> towards two goals:
> 
> - ensure their device gets bound to the i2c_designware platform_driver
> - create a clock lookup reference that matches the i2c_designware
>   instance number for the i2c-designware-platdrv.c driver to be able to
>   lookup the input reference clock
> 
> Since this string is copied in a bunch of different places and since it
> is possible to get this named wrong (see [1] and [2]) with unintended
> consequences, create a header file that hosts that define for other
> drivers to use and all agree on the correct name to use.

> [1]:
> https://lore.kernel.org/all/20240422084109.3201-1-duanqiangwen@net-swift.com/
> [2]:
> https://lore.kernel.org/all/20240422084109.3201-2-duanqiangwen@net-swift.com/

Make them tags.

Link: URL#1 [1]
Link: URL#2 [2]

> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>

> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -19,6 +19,7 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/pci.h>

> +#include <linux/platform_data/i2c-designware.h>

Please, make it a separate group after linux/* and before "xxx" below.

>  #include <linux/pm_runtime.h>
>  #include <linux/power_supply.h>
>  #include <linux/sched.h>

...

>  module_pci_driver(dw_i2c_driver);
>  
>  /* Work with hotplug and coldplug */
> -MODULE_ALIAS("i2c_designware-pci");
> +MODULE_ALIAS(I2C_DESIGNWARE_NAME "-pci");

As Jarkko said, please get rid of this.
You may take my patch from here:
https://lore.kernel.org/linux-i2c/20231207141653.2785124-9-andriy.shevchenko@linux.intel.com/
and incorporate in this series.

...

>  #include <linux/mfd/syscon.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/platform_data/i2c-designware.h>

As per above.

>  #include <linux/platform_device.h>
>  #include <linux/pm.h>
>  #include <linux/pm_runtime.h>

...

>  /* Work with hotplug and coldplug */
> -MODULE_ALIAS("platform:i2c_designware");
> +MODULE_ALIAS("platform:" I2C_DESIGNWARE_NAME);

See above.

...

> +/* This is the i2c-designware-platdrv.c platform driver name. This name is used
> + * to bind the device to the driver, as well as by the driver itself to request
> + * the input reference clock
> + */

/*
 * Use correct multi-line comment style. This
 * is not the net subsystem, we use traditional style.
 */

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ