From patchwork Sun Jun 17 10:06:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omer Efrat X-Patchwork-Id: 10468743 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0AAB96029B for ; Sun, 17 Jun 2018 10:07:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2C702881E for ; Sun, 17 Jun 2018 10:07:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6A80288CF; Sun, 17 Jun 2018 10:07:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F202881E for ; Sun, 17 Jun 2018 10:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933473AbeFQKHE (ORCPT ); Sun, 17 Jun 2018 06:07:04 -0400 Received: from mail-db5eur01on0104.outbound.protection.outlook.com ([104.47.2.104]:45086 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933410AbeFQKHC (ORCPT ); Sun, 17 Jun 2018 06:07:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tandemg.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ibvmfpmoLbIHIxxgp0HlBGXgKnrIcuHph4qQtugywI=; b=LxkbVJJHcBy42atNzCNIf9NSYc9hALQ6MBXzbEtPnQFluvUiczDpx+je3m8EjXwA+RktPgwOcLBbs5/OYoocphI2vSDgPdy1bG1d+oerliXnYSNhcAPH2cPyC2A0SNGbceAymTcbCt1kWRnYpqgS3GcRW4nz8zhsdhJJS5akIyw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=omer.efrat@tandemg.com; Received: from omer-laptop.tandemg.local (37.142.120.98) by AM0PR02MB3620.eurprd02.prod.outlook.com (2603:10a6:208:3f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Sun, 17 Jun 2018 10:06:59 +0000 From: Omer Efrat To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org Cc: Omer Efrat Subject: [PATCH v3 3/5] batman-adv: use BIT_ULL for NL80211_STA_INFO_* attribute types Date: Sun, 17 Jun 2018 13:06:54 +0300 Message-Id: <1529230014-17897-1-git-send-email-omer.efrat@tandemg.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [37.142.120.98] X-ClientProxiedBy: LO2P265CA0076.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::16) To AM0PR02MB3620.eurprd02.prod.outlook.com (2603:10a6:208:3f::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ad136ed-3e65-44f5-0e66-08d5d43a10f5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM0PR02MB3620; X-Microsoft-Exchange-Diagnostics: 1; AM0PR02MB3620; 3:PZPxenhzzx8vqaABubWVoetraPg+EsrFQAFbOouAliR3fPs5Zt8+jF4ZFBRUmT6758Zflv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R0dY18Zl9REOGyAOL1v6YLAx40Pq7JGo/u4f/jE8F2BqlqXsEN43Bs9VJSiWVMCRvUi9BmTEEU0np6lyCg5TxFEfGs+/wwzI1d02DmfReC/O7ejTC7NA==; 4:eGPi3E42ajMCiky5OgVVHK24mVl7hpEs2KLo5Qq76PDIkPy/JYCbMAwNITjqHj/SgCjGDCetw5HeNG7xeYuLcpK5zmxLUKEn9VWu/oGembOY6QtXRG/PdggXg0adMO/D9MdeP/vp4oynT5yRlwzUZsYAahMCA5xsLlFvspZ23O57gUxdpdx/EKpUWVVbNzFDTrfcc1wDfOPkytUuE4GDqVN3CTnF4YoQFz/1wb2sNIT6xRKDGrepmN+EPHkMMN5YvkZagk/YdOQZk3LxBZG7lA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM0PR02MB3620; BCL:0; PCL:0; RULEID:; SRVR:AM0PR02MB3620; X-Forefront-PRVS: 07063A0A30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39840400004)(39380400002)(376002)(346002)(396003)(189003)(199004)(6116002)(2616005)(68736007)(52116002)(51416003)(105586002)(106356001)(59450400001)(26005)(16526019)(6506007)(386003)(97736004)(186003)(478600001)(36756003)(44832011)(486006)(5660300001)(3846002)(50466002)(48376002)(956004)(476003)(6666003)(6486002)(2906002)(81156014)(8676002)(86362001)(50226002)(25786009)(8936002)(66066001)(53936002)(7736002)(47776003)(4326008)(107886003)(6512007)(16586007)(316002)(81166006)(15760500003)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR02MB3620; H:omer-laptop.tandemg.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: tandemg.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR02MB3620; 23:8LA5Dj6vhpVxwBtf8nm63RXxsIYXwR0JLHRS01o7+?= =?us-ascii?Q?kjWfy5PNAFMF7cSNdk+00AB9uzBDgj0KVhvJ2IAM+B3exGGiublmHs8hJs9E?= =?us-ascii?Q?c4ctiyoohxdvhoSPm5Vt3B5Uj7FLEMVGVimnTE2isTb/JsqlBKfY96ZNlCw+?= =?us-ascii?Q?lKUlXummseg+rsDeopPWeBSRgl1+DuISGlnMiXu1lnA5zHIyVfPtKWeQX5+q?= =?us-ascii?Q?vhKMRchoAEkehP7JHf9fAadr/fSlZenbrC/3IQxwq4JPnssGOTzoLMd6q+f+?= =?us-ascii?Q?kqY3q2E23PYcNt5v3WGYTqFR2toPbcWjlMX8IJEq6qb9w0Gg5OtHxTzLRiWb?= =?us-ascii?Q?DBbjOa6qNpYNFFPY8ueRS2HIWRJYbAjDCFiC0Xc89K0HMJCjGWew7b0+hwtP?= =?us-ascii?Q?43s13H5vErl+ce0k9ALKSfpUS3vMDR+zockpA9oLKtliCbkdpZynmDqv2hyJ?= =?us-ascii?Q?FO1vH1EeeodOQc1nKQJRytI+PD5bcQNwaWaVF737FjVA7unH2Wnxw24eEm60?= =?us-ascii?Q?/sp6Mk4FWnWOok8H24mgu8iIROLRgU1Dh1q0feqB0q44lm2NhtyQPE+U6HYx?= =?us-ascii?Q?90sbaowAW6wl+H5aV9BKCpoXYuggrsRdXgGMsmdR5skidJ+ibIFtg6vHfkCF?= =?us-ascii?Q?bGW1vvCUl22tiBarOrqGr+5Z2G1wU0+KyDuMyPq34NtTPH6+ZfNqTunvHR2E?= =?us-ascii?Q?bcJmoRLaVQvxszLwSqjsU1ORn+u9B4SDqKa341LUFQ4NkYsJii8EXjpOp2x1?= =?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YzNTl4OTPGsqBVfeCkUz9OntHara/OYuspRDIqMUErViF2WBvsXUDwHNiBrPp0MkZ7ckXtmMaiddh7OX96PmL/OCyyg283RIFLCsCo+4ndhJmsepcGNW4J41zTIJa8cjJjJeQk8mVZsXOuXTl2hW6rHRK42f43oPr/+xkCG14o6yoJd7D0ye4vLCl/eeeJTByg5pWEvYH4WJd8idw4zXhe4oA6EQ==; 5:eXxsms+Kk94B8FCOlmnJ9j1tlRR98VlLlMHCCbPLHdxJphSJRZQI1uvJK7xKFI7FkyC6YD29RAb4NYo6+oIfGSm/aP+kWaUJDhE7kFoLcq0vo34uj9J8P58oI59jS7i/59bKglF+/8SOOYQ67k5xlr+AknQ81/LB1N8EMwgnsE8=; 24:wwI5Yt5TOR235pvFfInixEcbyzdcUyEKI/a4z0Ta1CxK8N6Ft5AljafphAoRXY5RrluYBnb/tHFb9kSmDdVy+bQRstou8O/lytFvkBqXWM4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR02MB3620; 7:1Q6WZDFxrTKgTJKeUTRwwnHXJgdMslBzVGF7r5Ju59RG75/ir69adFowpglMbFdFLtPDG8kXn9zf9d+hC4Xf0Jllyccb4XwqWHtHIGZ8PRByLp4x/G0ufSVIhRyH93RryrRlz6kd313+MEweQylHqBgDFX1bFykL3RD57JUzCr46+8vaviwWHZfzCik4XNGe2guH4f/Owuo/Crfzd//RnefCTcrFSfaWcMSYTYQmzzS5nn8vCq64w839kFbMnFR1 X-OriginatorOrg: tandemg.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2018 10:06:59.5586 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ad136ed-3e65-44f5-0e66-08d5d43a10f5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d690b55a-f04a-454b-9f62-fb1e25467a25 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR02MB3620 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The BIT macro uses unsigned long which some architectures handle as 32 bit and therefore might cause macro's shift to overflow when used on a value equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards). Since 'filled' member in station_info changed to u64, BIT_ULL macro should be used with all NL80211_STA_INFO_* attribute types instead of BIT to prevent future possible bugs when one will use BIT macro for higher attributes by mistake. This commit cleans up all usages of BIT macro with the above field in batman-adv by changing it to BIT_ULL instead. Signed-off-by: Omer Efrat --- net/batman-adv/bat_v_elp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 71c20c1..71e6474 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -114,7 +114,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) } if (ret) goto default_throughput; - if (!(sinfo.filled & BIT(NL80211_STA_INFO_EXPECTED_THROUGHPUT))) + if (!(sinfo.filled & BIT_ULL(NL80211_STA_INFO_EXPECTED_THROUGHPUT))) goto default_throughput; return sinfo.expected_throughput / 100;