* [PATCH core-next] net/core: remove unneeded variable
@ 2021-12-10 2:20 cgel.zte
2021-12-10 2:50 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-10 2:20 UTC (permalink / raw)
To: davem
Cc: kuba, pablo, contact, justin.iurman, chi.minghao, netdev,
linux-kernel, Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
net/core/lwtunnel.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index 2820aca2173a..c34248e358ac 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH core-next] net/core: remove unneeded variable
2021-12-10 2:20 [PATCH core-next] net/core: remove unneeded variable cgel.zte
@ 2021-12-10 2:50 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-12-10 2:50 UTC (permalink / raw)
To: cgel.zte
Cc: davem, pablo, contact, justin.iurman, chi.minghao, netdev,
linux-kernel, Zeal Robot
On Fri, 10 Dec 2021 02:20:12 +0000 cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> net/core/lwtunnel.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
> index 2820aca2173a..c34248e358ac 100644
> --- a/net/core/lwtunnel.c
> +++ b/net/core/lwtunnel.c
> @@ -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);
I don't think any of your "remove unneeded variable" patches are worth
applying, sorry.
This one doesn't even build.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-10 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 2:20 [PATCH core-next] net/core: remove unneeded variable cgel.zte
2021-12-10 2:50 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).