Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbbBSFwt (ORCPT ); Thu, 19 Feb 2015 00:52:49 -0500 Received: from s1.neomailbox.net ([5.148.176.57]:7903 "EHLO s1.neomailbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbbBSFws (ORCPT ); Thu, 19 Feb 2015 00:52:48 -0500 X-Greylist: delayed 1026 seconds by postgrey-1.27 at vger.kernel.org; Thu, 19 Feb 2015 00:52:48 EST From: Marek Lindner To: Joe Perches , "b.a.t.m.a.n" , linux-kernel@vger.kernel.org Subject: checkpatch: CHECK: No space is necessary after a cast Date: Thu, 19 Feb 2015 13:35:23 +0800 Message-ID: <2621923.3aVJ40SYcy@voltaire> User-Agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7118432.r3sj3hsGxB"; micalg="pgp-sha256"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2145 Lines: 72 --nextPart7118432.r3sj3hsGxB Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart7118432.r3sj3hsGxB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJU5XYkAAoJEFNVTo/uthzABk4H/3K5BYigogqfUPD/yztgTAUJ iaOWKmpHTkVvRnnBiB+hDXTmERMpBuIWvnndCO4ewU25DtgJCr9siK+3m4UM9gr7 jdgPYGcKwxVfokJ/4Qb3jNYV1N8j9NFbir9PT1Q202s2Sgmf0RStbx0DmWIfxnx3 h6AX62ZXtx6LBjmVRmFVaih/ZCRYtti840w1uLwlWVbPzXrCXyHUc3Zj8PouiUIt GUI9R8troDfDUGMp8SnJvqSaVoNttqtwQZe/JXoKCycCUUF5W/UESCHRurUT79YF JXO0lVjwkQw6agYc0x61xmlVYZhuPXCfSgpXnNntpsbdPalNaoeZGFnGlE5YKyc= =FOGe -----END PGP SIGNATURE----- --nextPart7118432.r3sj3hsGxB-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/