diff mbox

[U-Boot,v2,1/2] nand: nand torture: follow sync with linux v4.6

Message ID 1465299980-23195-1-git-send-email-max.krummenacher@toradex.com
State Accepted
Commit e1c29086d58f619423f0648748d0678af28f9871
Delegated to: Scott Wood
Headers show

Commit Message

Max Krummenacher June 7, 2016, 11:46 a.m. UTC
follow parameter name change (nand to mtd) to fix compiler error.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>

---

Changes in v2:
- Patch v1 1/1 went into master, but Scott's patch series syncing
  with kernel v4.6 introduced an additional compile time error.

 drivers/mtd/nand/nand_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Scott Wood June 8, 2016, 11:47 p.m. UTC | #1
On 06/07/2016 06:47 AM, Max Krummenacher wrote:
> follow parameter name change (nand to mtd) to fix compiler error.
> 
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> 
> ---
> 
> Changes in v2:
> - Patch v1 1/1 went into master, but Scott's patch series syncing
>   with kernel v4.6 introduced an additional compile time error.
> 
>  drivers/mtd/nand/nand_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
> index 5bba66a..e8bcc34 100644
> --- a/drivers/mtd/nand/nand_util.c
> +++ b/drivers/mtd/nand/nand_util.c
> @@ -820,7 +820,7 @@ int nand_torture(struct mtd_info *mtd, loff_t offset)
>  {
>  	u_char patterns[] = {0xa5, 0x5a, 0x00};
>  	struct erase_info instr = {
> -		.mtd = nand,
> +		.mtd = mtd,
>  		.addr = offset,
>  		.len = mtd->erasesize,
>  	};

This got missed because no boards enable CONFIG_CMD_NAND_TORTURE.  If
you use this option could you enable it in the relevant board?

Or maybe we need to add an "allyesconfig"-type build (user-tunable
options only) to buildman?  And/or some other test configs that add up
to decent build coverage of options that are only enabled by users.

-Scott
Max Krummenacher June 9, 2016, 8:35 a.m. UTC | #2
Hi Scott

2016-06-09 1:47 GMT+02:00 Scott Wood <scott.wood@nxp.com>:
> On 06/07/2016 06:47 AM, Max Krummenacher wrote:
>> follow parameter name change (nand to mtd) to fix compiler error.
>>
>> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
>>
>> ---
>>
>> Changes in v2:
>> - Patch v1 1/1 went into master, but Scott's patch series syncing
>>   with kernel v4.6 introduced an additional compile time error.
>>
>>  drivers/mtd/nand/nand_util.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
>> index 5bba66a..e8bcc34 100644
>> --- a/drivers/mtd/nand/nand_util.c
>> +++ b/drivers/mtd/nand/nand_util.c
>> @@ -820,7 +820,7 @@ int nand_torture(struct mtd_info *mtd, loff_t offset)
>>  {
>>       u_char patterns[] = {0xa5, 0x5a, 0x00};
>>       struct erase_info instr = {
>> -             .mtd = nand,
>> +             .mtd = mtd,
>>               .addr = offset,
>>               .len = mtd->erasesize,
>>       };
>
> This got missed because no boards enable CONFIG_CMD_NAND_TORTURE.  If
> you use this option could you enable it in the relevant board?

I believe this makes option makes only sense if you do HW bringup or
have issues with
your NAND driver. (Which I currently have with an i.MX 7 design)
So likely one would not want to enable this for production code.

On the other hand people switching on the option should be able to fix
whatever issue
arises.

And, considering that it was broken since January 2013
(dfe64e2c89731a3f9950d7acd8681b68df2bae03) it can not be that important.

>
> Or maybe we need to add an "allyesconfig"-type build (user-tunable
> options only) to buildman?  And/or some other test configs that add up
> to decent build coverage of options that are only enabled by users.
>
> -Scott
>

Regards
Max
Crystal Wood June 9, 2016, 5:10 p.m. UTC | #3
On Thu, 2016-06-09 at 10:35 +0200, Max Krummenacher wrote:
> Hi Scott
> 
> 2016-06-09 1:47 GMT+02:00 Scott Wood <scott.wood@nxp.com>:
> > On 06/07/2016 06:47 AM, Max Krummenacher wrote:
> > > follow parameter name change (nand to mtd) to fix compiler error.
> > > 
> > > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> > > 
> > > ---
> > > 
> > > Changes in v2:
> > > - Patch v1 1/1 went into master, but Scott's patch series syncing
> > >   with kernel v4.6 introduced an additional compile time error.
> > > 
> > >  drivers/mtd/nand/nand_util.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
> > > index 5bba66a..e8bcc34 100644
> > > --- a/drivers/mtd/nand/nand_util.c
> > > +++ b/drivers/mtd/nand/nand_util.c
> > > @@ -820,7 +820,7 @@ int nand_torture(struct mtd_info *mtd, loff_t
> > > offset)
> > >  {
> > >       u_char patterns[] = {0xa5, 0x5a, 0x00};
> > >       struct erase_info instr = {
> > > -             .mtd = nand,
> > > +             .mtd = mtd,
> > >               .addr = offset,
> > >               .len = mtd->erasesize,
> > >       };
> > 
> > This got missed because no boards enable CONFIG_CMD_NAND_TORTURE.  If
> > you use this option could you enable it in the relevant board?
> 
> I believe this makes option makes only sense if you do HW bringup or
> have issues with
> your NAND driver. (Which I currently have with an i.MX 7 design)
> So likely one would not want to enable this for production code.

That's why I suggested the alternative of adding one or more targets aimed at
build coverage.

> On the other hand people switching on the option should be able to fix
> whatever issue
> arises.
> 
> And, considering that it was broken since January 2013
> (dfe64e2c89731a3f9950d7acd8681b68df2bae03) it can not be that important.

This patch fixes a breakage that was merged within the past week.  What was
broken by the 2013 sync?

-Scott
Max Krummenacher June 9, 2016, 9:13 p.m. UTC | #4
Am Donnerstag, den 09.06.2016, 12:10 -0500 schrieb Scott Wood:
> On Thu, 2016-06-09 at 10:35 +0200, Max Krummenacher wrote:
> > Hi Scott
> > 
> > 2016-06-09 1:47 GMT+02:00 Scott Wood <scott.wood@nxp.com>:
> > > On 06/07/2016 06:47 AM, Max Krummenacher wrote:
> > > > follow parameter name change (nand to mtd) to fix compiler
> > > > error.
> > > > 
> > > > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> > > > 
> > > > ---
> > > > 
> > > > Changes in v2:
> > > > - Patch v1 1/1 went into master, but Scott's patch series
> > > > syncing
> > > >   with kernel v4.6 introduced an additional compile time error.
> > > > 
> > > >  drivers/mtd/nand/nand_util.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/mtd/nand/nand_util.c
> > > > b/drivers/mtd/nand/nand_util.c
> > > > index 5bba66a..e8bcc34 100644
> > > > --- a/drivers/mtd/nand/nand_util.c
> > > > +++ b/drivers/mtd/nand/nand_util.c
> > > > @@ -820,7 +820,7 @@ int nand_torture(struct mtd_info *mtd,
> > > > loff_t
> > > > offset)
> > > >  {
> > > >       u_char patterns[] = {0xa5, 0x5a, 0x00};
> > > >       struct erase_info instr = {
> > > > -             .mtd = nand,
> > > > +             .mtd = mtd,
> > > >               .addr = offset,
> > > >               .len = mtd->erasesize,
> > > >       };
> > > 
> > > This got missed because no boards enable CONFIG_CMD_NAND_TORTURE.
> > >   If
> > > you use this option could you enable it in the relevant board?
> > 
> > I believe this makes option makes only sense if you do HW bringup
> > or
> > have issues with
> > your NAND driver. (Which I currently have with an i.MX 7 design)
> > So likely one would not want to enable this for production code.
> 
> That's why I suggested the alternative of adding one or more targets
> aimed at
> build coverage.
> 
> > On the other hand people switching on the option should be able to
> > fix
> > whatever issue
> > arises.
> > 
> > And, considering that it was broken since January 2013
> > (dfe64e2c89731a3f9950d7acd8681b68df2bae03) it can not be that
> > important.
> 
> This patch fixes a breakage that was merged within the past week. 
>  What was
> broken by the 2013 sync?

The 2013 sync did deprecate the outside use of the function pointers
in the mtd_info struct. To force this it did also rename the struct
members.
Since the torture code did not follow the rename it did no longer
compile.
Now fixed with
http://git.denx.de/?p=u-boot.git;a=commit;h=667067faa18334f1e28c01b4753
0b5cce1b6182f

Max

> 
> -Scott
>
Crystal Wood June 9, 2016, 9:16 p.m. UTC | #5
On Thu, 2016-06-09 at 23:13 +0200, Max Krummenacher wrote:
> Am Donnerstag, den 09.06.2016, 12:10 -0500 schrieb Scott Wood:
> > On Thu, 2016-06-09 at 10:35 +0200, Max Krummenacher wrote:
> > > Hi Scott
> > > 
> > > 2016-06-09 1:47 GMT+02:00 Scott Wood <scott.wood@nxp.com>:
> > > > On 06/07/2016 06:47 AM, Max Krummenacher wrote:
> > > > > follow parameter name change (nand to mtd) to fix compiler
> > > > > error.
> > > > > 
> > > > > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> > > > > 
> > > > > ---
> > > > > 
> > > > > Changes in v2:
> > > > > - Patch v1 1/1 went into master, but Scott's patch series
> > > > > syncing
> > > > >   with kernel v4.6 introduced an additional compile time error.
> > > > > 
> > > > >  drivers/mtd/nand/nand_util.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/mtd/nand/nand_util.c
> > > > > b/drivers/mtd/nand/nand_util.c
> > > > > index 5bba66a..e8bcc34 100644
> > > > > --- a/drivers/mtd/nand/nand_util.c
> > > > > +++ b/drivers/mtd/nand/nand_util.c
> > > > > @@ -820,7 +820,7 @@ int nand_torture(struct mtd_info *mtd,
> > > > > loff_t
> > > > > offset)
> > > > >  {
> > > > >       u_char patterns[] = {0xa5, 0x5a, 0x00};
> > > > >       struct erase_info instr = {
> > > > > -             .mtd = nand,
> > > > > +             .mtd = mtd,
> > > > >               .addr = offset,
> > > > >               .len = mtd->erasesize,
> > > > >       };
> > > > 
> > > > This got missed because no boards enable CONFIG_CMD_NAND_TORTURE.
> > > >   If
> > > > you use this option could you enable it in the relevant board?
> > > 
> > > I believe this makes option makes only sense if you do HW bringup
> > > or
> > > have issues with
> > > your NAND driver. (Which I currently have with an i.MX 7 design)
> > > So likely one would not want to enable this for production code.
> > 
> > That's why I suggested the alternative of adding one or more targets
> > aimed at
> > build coverage.
> > 
> > > On the other hand people switching on the option should be able to
> > > fix
> > > whatever issue
> > > arises.
> > > 
> > > And, considering that it was broken since January 2013
> > > (dfe64e2c89731a3f9950d7acd8681b68df2bae03) it can not be that
> > > important.
> > 
> > This patch fixes a breakage that was merged within the past week. 
> >  What was
> > broken by the 2013 sync?
> 
> The 2013 sync did deprecate the outside use of the function pointers
> in the mtd_info struct. To force this it did also rename the struct
> members.
> Since the torture code did not follow the rename it did no longer
> compile.
> Now fixed with
> http://git.denx.de/?p=u-boot.git;a=commit;h=667067faa18334f1e28c01b4753
> 0b5cce1b6182f

Oh, from the description I didn't realize that the function pointers were
actually not working.  Usually "deprecated" means marked for removal/change,
not actually removed/changed.

-Scott
diff mbox

Patch

diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 5bba66a..e8bcc34 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -820,7 +820,7 @@  int nand_torture(struct mtd_info *mtd, loff_t offset)
 {
 	u_char patterns[] = {0xa5, 0x5a, 0x00};
 	struct erase_info instr = {
-		.mtd = nand,
+		.mtd = mtd,
 		.addr = offset,
 		.len = mtd->erasesize,
 	};