All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-mtd@lists.infradead.org, kernel@pengutronix.de,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/10] allow mxc_nand to be probed via device tree
Date: Sun, 29 Apr 2012 11:27:01 +0200	[thread overview]
Message-ID: <20120429092701.GS20039@pengutronix.de> (raw)
In-Reply-To: <1335615654.1937.20.camel@koala>

Hello Artem,

On Sat, Apr 28, 2012 at 03:20:54PM +0300, Artem Bityutskiy wrote:
> On Mon, 2012-04-23 at 11:22 +0200, Uwe Kleine-König wrote:
> > Hello,
> > 
> > this series aims to be able to probe mxc_nand devices via device tree.
> > Most of its patches reorganize the driver to only use cpu_is_mxYZ for
> > the case that the device is not probed via device tree.
> > 
> > I split this conversion in several patches to allow easier review. IMHO
> > it makes sense to keep this splitting for an eventual bisection.
> > 
> > This is tested on an i.MX27 based machine and works fine including
> > passing of partition data.
> 
> Applied all 11 patches from your git tree to l2-mtd.git. Note, you have
> one checkpatch.pl warning:
> 
> WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
> #69: FILE: drivers/mtd/nand/mxc_nand.c:274:
> +static const char *part_probes[] = { "RedBoot", "cmdlinepart", "ofpart", NULL };
I noticed that, too. This is not new though and as
mtd_device_parse_register takes a const char **types applying
checkpatch's advice would yield another warning. But probably fixing
both would work. I wouldn't address this as part of this series.

> Also there are still several sparse warnings, e.g.
> 
> +drivers/mtd/nand/mxc_nand.c:1249:26: warning: incorrect type in initializer (different modifiers) [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    expected void *data [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    got struct mxc_nand_devtype_data static const [toplevel] *<noident> [sparse]
> 
> And you added few gcc warnings, e.g.:
> 
> +drivers/mtd/nand/mxc_nand.c:1252:3: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This is the same problem, i.e. casting away several consts. Hmm, and for
me neither gcc nor sparse provide that warning but I wonder why. At some
point I saw this warning, so I sent a patch:

http://mid.gmane.org/1335171381-24869-1-git-send-email-u.kleine-koenig@pengutronix.de

(I developed my series on top of that and rebased on linus/master for
posting.) Sparse only tells me:

	include/asm-generic/bitops/ffs.h:19:23: warning: right shift by bigger than source value

(using gcc 4.3.2 and sparse (from Debian) 0.4.3+20110419-1)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] allow mxc_nand to be probed via device tree
Date: Sun, 29 Apr 2012 11:27:01 +0200	[thread overview]
Message-ID: <20120429092701.GS20039@pengutronix.de> (raw)
In-Reply-To: <1335615654.1937.20.camel@koala>

Hello Artem,

On Sat, Apr 28, 2012 at 03:20:54PM +0300, Artem Bityutskiy wrote:
> On Mon, 2012-04-23 at 11:22 +0200, Uwe Kleine-K?nig wrote:
> > Hello,
> > 
> > this series aims to be able to probe mxc_nand devices via device tree.
> > Most of its patches reorganize the driver to only use cpu_is_mxYZ for
> > the case that the device is not probed via device tree.
> > 
> > I split this conversion in several patches to allow easier review. IMHO
> > it makes sense to keep this splitting for an eventual bisection.
> > 
> > This is tested on an i.MX27 based machine and works fine including
> > passing of partition data.
> 
> Applied all 11 patches from your git tree to l2-mtd.git. Note, you have
> one checkpatch.pl warning:
> 
> WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
> #69: FILE: drivers/mtd/nand/mxc_nand.c:274:
> +static const char *part_probes[] = { "RedBoot", "cmdlinepart", "ofpart", NULL };
I noticed that, too. This is not new though and as
mtd_device_parse_register takes a const char **types applying
checkpatch's advice would yield another warning. But probably fixing
both would work. I wouldn't address this as part of this series.

> Also there are still several sparse warnings, e.g.
> 
> +drivers/mtd/nand/mxc_nand.c:1249:26: warning: incorrect type in initializer (different modifiers) [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    expected void *data [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    got struct mxc_nand_devtype_data static const [toplevel] *<noident> [sparse]
> 
> And you added few gcc warnings, e.g.:
> 
> +drivers/mtd/nand/mxc_nand.c:1252:3: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This is the same problem, i.e. casting away several consts. Hmm, and for
me neither gcc nor sparse provide that warning but I wonder why. At some
point I saw this warning, so I sent a patch:

http://mid.gmane.org/1335171381-24869-1-git-send-email-u.kleine-koenig at pengutronix.de

(I developed my series on top of that and rebased on linus/master for
posting.) Sparse only tells me:

	include/asm-generic/bitops/ffs.h:19:23: warning: right shift by bigger than source value

(using gcc 4.3.2 and sparse (from Debian) 0.4.3+20110419-1)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Artem Bityutskiy <dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 00/10] allow mxc_nand to be probed via device tree
Date: Sun, 29 Apr 2012 11:27:01 +0200	[thread overview]
Message-ID: <20120429092701.GS20039@pengutronix.de> (raw)
In-Reply-To: <1335615654.1937.20.camel@koala>

Hello Artem,

On Sat, Apr 28, 2012 at 03:20:54PM +0300, Artem Bityutskiy wrote:
> On Mon, 2012-04-23 at 11:22 +0200, Uwe Kleine-König wrote:
> > Hello,
> > 
> > this series aims to be able to probe mxc_nand devices via device tree.
> > Most of its patches reorganize the driver to only use cpu_is_mxYZ for
> > the case that the device is not probed via device tree.
> > 
> > I split this conversion in several patches to allow easier review. IMHO
> > it makes sense to keep this splitting for an eventual bisection.
> > 
> > This is tested on an i.MX27 based machine and works fine including
> > passing of partition data.
> 
> Applied all 11 patches from your git tree to l2-mtd.git. Note, you have
> one checkpatch.pl warning:
> 
> WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
> #69: FILE: drivers/mtd/nand/mxc_nand.c:274:
> +static const char *part_probes[] = { "RedBoot", "cmdlinepart", "ofpart", NULL };
I noticed that, too. This is not new though and as
mtd_device_parse_register takes a const char **types applying
checkpatch's advice would yield another warning. But probably fixing
both would work. I wouldn't address this as part of this series.

> Also there are still several sparse warnings, e.g.
> 
> +drivers/mtd/nand/mxc_nand.c:1249:26: warning: incorrect type in initializer (different modifiers) [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    expected void *data [sparse]
> +drivers/mtd/nand/mxc_nand.c:1249:26:    got struct mxc_nand_devtype_data static const [toplevel] *<noident> [sparse]
> 
> And you added few gcc warnings, e.g.:
> 
> +drivers/mtd/nand/mxc_nand.c:1252:3: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This is the same problem, i.e. casting away several consts. Hmm, and for
me neither gcc nor sparse provide that warning but I wonder why. At some
point I saw this warning, so I sent a patch:

http://mid.gmane.org/1335171381-24869-1-git-send-email-u.kleine-koenig@pengutronix.de

(I developed my series on top of that and rebased on linus/master for
posting.) Sparse only tells me:

	include/asm-generic/bitops/ffs.h:19:23: warning: right shift by bigger than source value

(using gcc 4.3.2 and sparse (from Debian) 0.4.3+20110419-1)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2012-04-29  9:27 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  9:22 [PATCH 00/10] allow mxc_nand to be probed via device tree Uwe Kleine-König
2012-04-23  9:22 ` Uwe Kleine-König
2012-04-23  9:22 ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 01/10] mtd: mxc_nand: set owner field to prevent module unloading when in use Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 02/10] mtd: mxc_nand: use a flag to detect if the mx21 quirk is necessary Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 03/10] mtd: mxc_nand: move function pointers to a per-SOC struct Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-24  7:24   ` Sascha Hauer
2012-04-24  7:24     ` Sascha Hauer
2012-04-24  7:24     ` Sascha Hauer
2012-04-24  8:10     ` Uwe Kleine-König
2012-04-24  8:10       ` Uwe Kleine-König
2012-04-24  8:10       ` Uwe Kleine-König
2012-04-24  8:12       ` [PATCH] mtd: mxc_nand: fix several sparse warnings about incorrect address space Uwe Kleine-König
2012-04-24  8:12         ` Uwe Kleine-König
2012-04-24  8:12         ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 04/10] mtd: mxc_nand: split some functions to get rid of more nfc_is_vX() Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 05/10] mtd: mxc_nand: put ecc layout into devtype structs Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 06/10] mtd: mxc_nand: split chip_select function and put it into devtype struct Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 07/10] mtd: mxc_nand: put callback for data correction " Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 08/10] mtd: mxc_nand: put several more fields into devtype_data Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 09/10] mtd: mxc_nand: implement device tree probing Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23 ` [PATCH 10/10] ARM: imx: add mxc_nand to imx27 device tree Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-23  9:23   ` Uwe Kleine-König
2012-04-28 12:20 ` [PATCH 00/10] allow mxc_nand to be probed via " Artem Bityutskiy
2012-04-28 12:20   ` Artem Bityutskiy
2012-04-28 12:20   ` Artem Bityutskiy
2012-04-29  9:27   ` Uwe Kleine-König [this message]
2012-04-29  9:27     ` Uwe Kleine-König
2012-04-29  9:27     ` Uwe Kleine-König
2012-04-29 11:10     ` Artem Bityutskiy
2012-04-29 11:10       ` Artem Bityutskiy
2012-04-29 11:10       ` Artem Bityutskiy

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=20120429092701.GS20039@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=dedekind1@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /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.