Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1567664ybx; Thu, 7 Nov 2019 13:46:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxJD2uog+sngW2PYhWeHLcCqEGg1wxaXEuD+ksvnGyuhRlDv7wzxzGj5oJihgLKUycVJVhV X-Received: by 2002:a50:f783:: with SMTP id h3mr6311469edn.168.1573163211604; Thu, 07 Nov 2019 13:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573163211; cv=none; d=google.com; s=arc-20160816; b=Ccf4SWJ7YhXU7H9oMYjxn/dfPJlecL/hPFHhc0fzbYzmX+fBsNu7iONQdrzSpO38Hl ZIOBpaVey+QmGWAXFnkmjEOmWOJC79k2XncNui15LUet5yflJXR0WmUH5CS9Ag0sUJMG Zu2DxDPt+DKFM/eKR5AsQVdrFYESm0xrHgabyX4u5vz/rMzAi8UXrsE0bopb/9AogZ4U wjiq8YPZyONos3xWYHz/Z0GwmTvi8FPVCeTQH5x2VCNOio5sBe8zEXq539MM4CtAeO+E 2VRTtmdl+P5sOmvMuVNsOjbf+/QFMT312/VPOF4iZRZjahKXb+m4YUgxp1DKr79UsPFX wiBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=1Wz5TEAKKSm+fp9o5y8MyKM4kO4WDc0n21SYZHndqEE=; b=GZb5pyMAr2+8C5sqGvisl52VeA+O+4z2fIhTHQPIcHlBAIEgl6LmhwLfpE7s2s9TDj fJ/H5EGIco0Sq9GbFZ9THKmV+UFr/7GV1FUzvMDnwq9488l4OZ3++DhFXcSZiGkjXmjk 0LOhuq7CG2KgzvQsIm3GfZCsCQkJurHHg4erfZhoZSSHQ5DfZIlq1scs4niwuvIDi+c+ ZsSPIr6OWwLb6lvPtut8oe+D3RJ2icvaXwOqDYd1SmmkPJw9ob0HRbT+t0EJugO3p0qB NilXIjnekorRsPhJNxarLu9I1ZThSLu7ZH0+Qf2RHjlFvR/OUYkNSZV+eTRzjejy1qzb 3Vzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=TdvYPQSv; 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=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d36si2220068ede.44.2019.11.07.13.46.28; Thu, 07 Nov 2019 13:46:51 -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=@megous.com header.s=mail header.b=TdvYPQSv; 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=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727222AbfKGVpQ (ORCPT + 99 others); Thu, 7 Nov 2019 16:45:16 -0500 Received: from vps.xff.cz ([195.181.215.36]:35650 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbfKGVpQ (ORCPT ); Thu, 7 Nov 2019 16:45:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1573163114; bh=BGrAD8UvpxW4rw/cBqSRYppxgp0R9zi8fjyFRCWE9AY=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=TdvYPQSvv8h6dPQKJl5xiSdshpLt3NscKqvja8+fyZ9oAcxd+S4xpa4ZlpN3cWbsq uydGrZT0jN/CgxKm0d5n49fgiFkW2DTI0wY0cv59e7V0QBZp6Zm5wIhI0FhJ4jAq+i utioVXoDBiZLJSVKppU1aWh3cjKt0e7+QPBDMxxk= Date: Thu, 7 Nov 2019 22:45:14 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Rikard Falkeborn Cc: arnd@arndb.de, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, icenowy@aosc.io, kishon@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, mark.rutland@arm.com, mripard@kernel.org, paul.kocialkowski@bootlin.com, robh+dt@kernel.org, tglx@linutronix.de, wens@csie.org Subject: Re: [PATCH] phy: allwinner: Fix GENMASK misuse Message-ID: <20191107214514.kcz42mcehyrrif4o@core.my.home> Mail-Followup-To: Rikard Falkeborn , arnd@arndb.de, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, icenowy@aosc.io, kishon@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, mark.rutland@arm.com, mripard@kernel.org, paul.kocialkowski@bootlin.com, robh+dt@kernel.org, tglx@linutronix.de, wens@csie.org X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20191020134229.1216351-3-megous@megous.com> <20191107204645.13739-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191107204645.13739-1-rikard.falkeborn@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Rikard, On Thu, Nov 07, 2019 at 09:46:45PM +0100, Rikard Falkeborn wrote: > Arguments are supposed to be ordered high then low. > > Signed-off-by: Rikard Falkeborn > --- > Spotted while trying to add compile time checks of GENMASK arguments. > Patch has only been compile tested. thank you! Tested-by: Ondrej Jirman regards, o. > drivers/phy/allwinner/phy-sun50i-usb3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c > index 1169f3e83a6f..b1c04f71a31d 100644 > --- a/drivers/phy/allwinner/phy-sun50i-usb3.c > +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c > @@ -49,7 +49,7 @@ > #define SUNXI_LOS_BIAS(n) ((n) << 3) > #define SUNXI_LOS_BIAS_MASK GENMASK(5, 3) > #define SUNXI_TXVBOOSTLVL(n) ((n) << 0) > -#define SUNXI_TXVBOOSTLVL_MASK GENMASK(0, 2) > +#define SUNXI_TXVBOOSTLVL_MASK GENMASK(2, 0) > > struct sun50i_usb3_phy { > struct phy *phy; > -- > 2.24.0 >