All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Colin King <colin.king@canonical.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] mtd: rawnand: ensure return variable is initialized
Date: Tue, 8 Jun 2021 09:10:18 +0300	[thread overview]
Message-ID: <20210608061018.GY1955@kadam> (raw)
In-Reply-To: <20210607085711.65c64c58@xps13>

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


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Colin King <colin.king@canonical.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] mtd: rawnand: ensure return variable is initialized
Date: Tue, 8 Jun 2021 09:10:18 +0300	[thread overview]
Message-ID: <20210608061018.GY1955@kadam> (raw)
In-Reply-To: <20210607085711.65c64c58@xps13>

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


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

  reply	other threads:[~2021-06-08  6:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 14:50 [PATCH][next] mtd: rawnand: ensure return variable is initialized Colin King
2021-05-27 14:50 ` Colin King
2021-05-27 15:03 ` Miquel Raynal
2021-05-27 15:03   ` Miquel Raynal
2021-05-27 15:22   ` Colin Ian King
2021-05-27 15:22     ` Colin Ian King
2021-06-01 12:14   ` Dan Carpenter
2021-06-01 12:14     ` Dan Carpenter
2021-06-01 12:58     ` Dan Carpenter
2021-06-01 12:58       ` Dan Carpenter
2021-06-07  6:57     ` Miquel Raynal
2021-06-07  6:57       ` Miquel Raynal
2021-06-08  6:10       ` Dan Carpenter [this message]
2021-06-08  6:10         ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608061018.GY1955@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.