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: <ea048751-2a4a-31c9-0b46-849d77356a71@linaro.org>
Date:   Fri, 10 Jan 2020 10:16:03 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Bartosz Golaszewski <brgl@...ev.pl>,
        Linus Walleij <linus.walleij@...aro.org>,
        Khouloud Touil <ktouil@...libre.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH -next] nvmem: fix a 'makes pointer from integer without a
 cast' build warning

Thanks for the patch.

On 10/01/2020 08:24, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> 
> nvmem_register() returns a pointer, not a long int. Use ERR_CAST() to
> cast the struct gpio_desc pointer to struct nvmem_device.
> 
> Reported-by: kbuild test robot <lkp@...el.com>
> Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
> ---

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>

>   drivers/nvmem/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> index 3e1c94c4eee8..408ce702347e 100644
> --- a/drivers/nvmem/core.c
> +++ b/drivers/nvmem/core.c
> @@ -351,7 +351,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>   		nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
>   						    GPIOD_OUT_HIGH);
>   	if (IS_ERR(nvmem->wp_gpio))
> -		return PTR_ERR(nvmem->wp_gpio);
> +		return ERR_CAST(nvmem->wp_gpio);
>   
>   
>   	kref_init(&nvmem->refcnt);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ