Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp909874ybv; Sat, 22 Feb 2020 18:18:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyO2PihU/HCA61oKDyFwuPTGoiQwceGkAkUlX5DWiZNmkRfdGXbsk1PETPOr+bMM9qjJCDM X-Received: by 2002:a05:6808:64e:: with SMTP id z14mr7705759oih.79.1582424292916; Sat, 22 Feb 2020 18:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582424292; cv=none; d=google.com; s=arc-20160816; b=bVdALJ1iZp7Pm7OMEcR56LCIbY00LvBJv4YCNHtDHY7uGUKBaNquW7DtNPXN5Cq8HZ 0p8fw0pLCVA+UoKgPsUMZpAT3upCRVfPmMxzMesWyywYkibxKIvX0I8UrADupAzST9Ov y4oo72XZ7mUydYl9MoqW8uPGjk9P/ARzs/Q7dRdw0w/rrz3jUPC2lntmo+n0xJXjRTqt wYyKBgWAGnwR2KLgJXHYfgr4FzDuRmOEL255SygZph62mnvS964d2KnmmVADLL0OWJOM LuEIc5Q4hINUFgSPbrcJ0Yr7XVzlXfk8qWUhgHWwpjxuMzyQYLKCYNa3/3d+iX27Okgs dduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=1ZQbAS3hF5hAvRfnaWRTdN+7HkixZKs0ryz5IfNMpvk=; b=O/Li/8pIB4uE7MqIPDN8dn8C9Jh/7zYnyJT5M/kikPH3cX8J/Jhlucfb7A3KgYYoY9 EVLlHO9iNFlPECHytiiQx4lwTzAIfVjhtHLmUuQ/H10YmYotQW2Ex688nG1Vsa5ownWU SFZOLO2IYkXHCqJFO8mQLhY1yyQ/mo+2xf6IkrAkLC/9dcRNR+AFo1Pgclma0+OlrLbV j60Nhasq+4RiFZOtLAOMu43sIpzjVVMZl69HQA1oFjQ4GoVeBS0D14+/J5BWQSR9hTBm eQPJElXSPBsy8zwxWETCSmhQbQRT+m84HASNSxhTa3vYZiU0Q4r802j2HtJJhndIzw5J m0ig== 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 k8si4064996otp.69.2020.02.22.18.18.00; Sat, 22 Feb 2020 18:18:12 -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; 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 S1727168AbgBWCQl (ORCPT + 99 others); Sat, 22 Feb 2020 21:16:41 -0500 Received: from smtprelay0235.hostedemail.com ([216.40.44.235]:51709 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726884AbgBWCQl (ORCPT ); Sat, 22 Feb 2020 21:16:41 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id D6704837F24D; Sun, 23 Feb 2020 02:16:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2525:2560:2563:2682:2685:2731:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:5007:6119:7903:8784:8985:9025:10004:10400:10848:11026:11232:11473:11658:11854:11914:12043:12050:12114:12297:12438:12555:12740:12760:12895:12986:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21451:21611:21627:21788:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: tank92_1ce31dc6cfa4f X-Filterd-Recvd-Size: 2400 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Sun, 23 Feb 2020 02:16:38 +0000 (UTC) Message-ID: <7792266dfede1df5742e527dc304b610fcfbd025.camel@perches.com> Subject: Re: [PATCH] phy: phy-meson-g12a-usb2: Fix GENMASK misuse From: Joe Perches To: Ondrej Jirman , linux-kernel@vger.kernel.org Cc: Kishon Vijay Abraham I , Kevin Hilman , Neil Armstrong , Martin Blumenstingl , "moderated list:ARM/Amlogic Meson SoC support" , "open list:ARM/Amlogic Meson SoC support" Date: Sat, 22 Feb 2020 18:15:12 -0800 In-Reply-To: <20200222235142.242732-1-megous@megous.com> References: <20200222235142.242732-1-megous@megous.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-02-23 at 00:51 +0100, Ondrej Jirman wrote: > Arguments to GENMASK should be msb >= lsb. > > Signed-off-by: Ondrej Jirman > --- > I just grepped the whole kernel tree for GENMASK argument order issues, > and this is one of the three that popped up. No testing was done. Both of these were submitted last year. https://lkml.org/lkml/2019/7/10/20 I hope they get applied one day. Neither patch has an affect today as none of the #defines are used. Perhaps deleting the #defines is better. > drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c > index 9065ffc85eb47..cd7eccab26490 100644 > --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c > +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c > @@ -66,7 +66,7 @@ > #define PHY_CTRL_R14 0x38 > #define PHY_CTRL_R14_I_RDP_EN BIT(0) > #define PHY_CTRL_R14_I_RPU_SW1_EN BIT(1) > - #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(2, 3) > + #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(3, 2) > #define PHY_CTRL_R14_PG_RSTN BIT(4) > #define PHY_CTRL_R14_I_C2L_DATA_16_8 BIT(5) > #define PHY_CTRL_R14_I_C2L_ASSERT_SINGLE_EN_ZERO BIT(6)