Fix some checkpatch.pl complained about in ah4.c
Signed-off-by: Jingyu Wang <[email protected]>
---
net/ipv4/ah4.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index f8ad04470d3a..873c5c495461 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -93,7 +93,7 @@ static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr)
continue;
}
optlen = optptr[1];
- if (optlen<2 || optlen>l)
+ if (optlen < 2 || optlen > l)
return -EINVAL;
switch (*optptr) {
case IPOPT_SEC:
@@ -165,7 +165,8 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
ahp = x->data;
ahash = ahp->ahash;
- if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
+ err = skb_cow_data(skb, 0, &trailer);
+ if (err < 0)
goto out;
nfrags = err;
@@ -352,7 +353,8 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
skb->ip_summed = CHECKSUM_NONE;
- if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
+ err = skb_cow_data(skb, 0, &trailer);
+ if (err < 0)
goto out;
nfrags = err;
@@ -553,8 +555,7 @@ static int ah4_rcv_cb(struct sk_buff *skb, int err)
return 0;
}
-static const struct xfrm_type ah_type =
-{
+static const struct xfrm_type ah_type = {
.owner = THIS_MODULE,
.proto = IPPROTO_AH,
.flags = XFRM_TYPE_REPLAY_PROT,
base-commit: 5957ac6635a1a12d4aa2661bbf04d3085a73372a
--
2.34.1
On Thu, Sep 08, 2022 at 07:12:51PM +0800, Jingyu Wang wrote:
> Fix some checkpatch.pl complained about in ah4.c
Please take a look at
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
You should of put v2 in the subject, and under the --- make a comment
about what changed relative to v1.
Please also read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
On Thu, 8 Sep 2022 19:12:51 +0800 Jingyu Wang wrote:
> Fix some checkpatch.pl complained about in ah4.c
>
> Signed-off-by: Jingyu Wang <[email protected]>
In general we don't take pure "checkpatch cleanups" patches in
networking. Please avoid sending them.