Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2982789imu; Mon, 19 Nov 2018 08:58:29 -0800 (PST) X-Google-Smtp-Source: AJdET5dCkVvVIZQTu2UIcdJtq1oPQXT+n4Uqc8tyvyh/s0XH4QtukEhCBL3BXWu4JqulxyEUyYJt X-Received: by 2002:a62:1212:: with SMTP id a18mr1168587pfj.217.1542646709306; Mon, 19 Nov 2018 08:58:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542646709; cv=none; d=google.com; s=arc-20160816; b=DNqv6zNNkyuWG6FE7sVLbh0WKmOX05gBI62hc6K/JlK/7u2hw3D5CSBpFlsPjNcFtL gr3IWNUnd1kaigtVUrXqH8r5Q60AwaYbvi4BpLoE77QwStHy2v8uYWSxq6LSk4ia3qZE WbKfASjj0cn89TcjRpSc000pFJFfnKJrz1wZSUcpAIWEVD14fw1RLPgyItOCbhXyneXy cYyQllm0HQFZCD2g7gPY+WA9vcg9KUTw69l2ZN1ShU/N5fIMoMTktbjftXt3YH/wJhs1 codWTSFz5artmigkqp9LISZWQeKQTwJStA+lBSEokeyD9ijAxOMys/r2uM56Jymo4DQS McMw== 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=t1o0j5hFIWcWoDbd3GFsotYLZjfgJFXBxpXnFWZv8qo=; b=HZoMAflo0i1D7CuBtUC7H/fzcm2u0oV7/tIOc4yD+3Ei2A6LtyEIf6qVtQKfOgiQoK NcMtN4j8DcYs+uwHZosDZxCMpqyc9lhYttkdMDBEPOSL6i+D54euO0TSULHhGi6vhrME mEEohIWWqHIkxO44Y0mPICV23ujnzO50d4v4q8AhtXxUgsvnOxiwfh8ABM23UNslRjfq yo9POpDEzB+JC0s/ZtgpYRPoAw/gsnwBV1+huau8WLRRWXOvh8s5LXX2VyWGnWOeIhxH 5rJ3YORSd0AYjR98Hz3StnfV2zGzxCw0jF4a2G8bYbks4xP/AT2t8pOZWPzGSqB9mvP8 OuZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sNKCCyuL; 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 r28si36462378pgm.317.2018.11.19.08.58.13; Mon, 19 Nov 2018 08:58:29 -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=sNKCCyuL; 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 S2404254AbeKTDUl (ORCPT + 99 others); Mon, 19 Nov 2018 22:20:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:60098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403780AbeKTDUj (ORCPT ); Mon, 19 Nov 2018 22:20:39 -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 BB3BF2148E; Mon, 19 Nov 2018 16:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646585; bh=ZVAcHvgvTG/YTcE+pqg54M1IfqK7u/tfAgFjv+2feoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNKCCyuL6etO+zOQNoxrRDjagsbmwrC6gQLqdOzIHEScVYU5/+HMGM/dsffAObvTG 5oCwuuO3++B70nb0F26WQSSEWW1H6mWHF5NZcM35hTe2PzcP5iNWjyv6YSZv0I4KPc tnEvBWFwIQMs87IsoJJ8LuBH6PAmz/W2jNaJurbE= 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 4.4 014/160] net: qla3xxx: Remove overflowing shift statement Date: Mon, 19 Nov 2018 17:27:33 +0100 Message-Id: <20181119162631.754347160@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162630.031306128@linuxfoundation.org> References: <20181119162630.031306128@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 4.4-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 @@ -380,8 +380,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)); } /*