2009-04-18 06:29:17

by KOSAKI Motohiro

[permalink] [raw]
Subject: Re: + mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char.patch added to -mm tree

> Signed-off-by: Denis V. Lunev <[email protected]>
> Cc: David Woodhouse <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
>
> drivers/mtd/mtdcore.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff -puN drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char drivers/mtd/mtdcore.c
> --- a/drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char
> +++ a/drivers/mtd/mtdcore.c
> @@ -48,11 +48,11 @@ static LIST_HEAD(mtd_notifiers);
> */
> static void mtd_release(struct device *dev)
> {
> - struct mtd_info *mtd = dev_to_mtd(dev);
> + dev_t index = MTD_DEVT(dev_to_mtd(dev));
>
> /* remove /dev/mtdXro node if needed */
> - if (MTD_DEVT(mtd->index))
> - device_destroy(mtd_class, MTD_DEVT(mtd->index) + 1);
> + if (index)
> + device_destroy(mtd_class, index + 1);
> }

I get compile failure problem on mmotm-0414.

=====================
mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char.patch remove one
warnig if CONFIG_MTD_CHAR=n.

but it introduce one compile error if CONFIG_MTD_CHAR=y/m.

drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:51: error: invalid operands to binary * (have ‘struct mtd_info *’ and ‘int’)



Signed-off-by: KOSAKI Motohiro <[email protected]>
Cc: Denis V. Lunev <[email protected]>
Cc: David Woodhouse <[email protected]>
---
drivers/mtd/mtdcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/mtd/mtdcore.c
===================================================================
--- a/drivers/mtd/mtdcore.c 2009-04-16 21:43:18.000000000 +0900
+++ b/drivers/mtd/mtdcore.c 2009-04-16 21:44:23.000000000 +0900
@@ -48,7 +48,7 @@ static LIST_HEAD(mtd_notifiers);
*/
static void mtd_release(struct device *dev)
{
- dev_t index = MTD_DEVT(dev_to_mtd(dev));
+ dev_t index = MTD_DEVT(dev_to_mtd(dev)->index);

/* remove /dev/mtdXro node if needed */
if (index)



2009-04-18 15:57:25

by Denis V. Lunev

[permalink] [raw]
Subject: Re: + mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char.patch added to -mm tree

already fixed by Andrew by
mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix

> ------------------------------------------------------
> Subject: mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix
> From: Andrew Morton <[email protected]>
>
> Cc: David Woodhouse <[email protected]>
> Cc: Denis V. Lunev <[email protected]>
> Cc: Randy Dunlap <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
>
> drivers/mtd/mtdcore.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN
drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix drivers/mtd/mtdcore.c
> ---
a/drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix
> +++ a/drivers/mtd/mtdcore.c
> @@ -48,7 +48,7 @@ static LIST_HEAD(mtd_notifiers);
> */
> static void mtd_release(struct device *dev)
> {
> - dev_t index = MTD_DEVT(dev_to_mtd(dev));
> + dev_t index = MTD_DEVT(dev_to_mtd(dev)->index);
>
> /* remove /dev/mtdXro node if needed */
> if (index)

2009-04-19 12:41:00

by KOSAKI Motohiro

[permalink] [raw]
Subject: Re: + mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char.patch added to -mm tree

> already fixed by Andrew by
> mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix

Oh, thanks.

- kosaki

>
> > ------------------------------------------------------
> > Subject: mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix
> > From: Andrew Morton <[email protected]>
> >
> > Cc: David Woodhouse <[email protected]>
> > Cc: Denis V. Lunev <[email protected]>
> > Cc: Randy Dunlap <[email protected]>
> > Signed-off-by: Andrew Morton <[email protected]>
> > ---
> >
> > drivers/mtd/mtdcore.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff -puN
> drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix drivers/mtd/mtdcore.c
> > ---
> a/drivers/mtd/mtdcore.c~mtd-mtd-in-mtd_release-is-unused-without-config_mtd_char-fix
> > +++ a/drivers/mtd/mtdcore.c
> > @@ -48,7 +48,7 @@ static LIST_HEAD(mtd_notifiers);
> > */
> > static void mtd_release(struct device *dev)
> > {
> > - dev_t index = MTD_DEVT(dev_to_mtd(dev));
> > + dev_t index = MTD_DEVT(dev_to_mtd(dev)->index);
> >
> > /* remove /dev/mtdXro node if needed */
> > if (index)
>