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: <f52deaf1-492e-4cbe-8e46-8999ae2e481f@roeck-us.net>
Date: Wed, 18 Sep 2024 15:43:40 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Andreas Kemnade <andreas@...nade.info>, wim@...ux-watchdog.org,
 linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: rn5t618: use proper module tables

On 9/18/24 14:29, Andreas Kemnade wrote:
> Avoid requiring MODULE_ALIASES by declaring proper device id tables.
> 
> Signed-off-by: Andreas Kemnade <andreas@...nade.info>

This needs a better rationale. There are more than 40 watchdog drivers
using MODULE_ALIAS. I would hate having to deal with 40+ patches just
for cosmetic reasons, not counting the thousands of instances of
MODULE_ALIAS in the kernel, including the more than 1,000 instances of
"MODULE_ALIAS.*platform:".

Guenter

> ---
>   drivers/watchdog/rn5t618_wdt.c | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c
> index 87d06d210ac9..97ef54f01ed9 100644
> --- a/drivers/watchdog/rn5t618_wdt.c
> +++ b/drivers/watchdog/rn5t618_wdt.c
> @@ -8,6 +8,7 @@
>   #include <linux/device.h>
>   #include <linux/mfd/rn5t618.h>
>   #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>   #include <linux/platform_device.h>
>   #include <linux/watchdog.h>
>   
> @@ -181,16 +182,25 @@ static int rn5t618_wdt_probe(struct platform_device *pdev)
>   	return devm_watchdog_register_device(dev, &wdt->wdt_dev);
>   }
>   
> +static const struct platform_device_id rn5t618_wdt_id[] = {
> +	{
> +		.name = "rn5t618-wdt",
> +	}, {
> +		/* sentinel */
> +	}
> +};
> +MODULE_DEVICE_TABLE(platform, rn5t618_wdt_id);
> +
>   static struct platform_driver rn5t618_wdt_driver = {
>   	.probe = rn5t618_wdt_probe,
>   	.driver = {
>   		.name	= DRIVER_NAME,
>   	},
> +	.id_table = rn5t618_wdt_id,
>   };
>   
>   module_platform_driver(rn5t618_wdt_driver);
>   
> -MODULE_ALIAS("platform:rn5t618-wdt");
>   MODULE_AUTHOR("Beniamino Galvani <b.galvani@...il.com>");
>   MODULE_DESCRIPTION("RN5T618 watchdog driver");
>   MODULE_LICENSE("GPL v2");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ