[flashrom] [PATCH 3/6] changes macros for SSFS and SSFC bits: - introduce mask macros - add comments - change SSFS_CDS to SSFS_FDONE (abbr. used in datasheet not in SSFS but HSFS) - use those for refactoring and magic number elemination. - following patch uses them for pretty printing

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Wed Apr 6 01:46:04 CEST 2011

On Tue, 5 Apr 2011 23:43:43 +0200
Stefan Reinauer <stefan.reinauer at coreboot.org> wrote:

> > +#define SSFS_AEL		0x00000010	/* Access Error
> > Log */ +#define SSFS_AEL_OFF		4  
> Would be nice to
> #define SSFS_AEL        (1 << SSFS_AEL_OFF) 
> and so on. If both are needed. It would be nicer to get rid of either.

yes, i would have defined the offsets only in the first place (without
the _OFF suffix) and used a shift (or function macro) to create the
masks where needed.
refrained from that (bigger change) because i wanted feedback first.
would that be ok? what is preferred?

Kind regards/Mit freundlichen Grüßen, Stefan Tauner

More information about the flashrom mailing list