From patchwork Wed Jun 20 10:46:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omer Efrat X-Patchwork-Id: 10476907 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 D6E8C604D3 for ; Wed, 20 Jun 2018 10:47:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7F5F28E19 for ; Wed, 20 Jun 2018 10:47:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC04028E1D; Wed, 20 Jun 2018 10:47:37 +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 311F128E19 for ; Wed, 20 Jun 2018 10:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbeFTKrS (ORCPT ); Wed, 20 Jun 2018 06:47:18 -0400 Received: from mail-ve1eur01on0096.outbound.protection.outlook.com ([104.47.1.96]:25434 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750793AbeFTKrQ (ORCPT ); Wed, 20 Jun 2018 06:47:16 -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=N/dgrfjNqfP0GIv95HzL2iJsJ5WSXZdBMZGFOzk3g88=; b=Q/nqg8cPHJr9kR/mI/X+cUONTHDJwZmmXCqhAyuxbMMjzCnYOjS94abBk6rSHQLnq4YZX//K5y/ecoSc2tUR7nNpYNMKs76bG5z/WMGZfCyNVOwNEGF9YGW3ZHeQL4JJqMxCUivwAhWlDyR0flv24z8nW4ZpOlBXDkVjaGHmSfw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=omer.efrat@tandemg.com; Received: from omer-laptop.tandemg.local (37.142.120.98) by AM6PR02MB3621.eurprd02.prod.outlook.com (2603:10a6:209:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.14; Wed, 20 Jun 2018 10:47:13 +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 v4 3/5] batman-adv: use BIT_ULL for NL80211_STA_INFO_* attribute types Date: Wed, 20 Jun 2018 13:46:56 +0300 Message-Id: <1529491616-23222-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: AM0PR0402CA0018.eurprd04.prod.outlook.com (2603:10a6:208:15::31) To AM6PR02MB3621.eurprd02.prod.outlook.com (2603:10a6:209:2b::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c878995-14ad-4936-be5e-08d5d69b2ee5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3621; X-Microsoft-Exchange-Diagnostics: 1; AM6PR02MB3621; 3:C1iaG43nfGynDn8IJsg+p06Fv69paDOWyXu6UUdc5iY4rFaABg6P0dB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ktEhGhNCIfqYdrVtGvso3U/Scr+NiihiJlZwAH0vclQc2K6V7+xhZRe2IfOgf2yvWGszKQOEz+L/a0FpPQo3Y+veCzSdr9+mFWW6YihZE85Y7LJzpKfjNOhe+RTgREht+ng==; 4:57PjNHwSXUw3DxPsmU4HMP1W/teoY1qQUm0llfjqkBpVdu66r97hcC3s+QxANca0TEdSeZcvCU5rEoYyeanMuLqvimlkoOti2wOX4xHzpkUI9BAVw/Y7jGlA4EbKq10dDjoB9sZZtOAy8eD3WlNbr87p4kgtATBUNialXLd6xMYtMztCHlT42qkICOsXbgWOTE6NK27qtk2nmosCd6TVVddqj76eqPzOUsMWrHkhMqAORiHCDK9YAqpUAn8z3mIyALHlEq2OCZdT2G/RJEpy+Q== 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)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM6PR02MB3621; BCL:0; PCL:0; RULEID:; SRVR:AM6PR02MB3621; X-Forefront-PRVS: 070912876F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(39830400003)(346002)(376002)(366004)(189003)(199004)(44832011)(53936002)(16586007)(316002)(66066001)(476003)(47776003)(2616005)(956004)(105586002)(305945005)(7736002)(106356001)(68736007)(16526019)(26005)(186003)(4326008)(25786009)(15760500003)(8936002)(81156014)(486006)(81166006)(8676002)(575784001)(107886003)(86362001)(6506007)(52116002)(478600001)(6486002)(2906002)(6666003)(51416003)(386003)(5660300001)(50226002)(50466002)(59450400001)(36756003)(6116002)(3846002)(6512007)(48376002)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3621; 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; AM6PR02MB3621; 23:2JFlyDhngZrukTsEnX2djn9J16ltA0IjKI39Q7HPy?= =?us-ascii?Q?xIgEO54q1I0BSEksY5bPTxEIKQwFWkgzaGfQ5tnRXTjqyJUuPBIFl3q+hcnx?= =?us-ascii?Q?dgVcTox/DJXxorn1yLZ31lilg6kP4JWAVZY8UmDAlCDHRB4Mw54pVjkFMOHu?= =?us-ascii?Q?L+IcV3S3v2zXFNTek+2YnbtosuapTH8dkepaQ7qqUHHuZ8aQNX4qwBxg29qk?= =?us-ascii?Q?mWQvHLqPpPnyRshaMm58n/ISKAwIIIRamkEXZH+YjDBTXFKbri5anIhAGPLY?= =?us-ascii?Q?2x80+e+FnhuhF2QSNw9GkCG3CGfTv21GLuFtlatzIOOgEMvk/SvQ79KipU26?= =?us-ascii?Q?6EdbNy2O424UkUXG2l0lHYX2dS3ABjF0ZP+QCSeE1hfBhaELbYEGwvoOvQqQ?= =?us-ascii?Q?mD2mOVSOG77kIFegWtBX58+qi5ySjuo1TTuRQ6huG3cjWGkeL7PKwx86tMJK?= =?us-ascii?Q?t4EE2s1Vrou6DRYhCFsAyucTptuBQgwx+kmd6Q9OJDhjIb7fnve4xPqz+EAA?= =?us-ascii?Q?IooE9fu3Us1cso4pQ8Fej9D4Eqts1AnJ0ZzowTTvW5Yxa4lYWYr+mh41tmag?= =?us-ascii?Q?5skAzIaujzjMpYAEV92M5/YWZr3cafDaP+6QvDj+TDChsHoYj8Ox1fTgS8FH?= =?us-ascii?Q?nggWniUGRjGy1lV30C/UC2+egHZWPNRoZLDgYvFbazYcsDgnPvMSRDUJmdZ4?= =?us-ascii?Q?BC0TiCcU51Q03xJHvvowCTz89wjTp3gCtCLXfGaiTlFOjlppBVgk+uQaM1PH?= =?us-ascii?Q?wkNAA3sWT4Wn+Vz9ZpGHYxT9SR/3hUAImZBjI3acySNz/QcNv2UGT27omTts?= =?us-ascii?Q?YkdyQQQCFvWuG6QXny8Dz+EDBxI+DW2cfPwA1bYFVSIOo0qlLxJx/cpq9rCP?= =?us-ascii?Q?kRQz8Vs//NHn0TSULiYsGYoISzLotvcdFhpn/6r5u5IAH3OqtpBUpe2IEbyK?= =?us-ascii?Q?7PvraMDTHkS0xlvdfNsEj90QdeHBS2FwVZ2k6i0MD7vJF4wLnBUHzdbzmFp8?= =?us-ascii?Q?4hqW2XbNfLn9xgtq3e5hUO4tCwa3I/np5Ut4l1V18GnfzKzmZxwHKx2wi8tC?= =?us-ascii?Q?/rOEpdL09232cQbTQnh6KO5rtp5aZTchvK42lcBp9QUkV3ZchdvC7nkL7bs3?= =?us-ascii?Q?RyCTCuyJ6FwU0dTDBumZ69gSbVgvu+kBthEMEnBOs9kR2qL2vDlORShR2fmW?= =?us-ascii?Q?/y6ackdZQDSn5/xjdArqJlVfNwLphsi8GYjR7gIA07/x2+x1lFiOlJcbA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: bc3sVvw+OTP0QzjYFbQ7f9UxrShh9kGDkNZ5B51ZWIXE87p4Gaf5qUEU5mCqel+SmFkeSLj4hf22EUDl+IPd4fQHisH81Dle/YRSR92XKka8Pd1jx+ts0F+EM4/G6Wri4KjLHFeINvYzFya+y4tOtUp3j6LOMWvTgvL14t2npQntp140ASfB3bEUXz4ADhvGYESLGIneA3nOGb4BeJNvZbSn/A7Y6PS5D7Jwjl8WR7AajilUNEVHBmjUuhC0fRQMeffJag+oG6AlElMbj2EFwK8gUjwo//QgXB7vAYFFAwRg/17WcZ/f2C8cDCBJR0+5t28ZhLYuV2wx9l7rhUIwtA== X-Microsoft-Exchange-Diagnostics: 1; AM6PR02MB3621; 6:2CnQ25Pp3rmWRjKE32OVoMs932AFXtEgeK/lEKIBbJ40zYxRDUt39bNR7ak21wlOusYgKeI340iyiSFtqVlfpbtTHuoYc8lifiFBEX/S7/ZPIhxdX7JOF8jrVCIwBQdhP4LFL63gq9YLk8Y17T/QSP8T8L+3C8LeDr9JfU5pr8b0hssYlrnr4TalVM+Cvx5t2Te0B8dn3kT/adxD3x91mabD2Zaipo4dAEoUv1HaHueufiZU+FDMdZ3S9Q+IQA6ISeP/rFoWWh0vTkEBNatVdh28uhWx5dLPaa+qjGnbhIojIESVKpWkMfvt+cf61Vj96KjqG7HbUELvmxvmpyRdUXvm3qu0HQBrxvPf8B1pi0MI3qIWbBDcvKAhvtPnNeiV5fjaHd4AEKLstTX1FLZXCnVik5W2XnfqTb08Kx0SzBElXnQWjPsxuKwFYQtdv1VQrRUoOpZyyJm0oT14vdIZDA==; 5:i/R1HFgAaaBULAhOw/TkEqXKpD+Jy4TyfvkUiu5vkjp0FdQguoViheFp689UuOrECdd6+My7y3TD+n/ArrlWz4fmSXRUENbijkGFezbyrkCLA8LeoSnYjabWitH3zgFSMgNjwIsJ7OLGx5gSgGVyA6mzz4WzplCrL0GZKvhVi68=; 24:ulKfhEOvxfct4V5GUoNHvOHuo+4ggQzdjJeGWjnIITIk1EqvgsmTlZ+qjj7jdQC31senbeBLCc4VD8afn2p06ru/qzctbeZeWo22LvjI2qs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR02MB3621; 7:KkfEeqjPD0JZaMXgXAduJF0g2PfafHIg2gsTW3nULCy0YWj6+H66jaiOzh7i9hnK0ps9CgwF/rYA4ry+18S+eWatGYT2qLQMvk1aQjiB/zqWCLUmcRd1pX5XjjW7K0plvaHtGSRiGq5NcUJkVNilGNnaRXAnj8oYVN26AT9A8ojh6LM91ZtAX9iYNsFIdvf3fqMsN4qTW0ZlpBhGs93XKWRClpDnDfH6qVSJDjF9RETS4XdbgWkSQd0U/xAUsTtt X-OriginatorOrg: tandemg.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2018 10:47:13.3189 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c878995-14ad-4936-be5e-08d5d69b2ee5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d690b55a-f04a-454b-9f62-fb1e25467a25 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3621 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 71c20c1..2f0de55 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -114,7 +114,8 @@ 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;