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] [day] [month] [year] [list]
Message-Id: <HBN8YQ.GODLCGECPCT01@crapouillou.net>
Date:   Sun, 22 Aug 2021 12:16:29 +0100
From:   Paul Cercueil <paul@...pouillou.net>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     gregkh@...uxfoundation.org, jirislaby@...nel.org,
        ldewangan@...dia.com, thierry.reding@...il.com,
        jonathanh@...dia.com, linux@...sktech.co.nz,
        linux-mips@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: Re: [PATCH 1/3] serial: 8250_ingenic: Use of_device_get_match_data

Hi,

Le dim., août 22 2021 at 11:28:04 +0800, Tang Bin 
<tangbin@...s.chinamobile.com> a écrit :
> Retrieve OF match data, it's better and cleaner to use
> 'of_device_get_match_data' over 'of_match_device'.
> 
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>

Acked-by: Paul Cercueil <paul@...pouillou.net>

Cheers,
-Paul

> ---
>  drivers/tty/serial/8250/8250_ingenic.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_ingenic.c 
> b/drivers/tty/serial/8250/8250_ingenic.c
> index 988bf6bcc..65402d05e 100644
> --- a/drivers/tty/serial/8250/8250_ingenic.c
> +++ b/drivers/tty/serial/8250/8250_ingenic.c
> @@ -209,16 +209,14 @@ static int ingenic_uart_probe(struct 
> platform_device *pdev)
>  	struct uart_8250_port uart = {};
>  	struct ingenic_uart_data *data;
>  	const struct ingenic_uart_config *cdata;
> -	const struct of_device_id *match;
>  	struct resource *regs;
>  	int irq, err, line;
> 
> -	match = of_match_device(of_match, &pdev->dev);
> -	if (!match) {
> +	cdata = of_device_get_match_data(&pdev->dev);
> +	if (!cdata) {
>  		dev_err(&pdev->dev, "Error: No device match found\n");
>  		return -ENODEV;
>  	}
> -	cdata = match->data;
> 
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0)
> --
> 2.20.1.windows.1
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ