* [PATCH] ppp: Adjust indentation into ppp_async_input
@ 2019-12-09 22:38 Nathan Chancellor
2019-12-10 4:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2019-12-09 22:38 UTC (permalink / raw)
To: Paul Mackerras, David S. Miller
Cc: linux-ppp, netdev, linux-kernel, clang-built-linux, Nathan Chancellor
Clang warns:
../drivers/net/ppp/ppp_async.c:877:6: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
ap->rpkt = skb;
^
../drivers/net/ppp/ppp_async.c:875:5: note: previous statement is here
if (!skb)
^
1 warning generated.
This warning occurs because there is a space before the tab on this
line. Clean up this entire block's indentation so that it is consistent
with the Linux kernel coding style and clang no longer warns.
Fixes: 6722e78c9005 ("[PPP]: handle misaligned accesses")
Link: https://github.com/ClangBuiltLinux/linux/issues/800
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/net/ppp/ppp_async.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index a7b9cf3269bf..29a0917a81e6 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -874,15 +874,15 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2);
if (!skb)
goto nomem;
- ap->rpkt = skb;
- }
- if (skb->len = 0) {
- /* Try to get the payload 4-byte aligned.
- * This should match the
- * PPP_ALLSTATIONS/PPP_UI/compressed tests in
- * process_input_packet, but we do not have
- * enough chars here to test buf[1] and buf[2].
- */
+ ap->rpkt = skb;
+ }
+ if (skb->len = 0) {
+ /* Try to get the payload 4-byte aligned.
+ * This should match the
+ * PPP_ALLSTATIONS/PPP_UI/compressed tests in
+ * process_input_packet, but we do not have
+ * enough chars here to test buf[1] and buf[2].
+ */
if (buf[0] != PPP_ALLSTATIONS)
skb_reserve(skb, 2 + (buf[0] & 1));
}
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ppp: Adjust indentation into ppp_async_input
2019-12-09 22:38 [PATCH] ppp: Adjust indentation into ppp_async_input Nathan Chancellor
@ 2019-12-10 4:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-10 4:32 UTC (permalink / raw)
To: natechancellor; +Cc: paulus, linux-ppp, netdev, linux-kernel, clang-built-linux
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon, 9 Dec 2019 15:38:59 -0700
> Clang warns:
>
> ../drivers/net/ppp/ppp_async.c:877:6: warning: misleading indentation;
> statement is not part of the previous 'if' [-Wmisleading-indentation]
> ap->rpkt = skb;
> ^
> ../drivers/net/ppp/ppp_async.c:875:5: note: previous statement is here
> if (!skb)
> ^
> 1 warning generated.
>
> This warning occurs because there is a space before the tab on this
> line. Clean up this entire block's indentation so that it is consistent
> with the Linux kernel coding style and clang no longer warns.
>
> Fixes: 6722e78c9005 ("[PPP]: handle misaligned accesses")
> Link: https://github.com/ClangBuiltLinux/linux/issues/800
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-10 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 22:38 [PATCH] ppp: Adjust indentation into ppp_async_input Nathan Chancellor
2019-12-10 4:32 ` David Miller
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).