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: <20190310125841.GA4814@pendragon.ideasonboard.com>
Date:   Sun, 10 Mar 2019 14:58:41 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Ulf Hansson <ulf.hansson@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc_spi: add a status check for spi_sync_locked

Hi Kangjie,

Thank you for the patch.

On Sun, Mar 10, 2019 at 01:53:05AM -0600, Kangjie Lu wrote:
> In case spi_sync_locked fails, the fix reports the error and
> returns the error code upstream.
> 
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
>  drivers/mmc/host/mmc_spi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index 1b1498805972..32fea585262b 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -819,6 +819,10 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t,
>  	}
>  
>  	status = spi_sync_locked(spi, &host->m);
> +	if (status < 0) {
> +		dev_dbg(&spi->dev, "read error %02x (%d)\n", status, status);

I don't think you need to print the status in both hex and in decimal
forms. %d should be enough, error codes are usually printed in decimal
in the kernel. Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

> +		return status;
> +	}
>  
>  	if (host->dma_dev) {
>  		dma_sync_single_for_cpu(host->dma_dev,

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ