Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3006746imu; Mon, 19 Nov 2018 09:16:04 -0800 (PST) X-Google-Smtp-Source: AJdET5eqD8oZg9gFfVJ8n6mWPVxfg/3slw/2OoJd5nWLGGCwIOk/Eu8M2bnk/LnKrxsW7IktfznM X-Received: by 2002:a63:5f41:: with SMTP id t62mr20855462pgb.76.1542647764252; Mon, 19 Nov 2018 09:16:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647764; cv=none; d=google.com; s=arc-20160816; b=DwmCXIyWNI2+OJrQugW/hiHW4bAHIGgMXQDfzdHSeTqzNE6d/y9/U808UUIDlSqtJq Y9F27vTna+R/blW6ov3F5FHt54KC4KsuFH1e/zQyP1U3nIpPBV9flSr4fvTxAzGybmgG p/W+cE/OdiK/fxJ4wkOb7XKC2H1g1rNuA6qTSVZIvvZg+JfV7tkpksGlAzCRt9vu8CIr S746gjbeHqrkTpuOPOoppPoqAi7lX2L2H/mGa7tE8kqjKV9IpZ6Zfn8qbVSdZ2I8wQaF NCo0syz4opSGYMheBvUplx/UDmanj0ucMFtaYM6p6+edaQXZ80BaO5vNh+Mo1SpcMeBG sBVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5CKkqukoYBbqXsu8gXhxZbMs36JJ3QGjFYEJsV6ncGg=; b=IL5LXHvH+stwtLkovNdD4C3nKB+gAArG1mrCnVLaPdQneQifC4usIBwG8+iOJAUAYN 3aY78vCwctu9kKNVRNrdJqPQ0+D80A/YMiG97GqR+T4kCWGT2sdMhmBem8/nKMYhPEYp irJhWqbZqAr8HncXVMCN8H65RwaEi9shcWcrn2liz3yGYwoK6aEP/8JiPRXE38bUsKIz DhnuSlAzSGsI9jfH9VAHiNWleRYTl4UfyBoQoEDE7K4VvWRYeJYiM+NQkE1Myj/d8212 aXeVY8Eh8LhpeNclyVw1mZd3nBRBEO48nMf/5Gvs9gUfrhwvUY7i4i0Tb/a5Ra3YNrZ3 ESSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mgoG/ULx"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si38128331pgg.1.2018.11.19.09.15.48; Mon, 19 Nov 2018 09:16:04 -0800 (PST) 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=@kernel.org header.s=default header.b="mgoG/ULx"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406456AbeKTD20 (ORCPT + 99 others); Mon, 19 Nov 2018 22:28:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:42720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405461AbeKTD2Y (ORCPT ); Mon, 19 Nov 2018 22:28:24 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49FBB2148E; Mon, 19 Nov 2018 17:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542647047; bh=avZYWF6edLfAMvv+G6KHyynGX7Psc+Gamql/GIDFZlA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mgoG/ULxU/8agd9Dc+QDoQE0VUenQXepmfhxHCWyjUfgnQXEGvaxooQ4XqtqzI+p1 PgkNA7UedFroOVNkQjMAedPilSZs4Vb56ko9Kk0MN2c21iYoq8FdQAIDOP7ULpOvj3 AxDd+ZCudO8e4fNp+pYoPHJUXE+NCmiMTCMtnS8w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , "David S. Miller" , Sasha Levin Subject: [PATCH 3.18 08/90] net: qla3xxx: Remove overflowing shift statement Date: Mon, 19 Nov 2018 17:28:50 +0100 Message-Id: <20181119162622.136033534@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162620.585061184@linuxfoundation.org> References: <20181119162620.585061184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Chancellor [ Upstream commit 8c3bf9b62b667456a57aefcf1689e826df146159 ] Clang currently warns: drivers/net/ethernet/qlogic/qla3xxx.c:384:24: warning: signed shift result (0xF00000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data)); ~~~~~~~~~~~~~~ ^ ~~ 1 warning generated. The warning is certainly accurate since ISP_NVRAM_MASK is defined as (0x000F << 16) which is then shifted by 16, resulting in 64424509440, well above UINT_MAX. Given that this is the only location in this driver where ISP_NVRAM_MASK is shifted again, it seems likely that ISP_NVRAM_MASK was originally defined without a shift and during the move of the shift to the definition, this statement wasn't properly removed (since ISP_NVRAM_MASK is used in the statenent right above this). Only the maintainers can confirm this since this statment has been here since the driver was first added to the kernel. Link: https://github.com/ClangBuiltLinux/linux/issues/127 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/qla3xxx.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c @@ -382,8 +382,6 @@ static void fm93c56a_select(struct ql3_a qdev->eeprom_cmd_data = AUBURN_EEPROM_CS_1; ql_write_nvram_reg(qdev, spir, ISP_NVRAM_MASK | qdev->eeprom_cmd_data); - ql_write_nvram_reg(qdev, spir, - ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data)); } /*