From: Marek Lindner <mareklindner@neomailbox.ch>
To: Joe Perches <joe@perches.com>,
"b.a.t.m.a.n" <b.a.t.m.a.n@lists.open-mesh.org>,
linux-kernel@vger.kernel.org
Subject: checkpatch: CHECK: No space is necessary after a cast
Date: Thu, 19 Feb 2015 13:35:23 +0800 [thread overview]
Message-ID: <2621923.3aVJ40SYcy@voltaire> (raw)
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
Hi Joe,
we have come across a checkpatch false-positive:
>>>>
static void batadv_recv_handler_init(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(batadv_rx_handler); i++)
batadv_rx_handler[i] = batadv_recv_unhandled_packet;
for (i = BATADV_UNICAST_MIN; i <= BATADV_UNICAST_MAX; i++)
batadv_rx_handler[i] = batadv_recv_unhandled_unicast_packet;
/* compile time checks for sizes */
BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);
BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);
BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);
..
}
<<<<<
The following warnings are triggered:
CHECK: No space is necessary after a cast
#440: FILE: main.c:440:
+ BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);
CHECK: No space is necessary after a cast
#441: FILE: main.c:441:
+ BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);
CHECK: No space is necessary after a cast
#442: FILE: main.c:442:
+ BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);
Can you make a suggestion / patch for checkpatch to better handle this case ?
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next reply other threads:[~2015-02-19 5:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 5:35 Marek Lindner [this message]
2015-02-19 19:55 ` checkpatch: CHECK: No space is necessary after a cast Joe Perches
2015-02-20 11:56 ` [B.A.T.M.A.N.] " Marek Lindner
2015-02-20 19:52 ` [PATCH] checkpatch: Improve "no space is necessary after a cast" test Joe Perches
[not found] <874mvq1w9v.fsf@kamboji.qca.qualcomm.com>
2014-09-29 18:02 ` checkpatch: CHECK: No space is necessary after a cast Joe Perches
2014-09-30 5:35 ` Kalle Valo
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=2621923.3aVJ40SYcy@voltaire \
--to=mareklindner@neomailbox.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=joe@perches.com \
--cc=linux-kernel@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