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: <ae6b9e16-7036-ed23-1fd8-9b10627a8737@gmail.com>
Date:   Tue, 3 Aug 2021 21:47:09 +0200
From:   Maximilian Luz <luzmaximilian@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Lee Jones <lee.jones@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
        platform-driver-x86@...r.kernel.org, linux-serial@...r.kernel.org
Cc:     Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Luiz Augusto von Dentz <luiz.dentz@...il.com>,
        Mark Gross <mgross@...ux.intel.com>,
        Rob Herring <robh@...nel.org>,
        Jiri Slaby <jirislaby@...nel.org>
Subject: Re: [PATCH v1 2/5] platform/surface: aggregator: Use
 serdev_acpi_get_uart_resource() helper

On 8/3/21 9:29 PM, Andy Shevchenko wrote:
> serdev provides a generic helper to get UART Serial Bus resources.
> Use it instead of open coded variant.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks! Looks good to me.

Reviewed-by: Maximilian Luz <luzmaximilian@...il.com>

> ---
>   drivers/platform/surface/aggregator/core.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/platform/surface/aggregator/core.c b/drivers/platform/surface/aggregator/core.c
> index 279d9df19c01..c61bbeeec2df 100644
> --- a/drivers/platform/surface/aggregator/core.c
> +++ b/drivers/platform/surface/aggregator/core.c
> @@ -301,20 +301,13 @@ static acpi_status ssam_serdev_setup_via_acpi_crs(struct acpi_resource *rsc,
>   						  void *ctx)
>   {
>   	struct serdev_device *serdev = ctx;
> -	struct acpi_resource_common_serialbus *serial;
>   	struct acpi_resource_uart_serialbus *uart;
>   	bool flow_control;
>   	int status = 0;
>   
> -	if (rsc->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
> +	if (!serdev_acpi_get_uart_resource(rsc, &uart))
>   		return AE_OK;
>   
> -	serial = &rsc->data.common_serial_bus;
> -	if (serial->type != ACPI_RESOURCE_SERIAL_TYPE_UART)
> -		return AE_OK;
> -
> -	uart = &rsc->data.uart_serial_bus;
> -
>   	/* Set up serdev device. */
>   	serdev_device_set_baudrate(serdev, uart->default_baud_rate);
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ