Commit 5535c4dd authored by Rocco Folino's avatar Rocco Folino Committed by Greg Kroah-Hartman

staging: gs_fpgaboot: Fixed code style issues

Fixed missing a blank line after declarations warning
Signed-off-by: default avatarRocco Folino <lordzen87@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f3c5261e
...@@ -214,8 +214,8 @@ static int gs_download_image(struct fpgaimage *fimage, enum wbus bus_bytes) ...@@ -214,8 +214,8 @@ static int gs_download_image(struct fpgaimage *fimage, enum wbus bus_bytes)
{ {
char *bitdata; char *bitdata;
int size, i, cnt; int size, i, cnt;
cnt = 0;
cnt = 0;
bitdata = (char *)fimage->fpgadata; bitdata = (char *)fimage->fpgadata;
size = fimage->lendata; size = fimage->lendata;
......
...@@ -44,6 +44,7 @@ static inline void xl_cclk_b(int32_t i); ...@@ -44,6 +44,7 @@ static inline void xl_cclk_b(int32_t i);
void xl_shift_cclk(int count) void xl_shift_cclk(int count)
{ {
int i; int i;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
xl_cclk_b(1); xl_cclk_b(1);
xl_cclk_b(0); xl_cclk_b(0);
...@@ -85,6 +86,7 @@ void xl_shift_bytes_out(enum wbus bus_byte, unsigned char *pdata) ...@@ -85,6 +86,7 @@ void xl_shift_bytes_out(enum wbus bus_byte, unsigned char *pdata)
static inline unsigned char bitswap(unsigned char s) static inline unsigned char bitswap(unsigned char s)
{ {
unsigned char d; unsigned char d;
d = (((s&0x80)>>7) | ((s&0x40)>>5) | ((s&0x20)>>3) | ((s&0x10)>>1) | d = (((s&0x80)>>7) | ((s&0x40)>>5) | ((s&0x20)>>3) | ((s&0x10)>>1) |
((s&0x08)<<1) | ((s&0x04)<<3) | ((s&0x02)<<5) | ((s&0x01)<<7)); ((s&0x08)<<1) | ((s&0x04)<<3) | ((s&0x02)<<5) | ((s&0x01)<<7));
return d; return d;
...@@ -135,6 +137,7 @@ static inline void mpc85xx_gpio_set_high(int32_t port, uint32_t gpios) ...@@ -135,6 +137,7 @@ static inline void mpc85xx_gpio_set_high(int32_t port, uint32_t gpios)
static inline void gpio_set_value(int32_t port, uint32_t gpio, uint32_t value) static inline void gpio_set_value(int32_t port, uint32_t gpio, uint32_t value)
{ {
int32_t g; int32_t g;
g = 31 - gpio; g = 31 - gpio;
if (value) if (value)
mpc85xx_gpio_set_high(port, 1U << g); mpc85xx_gpio_set_high(port, 1U << g);
...@@ -145,6 +148,7 @@ static inline void gpio_set_value(int32_t port, uint32_t gpio, uint32_t value) ...@@ -145,6 +148,7 @@ static inline void gpio_set_value(int32_t port, uint32_t gpio, uint32_t value)
static inline int gpio_get_value(int32_t port, uint32_t gpio) static inline int gpio_get_value(int32_t port, uint32_t gpio)
{ {
int32_t g; int32_t g;
g = 31 - gpio; g = 31 - gpio;
return !!mpc85xx_gpio_get(port, 1U << g); return !!mpc85xx_gpio_get(port, 1U << g);
} }
...@@ -184,6 +188,7 @@ int xl_get_done_b(void) ...@@ -184,6 +188,7 @@ int xl_get_done_b(void)
static inline uint32_t bit_remap_byte0(uint32_t s) static inline uint32_t bit_remap_byte0(uint32_t s)
{ {
uint32_t d; uint32_t d;
d = (((s&0x80)>>7) | ((s&0x40)>>5) | ((s&0x20)>>3) | ((s&0x10)>>1) | d = (((s&0x80)>>7) | ((s&0x40)>>5) | ((s&0x20)>>3) | ((s&0x10)>>1) |
((s&0x08)<<1) | ((s&0x04)<<3) | ((s&0x02)<<6) | ((s&0x01)<<9)); ((s&0x08)<<1) | ((s&0x04)<<3) | ((s&0x02)<<6) | ((s&0x01)<<9));
return d; return d;
...@@ -195,6 +200,7 @@ static inline uint32_t bit_remap_byte0(uint32_t s) ...@@ -195,6 +200,7 @@ static inline uint32_t bit_remap_byte0(uint32_t s)
static inline void byte0_out(unsigned char data) static inline void byte0_out(unsigned char data)
{ {
uint32_t swap32; uint32_t swap32;
swap32 = bit_remap_byte0((uint32_t) data) << 8; swap32 = bit_remap_byte0((uint32_t) data) << 8;
mpc85xx_gpio_set(0, 0x0002BF00, (uint32_t) swap32); mpc85xx_gpio_set(0, 0x0002BF00, (uint32_t) swap32);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment