Re: [PATCH v1] mtd: rawnand: Add Macronix NAND read retry support

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

 



Hi Thomas,

> 
> > > > 
-------------------------------------------------------------------
> > > >  static void macronix_nand_onfi_init(struct nand_chip *chip)
> > > >  {
> > > >           struct nand_parameters *p = &chip->parameters;
> > > >           struct nand_onfi_vendor_macronix *mxic = (void 
> > > > *)p->onfi->vendor; 
> > > 
> > > Why cast to void*, instead of casting directly to struct
> > > nand_onfi_vendor_macronix * ? 
> > 
> > Due to got a warning:
> > 
> >  warning: initialization from incompatible pointer type
> >   struct nand_onfi_vendor_macronix *mxic = p->onfi->vendor;
> 
> You didn't look at my code, I suggested:
> 
>    mxic = (struct nand_onfi_vendor_macronix *) p->info->vendor;

Oops, sorry that I did not pay attention to it.

Will patch it by your comments.

  static void macronix_nand_onfi_init(struct nand_chip *chip)
  {
          struct nand_parameters *p = &chip->parameters;
          struct nand_onfi_vendor_macronix *mxic;
 
          if (!p->onfi)
                  return;
 
          mxic = (struct nand_onfi_vendor_macronix *) p->onfi->vendor;
          if ((mxic->reliability_func & MACRONIX_READ_RETRY_BIT) == 0)
                  return;
 
          chip->read_retries = MACRONIX_READ_RETRY_MODE;
          chip->setup_read_retry = macronix_nand_setup_read_retry;
 
          if (p->supports_set_get_features) {
                  bitmap_set(p->set_feature_list,
                             ONFI_FEATURE_ADDR_READ_RETRY, 1);
                  bitmap_set(p->get_feature_list,
                             ONFI_FEATURE_ADDR_READ_RETRY, 1);
          }
  }


thanks & best regards,
Mason


CONFIDENTIALITY NOTE:

This e-mail and any attachments may contain confidential information 
and/or personal data, which is protected by applicable laws. Please be 
reminded that duplication, disclosure, distribution, or use of this e-mail 
(and/or its attachments) or any part thereof is prohibited. If you receive 
this e-mail in error, please notify us immediately and delete this mail as 
well as its attachment(s) from your system. In addition, please be 
informed that collection, processing, and/or use of personal data is 
prohibited unless expressly permitted by personal data protection laws. 
Thank you for your attention and cooperation.

Macronix International Co., Ltd.

=====================================================================



============================================================================

CONFIDENTIALITY NOTE:

This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.

Macronix International Co., Ltd.

=====================================================================


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



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

  Powered by Linux