Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp464840ybl; Fri, 10 Jan 2020 01:33:22 -0800 (PST) X-Google-Smtp-Source: APXvYqx2o/lG7vXSGzjLS0fTsgXwiRXG/HfEh8EaZGg9czPMeVksaJMRktxjOaEj2Mz1e5cQYyKE X-Received: by 2002:a05:6830:4a4:: with SMTP id l4mr1818655otd.91.1578648802421; Fri, 10 Jan 2020 01:33:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578648802; cv=none; d=google.com; s=arc-20160816; b=NpjDQjmyH7eUMWaLkGGVynAT4poNPOLf35zEnNSDiEQUz76nyf7RpDAXahwvsGxCnd LNHCrZWOQ+nmQq8TmMBGYdE2STU+TVUJEseEL2GJP8Y75yX4InJNMQGIDs/Egrx58/dn fnX/ahKTKDXkk9FzU95Hyi0syhbAzJk5Sfl30g0isK/6flI97uecLobt4+0AsQrl5PS1 8kxK1eQ7FiSUPJ1VOWjal6IE+VmyP9pU+ft4plof+3fRK+0/AyzSix+z43DRRj6cZvSV /p/4xn9cHKtpGedre5fbmnjA/DRhpu6m/yJZXv0/cew03IQuSCocUO9GDQVx1NV6MxyG UDGg== 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=/eHOMT158nZ3peFbo4qmkM+fTWEBBXxh1kcQu4MDcJc=; b=QOiPeA3GVdG+ygwC03NH+2kxoPLp2XraxO2w9+KvLsgpF6kSjHDECeCNqaqml/3z1N 11NdtElrqsl8KQNRBqDB7iOF1IuCpy1mm7wkworxBfH4mZspIDgQIwxmfXoTbK37s6qr pnHv42s9Z4gjbzVs46qVK8KI/ovn9g0C0bSOF9DLnl8D2K0nxDFiwM6x6uiwj2n/fhk6 U6jo3SS998mJMiLGCO4EWN2LvtKv1wApN+fZ3cWfgtgubkNVtmiNq9A/Bx5xdTZliE3F +OUAqSwyhRSViyY2KMEJPkZwuL208KfbLZ0xTkqlPaPIr9G191pEDLcuyeN3sONwaixB nqpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KnZcmzME; 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 j20si826781otp.147.2020.01.10.01.33.11; Fri, 10 Jan 2020 01:33:22 -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=KnZcmzME; 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 S1727186AbgAJJcB (ORCPT + 99 others); Fri, 10 Jan 2020 04:32:01 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42285 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726759AbgAJJcB (ORCPT ); Fri, 10 Jan 2020 04:32:01 -0500 Received: by mail-wr1-f66.google.com with SMTP id q6so1086714wro.9; Fri, 10 Jan 2020 01:31:59 -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=/eHOMT158nZ3peFbo4qmkM+fTWEBBXxh1kcQu4MDcJc=; b=KnZcmzMEmGfAMH7grsvVsqcBdGL6MhwPQWUGn4JZaqe0gTZnKDKrrmL7Lp59/TNZSk ZYvD7tYTRXnYP37mhOk3B1ii+Lwn8cqKN9M125Qogr2eDs8FbVrbI7I+luMhKGzErdxx d5/6vz+HUpD3fcImxQesPG4RAqc+7ogRd8LaMJmht4Jz1xH0oWpFDwswKh0oEi6ssfOg LHQWpOptVeLC5DuAlwBA32rfWFgV7cEfhM+gIuz/jeGuUiyktzRs3EpTaQ4d0ljMAPhX tUtzrw2mSZBOK4AdGUvatGszwXQBUSxjy4Pv3cgeO7/2x0JeYQyj+32fICPcWT8um/ht tY0g== 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=/eHOMT158nZ3peFbo4qmkM+fTWEBBXxh1kcQu4MDcJc=; b=EoHRNDjqRAwlUVCB0OaRoQzFbED6nraJOa5l5r0SHsV4LWLJ9Y4W70I03HxLKFcSAZ Amgoyi51lyQ/uNePjlK4IepBD9Wx2RJ/EK1yMTWG8c5a+GZYu44qEV34DJIECyI4Rygf QVvlxE7BZm8b0wotlRwloWyhS6rbCcGV/yRAtibPzsbbYotTbXJmcAqtMeHE8FEJY9K9 A4EqzD1EXSbistukaj08gz2eC5Q/65pHqbzih6b8leqiQ2w8eFsvY5y5KTZjQ5ofLEUz oFwefJ69pcmn+sVV0+n2/lS0yk3ZDuMborGTvG8xsoEDnrglKfzyrvToglabwZfG6ejy LKXA== X-Gm-Message-State: APjAAAV1t1gttgtPanF98Pw8IU1kWGXEXzVvAtkZG9+tDdAO3mNuIbSX U6HS0B0jIRC2+dY+WN9nkkSDQiPTIhe9Lw== X-Received: by 2002:a5d:458d:: with SMTP id p13mr2518223wrq.314.1578648718675; Fri, 10 Jan 2020 01:31:58 -0800 (PST) Received: from localhost.localdomain (p5B3F6BF6.dip0.t-ipconnect.de. [91.63.107.246]) by smtp.gmail.com with ESMTPSA id q3sm1473054wmj.38.2020.01.10.01.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 01:31:57 -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] regulator: mpq7920: Fix Woverflow warning on conversion Date: Fri, 10 Jan 2020 10:31:48 +0100 Message-Id: <20200110093148.6718-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 warning on type conversion reported on X86. Fixes: 6501c1f54a17 (regulator: mpq7920: add mpq7920 regulator driver) Signed-off-by: Saravanan Sekar --- 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