diff options
author | Mahati Chamarthy <mahati.chamarthy@gmail.com> | 2014-09-23 21:24:47 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-23 20:31:33 -0700 |
commit | a579c97823d36613375d636c7b684133d8f79855 (patch) | |
tree | 474acf164cf60e475c5b6de9bbf5b65a8d485a9e /drivers/staging | |
parent | 707505b58eb9aeef294e975a6d7f5afd1c74dd0a (diff) | |
download | blackbird-op-linux-a579c97823d36613375d636c7b684133d8f79855.tar.gz blackbird-op-linux-a579c97823d36613375d636c7b684133d8f79855.zip |
Staging: media: lirc: Merge two lines and remove unused variable
This patch merges an assignment with an immediately following return of
the assigned variable. It also removes a variable that becomes unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:
@r@
identifier ret;
identifier f;
@@
-ret =
+return
f(...);
-return ret;
@@
identifier r.ret;
expression e1;
type t;
@@
(
-t ret = e1;
|
-t ret;
)
... when != ret
when strict
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/lirc/lirc_bt829.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c index 3b52f86a4bd3..4c806ba41323 100644 --- a/drivers/staging/media/lirc/lirc_bt829.c +++ b/drivers/staging/media/lirc/lirc_bt829.c @@ -387,11 +387,9 @@ static unsigned char do_get_bits(void) static unsigned int read_index(unsigned char index) { unsigned char __iomem *addr; - unsigned int value; /* addr = pci_addr_lin + DATA_PCI_OFF + ((index & 0xFF) << 2); */ addr = pci_addr_lin + ((index & 0xFF) << 2); - value = readl(addr); - return value; + return readl(addr); } static void write_index(unsigned char index, unsigned int reg_val) |