mirror of https://github.com/torvalds/linux.git
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||
|---|---|---|
| .. | ||
| Adapter.h | ||
| Bcmchar.c | ||
| Bcmnet.c | ||
| CmHost.c | ||
| CmHost.h | ||
| DDRInit.c | ||
| DDRInit.h | ||
| Debug.h | ||
| HandleControlPacket.c | ||
| HostMIBSInterface.h | ||
| IPv6Protocol.c | ||
| IPv6ProtocolHdr.h | ||
| InterfaceAdapter.h | ||
| InterfaceDld.c | ||
| InterfaceIdleMode.c | ||
| InterfaceIdleMode.h | ||
| InterfaceInit.c | ||
| InterfaceInit.h | ||
| InterfaceIsr.c | ||
| InterfaceIsr.h | ||
| InterfaceMacros.h | ||
| InterfaceMisc.c | ||
| InterfaceMisc.h | ||
| InterfaceRx.c | ||
| InterfaceRx.h | ||
| InterfaceTx.c | ||
| InterfaceTx.h | ||
| Ioctl.h | ||
| Kconfig | ||
| LeakyBucket.c | ||
| Macros.h | ||
| Makefile | ||
| Misc.c | ||
| PHSDefines.h | ||
| PHSModule.c | ||
| PHSModule.h | ||
| Protocol.h | ||
| Prototypes.h | ||
| Qos.c | ||
| Queue.h | ||
| TODO | ||
| Transmit.c | ||
| Typedefs.h | ||
| cntrl_SignalingInterface.h | ||
| headers.h | ||
| hostmibs.c | ||
| led_control.c | ||
| led_control.h | ||
| nvm.c | ||
| nvm.h | ||
| sort.c | ||
| target_params.h | ||
| vendorspecificextn.c | ||
| vendorspecificextn.h | ||