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: <d52861ee-26a3-4673-8aae-9859d435f817@kernel.org>
Date: Fri, 9 Aug 2024 07:57:05 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: 郑豪威 <zhenghaowei@...ngson.cn>,
 gregkh@...uxfoundation.org, jirislaby@...nel.org, robh@...nel.org,
 krzk+dt@...nel.org, conor+dt@...nel.org, chenhuacai@...nel.org,
 kernel@...0n.name, p.zabel@...gutronix.de
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, loongarch@...ts.linux.dev
Subject: Re: [PATCH v2 2/3] tty: serial: 8250: Add loongson uart driver
 support

On 07/08/2024 10:24, 郑豪威 wrote:
>>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> +	if (!res)
>>> +		return -ENODEV;
>>> +
>>> +	port->membase = devm_ioremap(&pdev->dev, res->start, resource_size(res));
>>> +	if (!port->membase)
>>> +		return -ENOMEM;
>>> +
>> Use wrapper combining both calls.
> 
> I got it, did you mean like this?
> 
> +    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +    if (!res)
> +        return -ENODEV;
> +
> +    port->mapbase = res->start;
> +    port->mapsize = resource_size(res);
> +
> +    port->membase = devm_ioremap(&pdev->dev, port->mapbase, port->mapsize);
> +    if (!port->membase)
>   +       return -ENOMEM;

I still see two calls, so how are they combined? Just open any other
file and see how it is done there.


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ