From: Arnd Bergmann <arnd@arndb.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] net: caif: fix misleading indentation
Date: Mon, 14 Mar 2016 15:18:38 +0100 [thread overview]
Message-ID: <1457965120-3155420-6-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1457965120-3155420-1-git-send-email-arnd@arndb.de>
gcc points out code that is not indented the way it is
interpreted:
net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen':
net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
return cfpkt_getlen(pkt);
^~~~~~
net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not
else
^~~~
It is clear from the context that not returning here would be
a bug, as we'd end up passing a negative length into a function
that takes a u16 length, so it is not missing curly braces
here, and I'm assuming that the indentation is the only part
that's wrong about it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
net/caif/cfpkt_skbuff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c
index f6c3b2137eea..59ce1fcc220c 100644
--- a/net/caif/cfpkt_skbuff.c
+++ b/net/caif/cfpkt_skbuff.c
@@ -286,7 +286,7 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
else
skb_trim(skb, len);
- return cfpkt_getlen(pkt);
+ return cfpkt_getlen(pkt);
}
/* Need to expand SKB */
--
2.7.0
prev parent reply other threads:[~2016-03-14 14:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1457965120-3155420-1-git-send-email-arnd@arndb.de>
2016-03-14 14:18 ` [PATCH 1/5] mlx4: add missing braces in verify_qp_parameters Arnd Bergmann
2016-03-14 17:57 ` Leon Romanovsky
2016-03-14 14:18 ` [PATCH 2/5] farsync: fix off-by-one bug in fst_add_one Arnd Bergmann
2016-03-14 14:18 ` [PATCH 3/5] ath9k: fix buffer overrun for ar9287 Arnd Bergmann
2016-03-21 14:23 ` Kalle Valo
2016-03-14 14:18 ` [PATCH 4/5] ath9k: fix misleading indentation Arnd Bergmann
2016-03-21 14:24 ` Kalle Valo
2016-03-14 14:18 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457965120-3155420-6-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=dmitry.tarnyagin@lockless.no \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®