Re: [RFC PATCH 34/34] mtd: spi-nor: Add sfdp fixups hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 7 Dec 2018 16:29:41 +0000
"Sverdlin, Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@xxxxxxxxx>
wrote:

> >  
> >  /**
> >   * struct spi_nor_fixups - SPI NOR fixup hooks
> > + * @sfdp_hdr: SFDP header fixups
> > + * @sfdp_hdr: SFDP parameter headers fixups  
>        ^^^^^^^^
> Should be sfdp_param_hdrs

Oops.

> 
> >   * @post_bfpt: called after the BFPT table has been parsed
> >   * @post_sfdp: called after SFDP has been parsed (is also called for SPI NORs
> >   *	       that do not support RDSFDP). Typically used to tweak various
> > @@ -199,6 +201,11 @@ struct sfdp_bfpt {
> >   * table is broken or not available.
> >   */
> >  struct spi_nor_fixups {
> > +	int (*sfdp_hdr)(struct spi_nor *nor,
> > +			struct sfdp_header *hdr);
> > +	int (*sfdp_param_hdrs)(struct spi_nor *nor,
> > +			       struct sfdp_header *hdr,
> > +			       struct sfdp_parameter_header *param_hdrs);
> >  	int (*post_bfpt)(struct spi_nor *nor,
> >  			 const struct sfdp_parameter_header *bfpt_header,
> >  			 const struct sfdp_bfpt *bfpt,
> > diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
> > index 36343e3e6be0..a8cd070e4ea2 100644
> > --- a/drivers/mtd/spi-nor/sfdp.c
> > +++ b/drivers/mtd/spi-nor/sfdp.c
> > @@ -534,8 +534,8 @@ static const struct sfdp_bfpt_erase sfdp_bfpt_erases[] = {
> >  static int
> >  spi_nor_post_bfpt_fixups(struct spi_nor *nor,
> >  			 const struct sfdp_parameter_header *bfpt_header,
> > -			 const struct sfdp_bfpt *bfpt,
> > -			 struct spi_nor_flash_parameter *params)
> > +                         const struct sfdp_bfpt *bfpt,
> > +                         struct spi_nor_flash_parameter *params)  
> 
> That's where checkpatch.pl would warn you

Didn't run checkpatch on this series (I tend to not run checkpatch
on big RFC series where I'm expecting feedback on the general
approach).

Anyway, this patch should be dropped since those hooks are not used,
and I don't think we should add new fixup hooks if we don't have a user.

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



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux