On Tue, Jul 21, 2015 at 01:10:00PM +0530, Vinay Simha BN wrote: > diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h > index 8dc6bd2..43d700b 100644 > --- a/drivers/staging/sm750fb/sm750_help.h > +++ b/drivers/staging/sm750fb/sm750_help.h > @@ -49,17 +49,23 @@ > /* Field Macros */ > #define FIELD_START(field) (0 ? field) > #define FIELD_END(field) (1 ? field) > -#define FIELD_SIZE(field) (1 + FIELD_END(field) - FIELD_START(field)) > -#define FIELD_MASK(field) (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field)) > -#define FIELD_NORMALIZE(reg, field) (((reg) & FIELD_MASK(field)) >> FIELD_START(field)) > -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field)) > +#define FIELD_SIZE(field) (1 + FIELD_END(field) - \ > + FIELD_START(field)) > +#define FIELD_MASK(field) (((1 << (FIELD_SIZE(field)-1)) \ > + | ((1 << (FIELD_SIZE(field)-1)) - 1)) \ > + << FIELD_START(field)) > +#define FIELD_NORMALIZE(reg, field) (((reg) & FIELD_MASK(field)) >> \ > + FIELD_START(field)) > +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \ > + FIELD_MASK(field)) > > #define FIELD_INIT(reg, field, value) FIELD_DENORMALIZE(reg ## _ ## field, \ > - reg ## _ ## field ## _ ## value) > + reg ## _ ## field ## _ ## value) > #define FIELD_INIT_VAL(reg, field, value) \ > (FIELD_DENORMALIZE(reg ## _ ## field, value)) > #define FIELD_VAL_SET(x, r, f, v) x = x & ~FIELD_MASK(r ## _ ## f) \ > - | FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v) > + | FIELD_DENORMALIZE(r ## _ ## f, \ > + r ## _ ## f ## _ ## v) > > #define RGB(r, g, b) \ > ( \ These are worse for reading now. Better to ignore the warning instead of making the code ugly. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel