projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93f4877
)
fsl_i2c.c: Fix warning on gcc-6.x
author
Tom Rini
<trini@konsulko.com>
Thu, 9 Feb 2017 20:40:16 +0000
(15:40 -0500)
committer
Tom Rini
<trini@konsulko.com>
Fri, 17 Feb 2017 19:15:12 +0000
(14:15 -0500)
With gcc-6.x we see:
drivers/i2c/fsl_i2c.c:86:3: warning: ‘fsl_i2c_speed_map’ defined but not
used [-Wunused-const-variable=]
The easy way to fix this is that since we only use fsl_i2c_speed_map at
all on __M68K__ move the existing guards around slightly.
Reported-by: Thomas Schaefer <Thomas.Schaefer@kontron.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
drivers/i2c/fsl_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/fsl_i2c.c
b/drivers/i2c/fsl_i2c.c
index
e9fbf82
..
a1406ba
100644
(file)
--- a/
drivers/i2c/fsl_i2c.c
+++ b/
drivers/i2c/fsl_i2c.c
@@
-53,6
+53,7
@@
static const struct fsl_i2c_base *i2c_base[4] = {
/* I2C speed map for a DFSR value of 1 */
/* I2C speed map for a DFSR value of 1 */
+#ifdef __M68K__
/*
* Map I2C frequency dividers to FDR and DFSR values
*
/*
* Map I2C frequency dividers to FDR and DFSR values
*
@@
-84,7
+85,6
@@
static const struct {
unsigned short divider;
u8 fdr;
} fsl_i2c_speed_map[] = {
unsigned short divider;
u8 fdr;
} fsl_i2c_speed_map[] = {
-#ifdef __M68K__
{20, 32}, {22, 33}, {24, 34}, {26, 35},
{28, 0}, {28, 36}, {30, 1}, {32, 37},
{34, 2}, {36, 38}, {40, 3}, {40, 39},
{20, 32}, {22, 33}, {24, 34}, {26, 35},
{28, 0}, {28, 36}, {30, 1}, {32, 37},
{34, 2}, {36, 38}, {40, 3}, {40, 39},
@@
-102,8
+102,8
@@
static const struct {
{1536, 61}, {1792, 62}, {1920, 27}, {2048, 63},
{2304, 28}, {2560, 29}, {3072, 30}, {3840, 31},
{-1, 31}
{1536, 61}, {1792, 62}, {1920, 27}, {2048, 63},
{2304, 28}, {2560, 29}, {3072, 30}, {3840, 31},
{-1, 31}
-#endif
};
};
+#endif
/**
* Set the I2C bus speed for a given I2C device
/**
* Set the I2C bus speed for a given I2C device