lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] mtd: rawnand: ensure return variable is initialized
On Mon, Jun 07, 2021 at 08:57:11AM +0200, Miquel Raynal wrote:
>
> In the ONFI specification, the sdr_timing_mode field is defined as
> follow:
>
> SDR timing mode support
> BIT VALUE MEANING
> 6-15 N/A Reserved (0)
> 5 1 supports timing mode 5
> 4 1 supports timing mode 4
> 3 1 supports timing mode 3
> 2 1 supports timing mode 2
> 1 1 supports timing mode 1
> 0 1 supports timing mode 0, shall be 1
>
> IOW sdr_timing_modes *cannot* be 0, or it is a truly deep and crazily
> impacting hardware bug (so far I am not aware of any chip not returning
> the right timing mode 0 value). Hence my proposal to turn best_mode as
> unsigned. I honestly don't know what is the best option here and am
> fully open to other suggestions to silence the robot.

If the hardware is broken we should just return -EINVAL.

regards,
dan carpenter

\
 
 \ /
  Last update: 2021-06-08 08:11    [W:0.523 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site