Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp513970ybl; Fri, 10 Jan 2020 02:23:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyPQk1tdgvNG/HV7h2Nrr+xjNaO20UbV66ru2vZrHJiqDUcQr116BghBA1Yev8pWf+bXOoy X-Received: by 2002:aca:aac3:: with SMTP id t186mr1668236oie.71.1578651818264; Fri, 10 Jan 2020 02:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578651818; cv=none; d=google.com; s=arc-20160816; b=i7OO2009sAcOA4EL/PxjkfXoG8HF4nv5pz/JOE+QSymMKq5vBDP7Dw1IjdihXACbSx NH+Mpg/5SpByJt4+5taaZHF28fmMY78mNoH7W3wTDsc8vC3QmjRral940wsvUv4kJFDU JHvJ+BWwiRUnmug0bYM9NoKaIAdMv6YSalCgKs9EwAFUANYGNLUVm/w7TRUF2b+eX05P 4UEa8I9LeCd3FlTuwN6gNgXAihO2xtR+qK5X1rKzQDtaPZt2UIthCbl1H9U6cxzx8uKB NwDuvTm82+m0EJXwxQ/4QY4TD28H1xTdpkln7HbtlwHoNJVDW4zl4SarjKa5Sq8hxC4H drMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Eu2bs9SVEYgGGD1mosILhHkiZtknham97n87Dpy2QYk=; b=kU+x+eux7E1Gq56Vn3RzKMstW4IJd27II9pvIBZgYb58FAGqbbzcglZoduBZtM809C Dy00Moxu1GLPqMFUbFFMu+M3oOstXHh4PZTFDvq1mdFiRJzCetGaP1qyEX0mGpvzgXhO Ano0Of3D6MFNRqH4nlzaAnErXh2ZpIqD9/fVRr6zOHLC2deF5MO2okfY2vlp8gN6q2JO 8iEyqZ5V66MNnd5u9qwVfXftvQpGgA3MlG+0m0iGzSUleqU2aAXMtOpV3jGrZWUkwRWt q9cywFRFOrhcVeVQb49+sV9FQLj6tirPziKSW30EeIK8KWefd4F2lYvEJd8WBP30sbgg mpZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YKWYw7k5; 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 z16si933332oti.143.2020.01.10.02.23.25; Fri, 10 Jan 2020 02:23:38 -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=@gmail.com header.s=20161025 header.b=YKWYw7k5; 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 S1727415AbgAJKW2 (ORCPT + 99 others); Fri, 10 Jan 2020 05:22:28 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39177 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbgAJKW2 (ORCPT ); Fri, 10 Jan 2020 05:22:28 -0500 Received: by mail-wm1-f68.google.com with SMTP id 20so1371257wmj.4; Fri, 10 Jan 2020 02:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Eu2bs9SVEYgGGD1mosILhHkiZtknham97n87Dpy2QYk=; b=YKWYw7k5tWr/1EBsWXBPMMRFr0mgUy5wTbRK+znL6YKL3V8YVdEwjblkg54S1af21Z M5hDSF3HHOKVliDVIjxgqNRnqMmeTRMyQnan3oEtExVVpoFgoCaML4EXja7X1hTta+Sm dsiNad+706c5Wt141n1kcMJHVb+Iao3hZvUq8dZ8D574oaEpFn+4oCK2CR3OCcA8hjeG NuI2LuayDZLTY7MGPiaTI9X/AdfGHlL6kqfFcGet6tQ8FASnNfdKhVlI4FBkAqxbNfP+ +2aUeC7Q64i8RlthrhqVizRXTBi+Lh7EESCwAsU6VeSozzO2ISkodicM1gMhjVZKZn7V o4Bw== 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; bh=Eu2bs9SVEYgGGD1mosILhHkiZtknham97n87Dpy2QYk=; b=KRfqG40npfTsPtJdP48zfu8ISRSx6+VWcqLV1/xkqshUVRvkqfmZLiBCN7uy03jY6V 54y56S8My3kC4cWLWolVXFp/ae5gdA75iT+Xs4Kq/5ip3ANTZdMPex3PSK+Ar7VPs777 Zrl2cnQFZmBiXNew+M48dJ7bU2nzEXxvcI15hHkvS7YZuL/b1MWYkDrBI25rVH5eFCCw 0/7WddIt+r7TOKI6u0Y+Zbf8BGBjevk0P/HLX2p1IjaeLUoGIqofYDYFPWUzXzQC6DXi RWiptSbiq57/sMbA1Qu22KXOfExzOxRqeFOwfljvKlqs3OpRrVnEEeC8R5NxOU9oKSh6 bkkQ== X-Gm-Message-State: APjAAAWteOa5hMc3IdWKvqIWvLg0CZA4fr/4c5WLFKWrgrkHe2d/jihN XTJ7WoFp/FiatntLL84z9B/l4EAuqPwj0w== X-Received: by 2002:a7b:c317:: with SMTP id k23mr3387345wmj.75.1578651746285; Fri, 10 Jan 2020 02:22:26 -0800 (PST) Received: from localhost.localdomain (p5B3F6BF6.dip0.t-ipconnect.de. [91.63.107.246]) by smtp.gmail.com with ESMTPSA id g25sm6734475wmh.3.2020.01.10.02.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 02:22:25 -0800 (PST) From: Saravanan Sekar To: sravanhome@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, sfr@canb.auug.org.au Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] regulator: mpq7920: Fix Woverflow warning on conversion Date: Fri, 10 Jan 2020 11:22:20 +0100 Message-Id: <20200110102220.7163-1-sravanhome@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix warning Woverflow on type conversion reported on x86. Fixes: 6501c1f54a17 (regulator: mpq7920: add mpq7920 regulator driver) Signed-off-by: Saravanan Sekar --- Notes: Changes in V2: - updated commit message drivers/regulator/mpq7920.c | 2 +- drivers/regulator/mpq7920.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/mpq7920.c b/drivers/regulator/mpq7920.c index c603d60fb87b..ab1b847c57e5 100644 --- a/drivers/regulator/mpq7920.c +++ b/drivers/regulator/mpq7920.c @@ -221,7 +221,7 @@ static int mpq7920_parse_cb(struct device_node *np, if (of_property_read_bool(np, "mps,buck-ovp-disable")) { regmap_update_bits(config->regmap, MPQ7920_BUCK1_REG_B + (rdesc->id * 4), - BIT(6), ~BIT(6)); + MPQ7920_MASK_OVP, MPQ7920_OVP_DISABLE); } ret = of_property_read_u8(np, "mps,buck-phase-delay", &val); diff --git a/drivers/regulator/mpq7920.h b/drivers/regulator/mpq7920.h index 6a93bfbc750c..1498a1e3f4f5 100644 --- a/drivers/regulator/mpq7920.h +++ b/drivers/regulator/mpq7920.h @@ -55,6 +55,8 @@ #define MPQ7920_MASK_SWITCH_FREQ 0x30 #define MPQ7920_MASK_BUCK_PHASE_DEALY 0x30 #define MPQ7920_MASK_DVS_SLEWRATE 0xc0 +#define MPQ7920_MASK_OVP 0x40 +#define MPQ7920_OVP_DISABLE ~(0x40) #define MPQ7920_DISCHARGE_ON 0x1 #define MPQ7920_REGULATOR_EN_OFFSET 7 -- 2.17.1