Re: [v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-03 Thread Boris Brezillon
On Mon, 3 Dec 2018 08:51:54 +0100 Boris Brezillon wrote: > On Wed, 2018-11-28 at 08:02:14 UTC, Huijin Park wrote: > > From: "huijin.park" > > > > The "params->size" is defined as "u64". > > And "info->sector_size" and "info->n_sectors" are defined as > > unsigned int and u16. > > Thus, u64

Re: [v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-03 Thread Boris Brezillon
On Mon, 3 Dec 2018 08:51:54 +0100 Boris Brezillon wrote: > On Wed, 2018-11-28 at 08:02:14 UTC, Huijin Park wrote: > > From: "huijin.park" > > > > The "params->size" is defined as "u64". > > And "info->sector_size" and "info->n_sectors" are defined as > > unsigned int and u16. > > Thus, u64

Re: [PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-03 Thread Rafał Miłecki
On Wed, 28 Nov 2018 at 09:03, Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an unsigned int.

Re: [PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-03 Thread Rafał Miłecki
On Wed, 28 Nov 2018 at 09:03, Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an unsigned int.

Re: [v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-02 Thread Boris Brezillon
On Wed, 2018-11-28 at 08:02:14 UTC, Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an

Re: [v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-12-02 Thread Boris Brezillon
On Wed, 2018-11-28 at 08:02:14 UTC, Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an

Re: [PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-11-28 Thread Geert Uytterhoeven
On Wed, Nov 28, 2018 at 9:03 AM Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an unsigned

Re: [PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-11-28 Thread Geert Uytterhoeven
On Wed, Nov 28, 2018 at 9:03 AM Huijin Park wrote: > From: "huijin.park" > > The "params->size" is defined as "u64". > And "info->sector_size" and "info->n_sectors" are defined as > unsigned int and u16. > Thus, u64 data might have strange data(loss data) if the result > overflows an unsigned

[PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-11-28 Thread Huijin Park
From: "huijin.park" The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64.

[PATCH v3] mtd: spi-nor: cast to u64 to avoid uint overflows

2018-11-28 Thread Huijin Park
From: "huijin.park" The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64.