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;
Am 20.05.2014 12:33, schrieb Peter Senna Tschudin:
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
Those concerns are valid but the code was like that in the original so
we should merge this patch as is and hope some volunteer will fix things
up in a follow on patch.
Fixing them in this patch would be a mistake anyway because of the one
thing per patch rule.
regards,
dan carpenter
Am 20.05.2014 13:41, schrieb Dan Carpenter:
Those concerns are valid but the code was like that in the original so
we should merge this patch as is and hope some volunteer will fix things
up in a follow on patch.
Fixing them in this patch would be a mistake anyway because of the one
thing