summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl8712_io.c
diff options
context:
space:
mode:
authorTapasweni Pathak <tapaswenipathak@gmail.com>2014-09-22 22:03:43 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-23 08:14:37 -0700
commitddcb81e7419baa90fab79dbbb1b983a69a235c91 (patch)
tree5ad9299b71c0530788888a6d05534e5e790ef26d /drivers/staging/rtl8712/rtl8712_io.c
parenta988265c61a8e0f4420148c8b62f334b31f49c69 (diff)
staging: rtl8712: merge lines and remove unused variable for immediate return
This patch merge two lines in a single line if immediate return is found. Unused variables in each case were removed manually as they are no longer needed. This is done using Coccinelle. Semantic patch used for this is as follows : @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_io.c')
-rw-r--r--drivers/staging/rtl8712/rtl8712_io.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_io.c b/drivers/staging/rtl8712/rtl8712_io.c
index c7346008def0..c84aeb9940bc 100644
--- a/drivers/staging/rtl8712/rtl8712_io.c
+++ b/drivers/staging/rtl8712/rtl8712_io.c
@@ -39,11 +39,9 @@ u8 r8712_read8(struct _adapter *adapter, u32 addr)
struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
struct intf_hdl *pintfhdl = &(pio_queue->intf);
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
- u8 r_val;
_read8 = pintfhdl->io_ops._read8;
- r_val = _read8(pintfhdl, addr);
- return r_val;
+ return _read8(pintfhdl, addr);
}
u16 r8712_read16(struct _adapter *adapter, u32 addr)
@@ -51,11 +49,9 @@ u16 r8712_read16(struct _adapter *adapter, u32 addr)
struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
struct intf_hdl *pintfhdl = &(pio_queue->intf);
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
- u16 r_val;
_read16 = pintfhdl->io_ops._read16;
- r_val = _read16(pintfhdl, addr);
- return r_val;
+ return _read16(pintfhdl, addr);
}
u32 r8712_read32(struct _adapter *adapter, u32 addr)
@@ -63,11 +59,9 @@ u32 r8712_read32(struct _adapter *adapter, u32 addr)
struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
struct intf_hdl *pintfhdl = &(pio_queue->intf);
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
- u32 r_val;
_read32 = pintfhdl->io_ops._read32;
- r_val = _read32(pintfhdl, addr);
- return r_val;
+ return _read32(pintfhdl, addr);
}
void r8712_write8(struct _adapter *adapter, u32 addr, u8 val)