* [PATCH] esp4: remove redundant initialization of pointer esph
@ 2018-01-30 14:53 Colin King
2018-02-02 7:37 ` Steffen Klassert
0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2018-01-30 14:53 UTC (permalink / raw)
To: Steffen Klassert, Herbert Xu, David S . Miller, Alexey Kuznetsov,
Hideaki YOSHIFUJI, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer esph is being assigned a value that is never read, esph is
re-assigned and only read inside an if statement, hence the
initialization is redundant and can be removed.
Cleans up clang warning:
net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during
its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/ipv4/esp4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 296d0b956bfe..97689012b357 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -654,7 +654,7 @@ static void esp_input_restore_header(struct sk_buff *skb)
static void esp_input_set_header(struct sk_buff *skb, __be32 *seqhi)
{
struct xfrm_state *x = xfrm_input_state(skb);
- struct ip_esp_hdr *esph = (struct ip_esp_hdr *)skb->data;
+ struct ip_esp_hdr *esph;
/* For ESN we move the header forward by 4 bytes to
* accomodate the high bits. We will move it back after
--
2.15.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] esp4: remove redundant initialization of pointer esph
2018-01-30 14:53 [PATCH] esp4: remove redundant initialization of pointer esph Colin King
@ 2018-02-02 7:37 ` Steffen Klassert
2018-02-14 11:48 ` Steffen Klassert
0 siblings, 1 reply; 3+ messages in thread
From: Steffen Klassert @ 2018-02-02 7:37 UTC (permalink / raw)
To: Colin King
Cc: Herbert Xu, David S . Miller, Alexey Kuznetsov,
Hideaki YOSHIFUJI, netdev, kernel-janitors, linux-kernel
On Tue, Jan 30, 2018 at 02:53:48PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer esph is being assigned a value that is never read, esph is
> re-assigned and only read inside an if statement, hence the
> initialization is redundant and can be removed.
>
> Cleans up clang warning:
> net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during
> its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
I've queued this for ipsec-next, will be applied
after the merge window.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] esp4: remove redundant initialization of pointer esph
2018-02-02 7:37 ` Steffen Klassert
@ 2018-02-14 11:48 ` Steffen Klassert
0 siblings, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2018-02-14 11:48 UTC (permalink / raw)
To: Colin King
Cc: Herbert Xu, David S . Miller, Alexey Kuznetsov,
Hideaki YOSHIFUJI, netdev, kernel-janitors, linux-kernel
On Fri, Feb 02, 2018 at 08:37:50AM +0100, Steffen Klassert wrote:
> On Tue, Jan 30, 2018 at 02:53:48PM +0000, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Pointer esph is being assigned a value that is never read, esph is
> > re-assigned and only read inside an if statement, hence the
> > initialization is redundant and can be removed.
> >
> > Cleans up clang warning:
> > net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during
> > its initialization is never read
> >
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> I've queued this for ipsec-next, will be applied
> after the merge window.
Now applied to ipsec-next, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-14 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 14:53 [PATCH] esp4: remove redundant initialization of pointer esph Colin King
2018-02-02 7:37 ` Steffen Klassert
2018-02-14 11:48 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®