Received: by 10.213.65.68 with SMTP id h4csp482315imn; Fri, 16 Mar 2018 09:05:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELvYvpWV4vIjv05QG+7M9HoMlcHighYyI38D3X9U6PkAt6Wcx167Mq8ZCXXWGtKCQLgSputk X-Received: by 10.99.100.6 with SMTP id y6mr1872356pgb.254.1521216348149; Fri, 16 Mar 2018 09:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216348; cv=none; d=google.com; s=arc-20160816; b=a0hk82jB0Ko59MTRMYUgXZ6pCe4MPByztjemLVB49yJqPyGImx3B7qLfTuXwI+j3CH 1WUdUN7tsmL2LnnZJAXJhs+DF6JmiNFjkA77wBY5xbKHlg+X3Vp/TOQSPbcCtKWfwLdR HBJL5ZyGZoYNoBYeXpl4aIoMFrhZx3mJIVI1YoNO8y0QJckIt/78un+PpPQY0mLHt9nU H0/acXJANeR9fPqOGc179lEVDOgB0P1P66tbiCeyTbgD2K5Aavt8qxNZLUoXgnm072R+ QniRo2clesiWLASNMA59BqiXLERLP0+KxeTuwaRc1Z8yHUQ+9ZjULtl6mISG13AD2fzv /ydA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YAn7KIByulNyXqus6i5hCiHueJ2COzwjrUKx9FEDUow=; b=Qgf8+21Eg4JW6fwiUbd4+EAZs87/YGdbYJ/Jf3VNjEYLxPdJ/Z6O+OZ+cckv6/AVgt SFhJ21rbUEJ0qFDMeHaK9vlxZ9+Odw05+A8+9E5ipcZOWpLcJErWAmmsL6qis7U1/IYC YmR598ruqHgPnUdE8Kg2ezyNEgjh/GC74iqh/8Knf7QIeCA9d/2UCPMbqfNkEBal3dSX 27/dyrs2Qy18fvCTe1V+UVlKXhgDkPmO/gHPLwR8Kr4SVWEjhm9VmhluvblRWF3HVl2e f2kgXvtTfUKL6yYy2MkbFiwTNakVJjxOHq8b6Mt2hnkNI60b6sXAq2zhYnFr3g/cUWfp PdSw== ARC-Authentication-Results: i=1; mx.google.com; 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 a8-v6si6518068plz.320.2018.03.16.09.05.33; Fri, 16 Mar 2018 09:05:48 -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; 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 S934666AbeCPQD0 (ORCPT + 99 others); Fri, 16 Mar 2018 12:03:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44416 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754856AbeCPPmR (ORCPT ); Fri, 16 Mar 2018 11:42:17 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EA79DFC5; Fri, 16 Mar 2018 15:42:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Sebastian Reichel , Sasha Levin Subject: [PATCH 4.15 069/128] power: supply: sbs-message: double left shift bug in sbsm_select() Date: Fri, 16 Mar 2018 16:23:30 +0100 Message-Id: <20180316152340.168974451@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit 7d54d0d38ec42559c891526f079f1e035cd4b3ae ] The original code does this: "1 << (1 << 11)" which is undefined in C. Fixes: dbc4deda03fe ("power: Adds support for Smart Battery System Manager") Signed-off-by: Dan Carpenter Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/power/supply/sbs-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/power/supply/sbs-manager.c +++ b/drivers/power/supply/sbs-manager.c @@ -183,7 +183,7 @@ static int sbsm_select(struct i2c_mux_co return ret; /* chan goes from 1 ... 4 */ - reg = 1 << BIT(SBSM_SMB_BAT_OFFSET + chan); + reg = BIT(SBSM_SMB_BAT_OFFSET + chan); ret = sbsm_write_word(data->client, SBSM_CMD_BATSYSSTATE, reg); if (ret) dev_err(dev, "Failed to select channel %i\n", chan);