Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3193529ybd; Mon, 24 Jun 2019 21:25:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPlm1I1H04OdkW7uUh/XwHWNMlpDWuNoLw+IHgz0ilJE0b48FFrKL99CUk+PRZFTY/l/42 X-Received: by 2002:a17:902:9a42:: with SMTP id x2mr136900634plv.106.1561436741690; Mon, 24 Jun 2019 21:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561436741; cv=none; d=google.com; s=arc-20160816; b=duaPbMAIVFnQd28UFPL3lnL+/rsgBXWxIpCopX/+Odzi/b/Rs8ru9NIn66hDpgcD0J OxIZekq5sEDjq+ZwapotOmT70013+h7MI3KCJv6p11W481uuZeJj9zGYzBWZhpRjzDc3 Za5YJC4DfuqLbteluWqmAOLobB2wCvc41/ImwmEKL/AhiqraMiYiYuEHn4Hc0v5Mh6Vk 1NUcu/lmBR33wjfm+YiTwxDyeJTCSmsxPnydwfZiRtIIbLntTs9k6S9WNI+ReaHl/Yh8 5x3bFAaJEA8PIZoROCKZ3G7EaBcB7UZGCxmikMnSLaQpURaHsv+I9d4n/1cVD/5c+gUE 6Ddw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=5JwRNim3rOSWEmaOkWCuYyX/NF5I/OM/lvjIjZv9TgA=; b=ub4xLsU4pflvW71Xsnh1+meu3K0LogWkw4Y0vWd0xP4xKl0k+RKElGNdNdym1m1CFi gp+zA/a+vcwFKN0VwchgeDIPQahOekAMb2Wnepv30MuVnWMrLC7NJ0pgomTsNQEe+u4o 84aS7d4ADGFj2Uoj5h8wEmOEHkoITZ0+xZnze46iHIqcriSbSYJDcomXEdYVRqLX0yVv PXJaebOMoJ13CdIZDGRVoIZWz4gxkSxhDnI/6z36E/QaDWy99lB2rZVBiHV8D/cTDBbA PA6pzL1QZVsO1xyNfSz0qhdp71lOCgQL/GGHsnyrmPe3xUHN1960gOpJpDEpJKZTi2XU w3RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gt4q1QhM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si1465657pjv.98.2019.06.24.21.25.25; Mon, 24 Jun 2019 21:25:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gt4q1QhM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728645AbfFYEGt (ORCPT + 99 others); Tue, 25 Jun 2019 00:06:49 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40170 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfFYEGs (ORCPT ); Tue, 25 Jun 2019 00:06:48 -0400 Received: by mail-pl1-f196.google.com with SMTP id a93so8093806pla.7; Mon, 24 Jun 2019 21:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5JwRNim3rOSWEmaOkWCuYyX/NF5I/OM/lvjIjZv9TgA=; b=gt4q1QhMb1DH/lpvQ7aBuGothKXXSjA1h2R+DXuEwbbwhT+4GGxBNuQiJrNG3g6wlc 2sOM2sn6kNuDk65YciXdt6FXp9a8zFL91wUsRfPuALOsMq5ulGBgpq5zZ9rYyKFro2ti rkTC2gbwRznm72eBguYZkoLCBhvA7e6ovlEl+KbusRkQdgP8TESDeUnTi1AG9FtaMqhc vpqCQTGnQzukvTtXyn+hJmc6vqUMhESkcLhktKd6SkjsGlKG7T0inoRkqtUyi/xb6dKR lroymLNRVneRrp1OsqI/ooFoV9QAlBsqdsVLMEHsO9Ks9gYXFYWNK8hRHmc9QWbFSosv b4gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5JwRNim3rOSWEmaOkWCuYyX/NF5I/OM/lvjIjZv9TgA=; b=q8Fzg05AWD+2uxbovrEoIkbiocs+elKHz5+KzarfQz+qWkSijuambbdkGewgAtl79N lEWO79yC/TCV99FPN9T9Aoaw5zes4oKVMvhCJndiiausbd3kf2r6HZWFCHwCzQ+fgcmJ wDyxBG2bATyOu0lIViHHPNNkBzk3tHtAdvkh/JbjsOGmSoKnv14rGTIy1i/CxX9Bn+2J VmWpjj2xICkWEE6yYC8ZMqILkxf5oAtBtEGRBeQQIBXIULSHyTPTmie/T7R4U2HC6pr0 xe7KT9zdab/hXsO9xsnpyP5sVli56pYmS+prol8d0NOyn0UrPfyc0vxzqcOhd5awolnT 8jeg== X-Gm-Message-State: APjAAAXqCLMoJTdgltQVUct0LSFM1HYGTN+UFrme4yZllgmPfn5Ceaxk 26RCvalYSrhGMhdKHvZudoI= X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr108038324plb.295.1561435607482; Mon, 24 Jun 2019 21:06:47 -0700 (PDT) Received: from debian.net.fpt ([58.187.168.105]) by smtp.gmail.com with ESMTPSA id b24sm12408944pfd.98.2019.06.24.21.06.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 21:06:46 -0700 (PDT) From: Phong Tran To: tranmanphong@gmail.com Cc: acme@kernel.org, alexander.shishkin@linux.intel.com, alexander.sverdlin@gmail.com, allison@lohutok.net, andrew@lunn.ch, ast@kernel.org, bgolaszewski@baylibre.com, bpf@vger.kernel.org, daniel@iogearbox.net, daniel@zonque.org, dmg@turingmachine.org, festevam@gmail.com, gerg@uclinux.org, gregkh@linuxfoundation.org, gregory.clement@bootlin.com, haojian.zhuang@gmail.com, hsweeten@visionengravers.com, illusionist.neo@gmail.com, info@metux.net, jason@lakedaemon.net, jolsa@redhat.com, kafai@fb.com, kernel@pengutronix.de, kgene@kernel.org, krzk@kernel.org, kstewart@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux@armlinux.org.uk, liviu.dudau@arm.com, lkundrak@v3.sk, lorenzo.pieralisi@arm.com, mark.rutland@arm.com, mingo@redhat.com, namhyung@kernel.org, netdev@vger.kernel.org, nsekhar@ti.com, peterz@infradead.org, robert.jarzmik@free.fr, s.hauer@pengutronix.de, sebastian.hesselbarth@gmail.com, shawnguo@kernel.org, songliubraving@fb.com, sudeep.holla@arm.com, swinslow@gmail.com, tglx@linutronix.de, tony@atomide.com, will@kernel.org, yhs@fb.com Subject: [PATCH V3 14/15] ARM: bpf: cleanup cppcheck shifting error Date: Tue, 25 Jun 2019 11:03:55 +0700 Message-Id: <20190625040356.27473-15-tranmanphong@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190625040356.27473-1-tranmanphong@gmail.com> References: <20190624135105.15579-1-tranmanphong@gmail.com> <20190625040356.27473-1-tranmanphong@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is error from cppcheck tool "Shifting signed 32-bit value by 31 bits is undefined behaviour errors" change to use BIT() marco for improvement. Signed-off-by: Phong Tran --- arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index adff54c312bf..8904d16a8754 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -612,7 +612,7 @@ static inline void emit_a32_mov_se_i64(const bool is64, const s8 dst[], const u32 val, struct jit_ctx *ctx) { u64 val64 = val; - if (is64 && (val & (1<<31))) + if (is64 && (val & BIT(31))) val64 |= 0xffffffff00000000ULL; emit_a32_mov_i64(dst, val64, ctx); } -- 2.11.0