From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48F32C41535 for ; Fri, 22 Dec 2023 09:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z+g3/EQvaDdA2GnxkeqwQC1IQrnWajRsbQjZJmK0c8k=; b=k1wutarJ55uXXN ZBqzIMIxCPa/PM1rZvTWHUzGBv4QGE3wUHm8jTGpR4d3iFyKl28U5GPTGlulcRdz8E6T1rO78vB4c 84xteeQiIMC9xQ2Hs38kN/1tPgzGrMGR7/B21wxDytMYlU82bci8TR7BPtytNubZr7HDFFdW56FOF XdXm7RdzvNgOZ2cu6a8Z1YlcIHeqlZQixnoUG6faJPe88ePfv9UFSq6BeR+JHE34r8QPI3jRJ3AKi SewIzUPzE1e3fjiuamHR0e939hF1+QPZxjUV49TJJWYQq2V1sIhw97DbE6CS72MmL6himbA9DM4zu 9b8/Rlxg62Rq5lBw3w6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGbpw-005QX3-1I; Fri, 22 Dec 2023 09:28:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGbpu-005QWY-1p for linux-arm-kernel@lists.infradead.org; Fri, 22 Dec 2023 09:28:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 06CEC61B74; Fri, 22 Dec 2023 09:28:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F05C8C433C8; Fri, 22 Dec 2023 09:28:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703237333; bh=pVzcZ1FMA17fQA2Gn9A7fXMB1ZdDwNgkwxOh7HmBRHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g/lAogRQCtgvcse7L/QtxvPV3MsRxffXFxJQJJGhAEWS2j3kuzJmGSRpqH9W1zr3V Ua0EsSo8K3YR4ngi0LT4T3atieaj1vNbdFERVJGz1MNghZXGqyl5txhzAaQEPTqlw8 1wCowcs9GKZpnbcL+49nMEVYX89ultVWj88Lt6B+QOE3qh17qiEX08AnYmKVAu/pbZ 2juJy+ad9QKU48YJJKydW+cOU80DpGAon/XzZe5lcfARhPjhi1Uo7jaG+eHA1vBmp9 2fI6ElCb7xYGiipbe3raMHIZQAJjoEHU4efJWTlSlYDkJjiUMohzDIGpk9JCrdcHbi o/AOJglgFVYHw== Date: Fri, 22 Dec 2023 17:28:42 +0800 From: Peter Chen To: Xu Yang Cc: gregkh@linuxfoundation.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, luca.ceresoli@bootlin.com, jun.li@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Message-ID: <20231222092842.GD1951375@nchen-desktop> References: <20231218061420.3460145-1-xu.yang_2@nxp.com> <20231218061420.3460145-3-xu.yang_2@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231218061420.3460145-3-xu.yang_2@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231222_012854_643441_945E4CC1 X-CRM114-Status: GOOD ( 17.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 23-12-18 14:14:20, Xu Yang wrote: > When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return > false. This behaviour is wrong. Since phy.last_event will always be set > for either host or device mode. Therefore, CONFIG_USB_OTG condition > can be removed. > > Fixes: 5eda42aebb76 ("usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()") > cc: > Signed-off-by: Xu Yang Acked-by: Peter Chen > > --- > Changes in v2: > - add fix tag and stable maillist > --- > drivers/usb/phy/phy-mxs-usb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c > index acd46b72899e..920a32cd094d 100644 > --- a/drivers/usb/phy/phy-mxs-usb.c > +++ b/drivers/usb/phy/phy-mxs-usb.c > @@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect) > > static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy) > { > - return IS_ENABLED(CONFIG_USB_OTG) && > - mxs_phy->phy.last_event == USB_EVENT_ID; > + return mxs_phy->phy.last_event == USB_EVENT_ID; > } > > static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on) > -- > 2.34.1 > -- Thanks, Peter Chen _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel