Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3440236imu; Sun, 11 Nov 2018 15:08:45 -0800 (PST) X-Google-Smtp-Source: AJdET5dE+kRXs35gzHF5agQn5PBqt7g/R6EJsl/l8cwZjXXCdcdhViIV/D+c6F6z5+KGLxnHzKjj X-Received: by 2002:a63:af18:: with SMTP id w24mr15546779pge.385.1541977725876; Sun, 11 Nov 2018 15:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977725; cv=none; d=google.com; s=arc-20160816; b=OmrPb3wb7rOaNxa+IzVuipZr6EmBW7BRERLrBwUgmy0ZpCY9Sk5KpS/mmcCMLc6KHb OjLxZ4XgnJtbm+rn5D+CDMW9SyP0KHK+AjhLbvnRgsCUGDwLZpjQdIpF/URj9tNhjlZF wXjQQMSFLXR9+Uejq4Mh8VfVmtJIzvTgKhTHEnFvYfIjkx/2oycvZx572SFZqz0R3OWG 4lbt4ul9oOUyq1RlteyWqnpykWxN850GJL4p1NKb2ZMiC1l50gfy3ZJFDoxz9z+l6Rob 1GwKZre8CwW6/9RgGaOonW5MAvhMnl5N+r4CB9OKKAh7zlho6yMZIqYItQ5wwWDSF10u mi4Q== 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=B36pRk+nziodnydm2JYa/SkLJo/uLr57vUU1hC884Ug=; b=kqvrWB5cbNUQrGMDsTSkfH7895zm8k7coYxeWRdQvhRUUx55ttSC7S0v8uVfb+gOkr cRh4On/yHdoZcnh2TGdr/N8wthddlbgcqPwuf6ks1//dn1KQg1FzOeXb2Nk5zREN3HCW ie2h1L1t7IQwPOvMUq9zXM8Aj08SYQQuTTintwRZ2TTdsCTX5pM+Zu67WVTWGoexgH8Z Oj9jsa1yRWqc1+fAUWLVCF/dDnN8DpixZ2o9pme6Sxk4KLcSYb6D/dRx16zOmXITD7EX B1/aiEHAU/P8QIueGtLUB2ml5Yf4IykkQ7Qj8m+aGCVSVWGaHqt9WCVkY9vTxEqK2U8L 54gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yycMpqez; 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 f69-v6si15143777pgc.304.2018.11.11.15.08.30; Sun, 11 Nov 2018 15:08:45 -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=yycMpqez; 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 S2390313AbeKLI6I (ORCPT + 99 others); Mon, 12 Nov 2018 03:58:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:51168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390262AbeKLIWG (ORCPT ); Mon, 12 Nov 2018 03:22:06 -0500 Received: from localhost (unknown [206.108.79.134]) (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 E7D092241E; Sun, 11 Nov 2018 22:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975530; bh=eQjSWWdDnrV9elwaelXW6NvOwcrnyrdoY/53MRVSUoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yycMpqezD8oASG9o5wl+Rfvs59KowfQcaKq92iBb2OXih6T1oV6+l3nBGn65+phUm wEcxO7sItjoSyDSviN4CyzMtW/RJyEeBJCAlOnxxHI3FrLbFBSizLOvdsVJ7uVqoBo kRLeQgpHUwa/lfQiW67bIX/7dwmYHql+OT2yBOOM= 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.14 036/222] net: qla3xxx: Remove overflowing shift statement Date: Sun, 11 Nov 2018 14:22:13 -0800 Message-Id: <20181111221651.427637438@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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)); } /*