net/core: remove unneeded variable
Subsystems (3)
PATCH 1/1 net/core: remove unneeded variable
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- net/core/lwtunnel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
net/core/lwtunnel.c +1 -5
@@ -63,11 +63,7 @@ static const char *lwtunnel_encap_str(enum lwtunnel_encap_types encap_type)struct lwtunnel_state *lwtunnel_state_alloc (int encap_len) { -struct lwtunnel_state *lws; - - lws =kzalloc (sizeof (*lws) + encap_len,GFP_ATOMIC ); - -return lws; +return kzalloc (sizeof (*lws) + encap_len,GFP_ATOMIC ); }EXPORT_SYMBOL_GPL (lwtunnel_state_alloc);
Signature · 1 line
2.25.1
Jakub Kicinski
maintainerQuoted 16 lines · On Fri, 10 Dec 2021 02:20:12 +0000 [email protected] wrote:
From: Minghao Chi <[email protected]>
Return status directly from function called.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- net/core/lwtunnel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)net/core/lwtunnel.c +0
-0@@ -63,11 +63,7 @@ static const char *lwtunnel_encap_str(enum lwtunnel_encap_types encap_type)
net/core/lwtunnel.c static const char *lwtunnel_encap_str(enum lwtunnel_encap_types encap_type) · line 68
Quoted 10 lines
net/core/lwtunnel.c +1
-5struct lwtunnel_state *lwtunnel_state_alloc (int encap_len) { -struct lwtunnel_state *lws; - - lws =kzalloc (sizeof (*lws) + encap_len,GFP_ATOMIC ); - -return lws; +return kzalloc (sizeof (*lws) + encap_len,GFP_ATOMIC ); }EXPORT_SYMBOL_GPL (lwtunnel_state_alloc);
I don't think any of your "remove unneeded variable" patches are worth applying, sorry.
This one doesn't even build.