Re: [PATCH v4 01/19] mtd: rawnand: Use unsigned types for nand_chip unsigned values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 25 May 2020 19:42:21 +0200
Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:

> page_shift, phys_erase_shift, bbt_erase_shift, chip_shift, pagemask,
> subpagesize and badblockbits are all positive values, so declare
> them as unsigned.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Reviewed-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>

though patching code to get rid of those fields (in favor of
nanddev_xxx() calls) would be much more valuable IMHO.

> ---
>  include/linux/mtd/rawnand.h | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
> index 2804c13e5662..8a1e0192f78e 100644
> --- a/include/linux/mtd/rawnand.h
> +++ b/include/linux/mtd/rawnand.h
> @@ -1110,11 +1110,11 @@ struct nand_chip {
>  	unsigned int options;
>  	unsigned int bbt_options;
>  
> -	int page_shift;
> -	int phys_erase_shift;
> -	int bbt_erase_shift;
> -	int chip_shift;
> -	int pagemask;
> +	unsigned int page_shift;
> +	unsigned int phys_erase_shift;
> +	unsigned int bbt_erase_shift;
> +	unsigned int chip_shift;
> +	unsigned int pagemask;
>  	u8 *data_buf;
>  
>  	struct {
> @@ -1122,10 +1122,10 @@ struct nand_chip {
>  		int page;
>  	} pagecache;
>  
> -	int subpagesize;
> +	unsigned int subpagesize;
>  	int onfi_timing_mode_default;
>  	unsigned int badblockpos;
> -	int badblockbits;
> +	unsigned int badblockbits;
>  
>  	struct nand_id id;
>  	struct nand_parameters parameters;


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux