diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2015-09-30 05:24:57 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-30 10:26:20 (GMT) |
commit | 6af70030431d5d58b34c294ddb371baf7f6c9d4b (patch) | |
tree | fe8248aff6cd8a3a170f71d87afcfbd99c095070 | |
parent | 86b5f4ed3525645dac9fa8a5eedcd5af7118c591 (diff) | |
download | linux-6af70030431d5d58b34c294ddb371baf7f6c9d4b.tar.xz |
staging: sm750fb: remove unused macros
Several macros defined in sm750.h and sm750_help.h are not used and
therefore they can be removed
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/sm750fb/sm750.h | 7 | ||||
-rw-r--r-- | drivers/staging/sm750fb/sm750_help.h | 33 |
2 files changed, 0 insertions, 40 deletions
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 793c092..b2f05f4 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -162,13 +162,6 @@ struct lynxfb_par { #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif - -#define PS_TO_HZ(ps) \ - ({ \ - unsigned long long hz = 1000*1000*1000*1000ULL; \ - do_div(hz, ps); \ - (unsigned long)hz; }) - static inline unsigned long ps_to_hz(unsigned int psvalue) { unsigned long long numerator = 1000*1000*1000*1000ULL; diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h index 08dcc69..c070cf2 100644 --- a/drivers/staging/sm750fb/sm750_help.h +++ b/drivers/staging/sm750fb/sm750_help.h @@ -1,20 +1,6 @@ #ifndef LYNX_HELP_H__ #define LYNX_HELP_H__ -/* FIELD MACROS */ -#define _LSB(f) (0 ? f) -#define _MSB(f) (1 ? f) -#define _COUNT(f) (_MSB(f) - _LSB(f) + 1) - -#define RAW_MASK(f) (0xFFFFFFFF >> (32 - _COUNT(f))) -#define GET_MASK(f) (RAW_MASK(f) << _LSB(f)) -#define GET_FIELD(d, f) (((d) >> _LSB(f)) & RAW_MASK(f)) -#define TEST_FIELD(d, f, v) (GET_FIELD(d, f) == f ## _ ## v) -#define SET_FIELD(d, f, v) (((d) & ~GET_MASK(f)) | \ - (((f ## _ ## v) & RAW_MASK(f)) << _LSB(f))) -#define SET_FIELDV(d, f, v) (((d) & ~GET_MASK(f)) | \ - (((v) & RAW_MASK(f)) << _LSB(f))) - /* Internal macros */ #define _F_START(f) (0 ? f) #define _F_END(f) (1 ? f) @@ -51,25 +37,6 @@ #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_INIT(reg, field, value) FIELD_DENORMALIZE(reg ## _ ## field, \ - 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) - -#define RGB(r, g, b) \ -( \ - (unsigned long) (((r) << 16) | ((g) << 8) | (b)) \ -) - -#define RGB16(r, g, b) \ -( \ - (unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \ -) static inline unsigned int absDiff(unsigned int a, unsigned int b) { |