]> git.karo-electronics.de Git - linux-beck.git/commit
bfa: remove useless return variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Sat, 31 May 2014 13:14:05 +0000 (10:14 -0300)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 21:16:55 +0000 (17:16 -0400)
commit0e772b33a14a5fd27f1efce6855682323df9f9b8
tree5ae69711d038b783a65289bc77cc927d9f89d293
parent03a6c3ff3282ee9fa893089304d951e0be93a144
bfa: remove useless return variables

This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
    when strict
return
- ret
+ C
;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/bfa/bfad_bsg.c