From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: net-caif: add CAIF generic caif support functions
Date: Tue, 24 Feb 2015 13:23:44 +0000 [thread overview]
Message-ID: <20150224132344.GA828@mwanda> (raw)
Hi Dmitry,
The patch 15c9ac0c80e3: "net-caif: add CAIF generic caif support
functions" from Mar 30, 2010, leads to the following static checker
warning:
net/caif/cfpkt_skbuff.c:289 cfpkt_setlen()
warn: bad indenting.
net/caif/cfpkt_skbuff.c
275 int cfpkt_setlen(struct cfpkt *pkt, u16 len)
276 {
277 struct sk_buff *skb = pkt_to_skb(pkt);
278
279
280 if (unlikely(is_erronous(pkt)))
281 return -EPROTO;
282
283 if (likely(len <= skb->len)) {
284 if (unlikely(skb->data_len))
285 ___pskb_trim(skb, len);
286 else
287 skb_trim(skb, len);
288
289 return cfpkt_getlen(pkt);
I don't think curly braces were intended here around the else, but soon
the static checker will suggest them. I wouldn't be surprised if some
already do.
290 }
291
292 /* Need to expand SKB */
293 if (unlikely(!cfpkt_pad_trail(pkt, len - skb->len)))
294 PKT_ERROR(pkt, "skb_pad_trail failed\n");
295
296 return cfpkt_getlen(pkt);
297 }
regards,
dan carpenter
reply other threads:[~2015-02-24 13:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150224132344.GA828@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.