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: <60b87f6c-29ee-4ed8-a78d-3ef632aa0655@app.fastmail.com>
Date:   Mon, 24 Apr 2023 11:47:15 +0200
From:   "Arnd Bergmann" <arnd@...nel.org>
To:     "Nikita Shubin" <nikita.shubin@...uefel.me>
Cc:     "Linus Walleij" <linusw@...nel.org>,
        "Alexander Sverdlin" <alexander.sverdlin@...il.com>,
        "Alessandro Zummo" <a.zummo@...ertech.it>,
        "Alexandre Belloni" <alexandre.belloni@...tlin.com>,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 29/43] rtc: m48t86: add DT support for m48t86

On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> - get regs from device tree
>
> Signed-off-by: Nikita Shubin <nikita.shubin@...uefel.me>

Acked-by: Arnd Bergmann <arnd@...db.de>

> 
> +#ifdef CONFIG_OF
> +static const struct of_device_id m48t86_rtc_of_ids[] = {
> +	{ .compatible = "dallas,rtc-m48t86" },
> +	{ /* end of table */ },
> +};
> +MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
> +#endif
> +
>  static struct platform_driver m48t86_rtc_platform_driver = {
>  	.driver		= {
>  		.name	= "rtc-m48t86",
> +		.of_match_table = of_match_ptr(m48t86_rtc_of_ids),
>  	},
>  	.probe		= m48t86_rtc_probe,

If you end up doing another revision, I'd suggest you drop the
of_match_ptr() and the #ifdef: there is no point in saving a
few bytes of space for non-DT kernel builds if both the machines
that use this device always rquire CONFIG_OF to be enabled.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ