From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C0B67C for ; Mon, 24 Apr 2023 13:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2B5EC433EF; Mon, 24 Apr 2023 13:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682342938; bh=GeT/JPhqCfQo5Ixkw3LlobvoLmmRZkTaJDHa0CKIiEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPvWyduJ6ZKsoo0suaFvudl5w/gWkfY0G94cly36J3L71GIyyHdjn81UMO7KEEaCu nq41qYvzZqoXVuoHphqH9DFM1LLhiRnpSA2Dw+NkNmks4Z6csykpI6oKy8exHo5WoF M3FlxYpdmXmHzUadSKRGLp3M1ranF1joaZqCn50w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Cristian Ciocaltea , Mark Brown , Sasha Levin Subject: [PATCH 6.2 016/110] regulator: fan53555: Fix wrong TCS_SLEW_MASK Date: Mon, 24 Apr 2023 15:16:38 +0200 Message-Id: <20230424131136.726893759@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424131136.142490414@linuxfoundation.org> References: <20230424131136.142490414@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Cristian Ciocaltea [ Upstream commit c5d5b55b3c1a314137a251efc1001dfd435c6242 ] The support for TCS4525 regulator has been introduced with a wrong ramp-rate mask, which has been defined as a logical expression instead of a bit shift operation. For clarity, fix it using GENMASK() macro. Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406171806.948290-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/fan53555.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 45f07d2ad1c58..41537c45f0367 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -61,7 +61,7 @@ #define TCS_VSEL1_MODE (1 << 6) #define TCS_SLEW_SHIFT 3 -#define TCS_SLEW_MASK (0x3 < 3) +#define TCS_SLEW_MASK GENMASK(4, 3) enum fan53555_vendor { FAN53526_VENDOR_FAIRCHILD = 0, -- 2.39.2