Commit d0e5c218 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Paul Mackerras

[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: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent eff56c92
...@@ -108,18 +108,18 @@ static struct ps3_vuart_port_priv *to_port_priv( ...@@ -108,18 +108,18 @@ static struct ps3_vuart_port_priv *to_port_priv(
struct ports_bmp { struct ports_bmp {
u64 status; u64 status;
u64 unused[3]; u64 unused[3];
} __attribute__ ((aligned (32))); } __attribute__((aligned(32)));
#define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__) #define dump_ports_bmp(_b) _dump_ports_bmp(_b, __func__, __LINE__)
static void __maybe_unused _dump_ports_bmp( static void __maybe_unused _dump_ports_bmp(
const struct ports_bmp* bmp, const char* func, int line) const struct ports_bmp *bmp, const char *func, int line)
{ {
pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status); pr_debug("%s:%d: ports_bmp: %016lxh\n", func, line, bmp->status);
} }
#define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__) #define dump_port_params(_b) _dump_port_params(_b, __func__, __LINE__)
static void __maybe_unused _dump_port_params(unsigned int port_number, static void __maybe_unused _dump_port_params(unsigned int port_number,
const char* func, int line) const char *func, int line)
{ {
#if defined(DEBUG) #if defined(DEBUG)
static const char *strings[] = { static const char *strings[] = {
...@@ -363,7 +363,7 @@ int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev) ...@@ -363,7 +363,7 @@ int ps3_vuart_disable_interrupt_disconnect(struct ps3_system_bus_device *dev)
*/ */
static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev, static int ps3_vuart_raw_write(struct ps3_system_bus_device *dev,
const void* buf, unsigned int bytes, unsigned long *bytes_written) const void *buf, unsigned int bytes, unsigned long *bytes_written)
{ {
int result; int result;
struct ps3_vuart_port_priv *priv = to_port_priv(dev); 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,7 +431,7 @@ void ps3_vuart_clear_rx_bytes(struct ps3_system_bus_device *dev,
int result; int result;
struct ps3_vuart_port_priv *priv = to_port_priv(dev); struct ps3_vuart_port_priv *priv = to_port_priv(dev);
u64 bytes_waiting; u64 bytes_waiting;
void* tmp; void *tmp;
result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting); result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes_waiting);
...@@ -526,9 +526,8 @@ int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf, ...@@ -526,9 +526,8 @@ int ps3_vuart_write(struct ps3_system_bus_device *dev, const void *buf,
lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL); lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL);
if (!lb) { if (!lb)
return -ENOMEM; return -ENOMEM;
}
memcpy(lb->data, buf, bytes); memcpy(lb->data, buf, bytes);
lb->head = lb->data; lb->head = lb->data;
...@@ -926,9 +925,8 @@ static int ps3_vuart_bus_interrupt_get(void) ...@@ -926,9 +925,8 @@ static int ps3_vuart_bus_interrupt_get(void)
BUG_ON(vuart_bus_priv.use_count > 2); BUG_ON(vuart_bus_priv.use_count > 2);
if (vuart_bus_priv.use_count != 1) { if (vuart_bus_priv.use_count != 1)
return 0; return 0;
}
BUG_ON(vuart_bus_priv.bmp); BUG_ON(vuart_bus_priv.bmp);
......
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