diff options
| author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2008-01-18 15:32:19 -0500 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2008-01-25 06:52:52 -0500 |
| commit | d0e5c2185e1c6508894e1ee1a8e9bf79e009e427 (patch) | |
| tree | c1bd7a5fbbfc948151a26e56399ca39a1cf58f0a /drivers/ps3 | |
| parent | eff56c92a15c3dbb1e55efea5251e28c0e5efb8b (diff) | |
[POWERPC] PS3: Checkpatch cleanups for drivers/ps3/ps3-vuart.c
Cleanup coding errors in drivers/ps3/ps3-vuart.c as reported by
checkpatch.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/ps3')
| -rw-r--r-- | drivers/ps3/ps3-vuart.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index bb8d5b1eec9..a3e4ea9ae5b 100644 --- a/drivers/ps3/ps3-vuart.c +++ b/drivers/ps3/ps3-vuart.c | |||
| @@ -108,18 +108,18 @@ static struct ps3_vuart_port_priv *to_port_priv( | |||
| 108 | struct ports_bmp { | 108 | struct ports_bmp { |
| 109 | u64 status; | 109 | u64 status; |
| 110 | u64 unused[3]; | 110 | u64 unused[3]; |
| 111 | } __attribute__ ((aligned (32))); | 111 | } __attribute__((aligned(32))); |
| 112 | 112 | ||
| 113 | #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__) | 113 | #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__) |
| 114 | static void __maybe_unused _dump_ports_bmp( | 114 | static void __maybe_unused _dump_ports_bmp( |
| 115 | const struct ports_bmp* bmp, const char* func, int line) | 115 | const struct ports_bmp *bmp, const char *func, int line) |
| 116 | { | 116 | { |
| 117 | pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status); | 117 | pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) | 120 | #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) |
| 121 | static void __maybe_unused _dump_port_params(unsigned int port_number, | 121 | static void __maybe_unused _dump_port_params(unsigned int port_number, |
| 122 | const char* func, int line) | 122 | const char *func, int line) |
| 123 | { | 123 | { |
| 124 | #if defined(DEBUG) | 124 | #if defined(DEBUG) |
| 125 | static const char *strings[] = { | 125 | static const char *strings[] = { |
| @@ -363,7 +363,7 @@ int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev) | |||
| 363 | */ | 363 | */ |
| 364 | 364 | ||
| 365 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, | 365 | static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, |
| 366 | const void* buf, unsigned int bytes, unsigned long *bytes_written) | 366 | const void *buf, unsigned int bytes, unsigned long *bytes_written) |
| 367 | { | 367 | { |
| 368 | int result; | 368 | int result; |
| 369 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 369 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
| @@ -431,7 +431,7 @@ void ps3_vuart_clear_rx_bytes(struct ps3_system_bus_device *dev, | |||
| 431 | int result; | 431 | int result; |
| 432 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); | 432 | struct ps3_vuart_port_priv *priv = to_port_priv(dev); |
| 433 | u64 bytes_waiting; | 433 | u64 bytes_waiting; |
| 434 | void* tmp; | 434 | void *tmp; |
| 435 | 435 | ||
| 436 | result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting); | 436 | result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting); |
| 437 | 437 | ||
| @@ -526,9 +526,8 @@ int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf, | |||
| 526 | 526 | ||
| 527 | lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL); | 527 | lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL); |
| 528 | 528 | ||
| 529 | if (!lb) { | 529 | if (!lb) |
| 530 | return -ENOMEM; | 530 | return -ENOMEM; |
| 531 | } | ||
| 532 | 531 | ||
| 533 | memcpy(lb->data, buf, bytes); | 532 | memcpy(lb->data, buf, bytes); |
| 534 | lb->head = lb->data; | 533 | lb->head = lb->data; |
| @@ -926,9 +925,8 @@ static int ps3_vuart_bus_interrupt_get(void) | |||
| 926 | 925 | ||
| 927 | BUG_ON(vuart_bus_priv.use_count > 2); | 926 | BUG_ON(vuart_bus_priv.use_count > 2); |
| 928 | 927 | ||
| 929 | if (vuart_bus_priv.use_count != 1) { | 928 | if (vuart_bus_priv.use_count != 1) |
| 930 | return 0; | 929 | return 0; |
| 931 | } | ||
| 932 | 930 | ||
| 933 | BUG_ON(vuart_bus_priv.bmp); | 931 | BUG_ON(vuart_bus_priv.bmp); |
| 934 | 932 | ||
