public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: "Bean Huo 霍斌斌 (beanhuo)" <beanhuo@micron.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	"shijie8@gmail.com" <shijie8@gmail.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"grmoore@altera.com" <grmoore@altera.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 v2] driver:mtd:spi-nor:fix spi_nor_scan overwrite platform ID point
Date: Wed, 15 Oct 2014 00:45:53 +0200	[thread overview]
Message-ID: <201410150045.53976.marex@denx.de> (raw)
In-Reply-To: <A765B125120D1346A63912DDE6D8B6315E62CB@NTXXIAMBX02.xacn.micron.com>

On Tuesday, October 14, 2014 at 03:26:49 AM, Bean Huo 霍斌斌 (beanhuo) wrote:
[...]

> -			dev_warn(dev, "found %s, expected %s\n",
> -				 jid->name, id->name);
> -			id = jid;
> -			info = (void *)jid->driver_data;
> +			struct flash_info *tmpinfo;
> +
> +			tmpinfo = (void *)jid->driver_data;
> +			if (tmpinfo->jedec_id != info->jedec_id ||
> +					(info->ext_id != 0 &&
> +					 tmpinfo->ext_id != info->ext_id)) {
> +				dev_warn(dev, "found %s, expected %s\n",
> +						jid->name, id->name);
> +				id = jid;
> +				info = (void *)jid->driver_data;
> +			}

Won't $info contain an undefined value in case the newly added condition isn't 
met ? The old code initialized $info to a certain value always, the new code 
does not do that.

Best regards,
Marek Vasut

  reply	other threads:[~2014-10-14 22:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14  1:26 [PATCH 1/1 v2] driver:mtd:spi-nor:fix spi_nor_scan overwrite platform ID point Bean Huo 霍斌斌 (beanhuo)
2014-10-14 22:45 ` Marek Vasut [this message]
2014-10-16  0:52   ` bpqw
2014-10-22  7:06     ` Rafał Miłecki
2014-10-27  8:44       ` bpqw
2014-10-27 14:59         ` Rafał Miłecki
2014-10-16  7:05 ` Rafał Miłecki
2014-10-16  8:00   ` Bean Huo 霍斌斌 (beanhuo)
2014-10-16  8:12     ` Rafał Miłecki
2014-10-16  8:41       ` bpqw
2014-10-16 10:19         ` Rafał Miłecki

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=201410150045.53976.marex@denx.de \
    --to=marex@denx.de \
    --cc=beanhuo@micron.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=geert+renesas@glider.be \
    --cc=grmoore@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shijie8@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox