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: <YMN29rIlPDCL0w3A@kroah.com>
Date:   Fri, 11 Jun 2021 16:45:10 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Jiri Prchal <jiri.prchal@...ignal.cz>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Christian Eggers <ceggers@...i.de>,
        Arnd Bergmann <arnd@...db.de>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] nvmem: eeprom: at25: fix type compiler warnings

On Fri, Jun 11, 2021 at 04:27:06PM +0200, Jiri Prchal wrote:
> Fixes:
> drivers/misc/eeprom/at25.c:181:28: warning: field width should have type 'int',
> but argument has type 'unsigned long'
> 
> drivers/misc/eeprom/at25.c:386:13: warning: cast to smaller integer type 'int'
> from 'const void *'
> 
> Signed-off-by: Jiri Prchal <jiri.prchal@...ignal.cz>
> Reported-by: kernel test robot <lkp@...el.com>
> ---
>  drivers/misc/eeprom/at25.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
> index 6e26de68a001..744f7abb22ee 100644
> --- a/drivers/misc/eeprom/at25.c
> +++ b/drivers/misc/eeprom/at25.c
> @@ -178,7 +178,7 @@ static ssize_t sernum_show(struct device *dev, struct device_attribute *attr, ch
>  	struct at25_data *at25;
>  
>  	at25 = dev_get_drvdata(dev);
> -	return sysfs_emit(buf, "%*ph\n", sizeof(at25->sernum), at25->sernum);
> +	return sysfs_emit(buf, "%*ph\n", (int)sizeof(at25->sernum), at25->sernum);
>  }
>  static DEVICE_ATTR_RO(sernum);
>  
> @@ -379,11 +379,11 @@ static int at25_probe(struct spi_device *spi)
>  	u8 sernum[FM25_SN_LEN];
>  	int i;
>  	const struct of_device_id *match;
> -	int is_fram = 0;
> +	unsigned long is_fram = 0;
>  
>  	match = of_match_device(of_match_ptr(at25_of_match), &spi->dev);
>  	if (match)
> -		is_fram = (int)match->data;
> +		is_fram = (unsigned long)match->data;
>  
>  	/* Chip description */
>  	if (!spi->dev.platform_data) {
> -- 
> 2.25.1
> 

Looks good, now queued up.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ