Re: [PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-08-04 Thread Tom Rini
On Sun, Jul 19, 2020 at 10:15:32AM -0600, Simon Glass wrote: > The -ENODEV error value in spi_nor_read_id() is incorrect since there > clearly is a device - it just cannot be supported. Use -ENOMEDIUM instead > which has the virtue of being less common. > > Fix the return value in spi_nor_scan().

Re: [PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-07-30 Thread Vignesh Raghavendra
Hi, On 26/07/20 8:24 pm, Simon Glass wrote: Hi Vignesh, On Mon, 20 Jul 2020 at 00:26, Vignesh Raghavendra wrote: Hi Simon, On 19/07/20 9:45 pm, Simon Glass wrote: The -ENODEV error value in spi_nor_read_id() is incorrect since there clearly is a device - it just cannot be supported. Desc

Re: [PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-07-26 Thread Simon Glass
Hi Vignesh, On Mon, 20 Jul 2020 at 00:26, Vignesh Raghavendra wrote: > > Hi Simon, > > On 19/07/20 9:45 pm, Simon Glass wrote: > > The -ENODEV error value in spi_nor_read_id() is incorrect since there > > clearly is a device - it just cannot be supported. > > Description 's not entirely accurate.

Re: [PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-07-19 Thread Vignesh Raghavendra
Hi Simon, On 19/07/20 9:45 pm, Simon Glass wrote: > The -ENODEV error value in spi_nor_read_id() is incorrect since there > clearly is a device - it just cannot be supported. Description 's not entirely accurate... If there is no flash on the SPI bus, then read ID would return all 0s or 0xFFs de

[PATCH 02/31] mtd: spi-nor: Tidy up error handling / debug code

2020-07-19 Thread Simon Glass
The -ENODEV error value in spi_nor_read_id() is incorrect since there clearly is a device - it just cannot be supported. Use -ENOMEDIUM instead which has the virtue of being less common. Fix the return value in spi_nor_scan(). Also there are a few printf() statements which should be debug() since