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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A70D9C4332F for ; Tue, 8 Nov 2022 15:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233974AbiKHPki (ORCPT ); Tue, 8 Nov 2022 10:40:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233615AbiKHPke (ORCPT ); Tue, 8 Nov 2022 10:40:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D46DD140E9 for ; Tue, 8 Nov 2022 07:40:33 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76B03B81B40 for ; Tue, 8 Nov 2022 15:40:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92281C433D6; Tue, 8 Nov 2022 15:40:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667922031; bh=tkKBfiV56sB9QCVwMYwwinzQ9LXzekwK3iSBtzQSlPU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZJ5jQHhRJ+g8ACt+CvIwLJ+rZNS4rI9YV1natUWnDTbnk90qNI8zhPkEx+AUNWGR6 aMkyaRiORTX3k1yVcuO/iiTQdDBVkE69g7g+3KofjhlkAcHmpiCqRNugO9lqCv1XHF AjZ3gEZU+ZnVG7+UkdfZjjPsV9NxHkyYfdKvl6Sc= Date: Tue, 8 Nov 2022 16:40:27 +0100 From: Greg Kroah-Hartman To: Linus Walleij Cc: linux-usb@vger.kernel.org, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Chuhong Yuan Subject: Re: [PATCH] USB: bcma: Make GPIO explicitly optional Message-ID: References: <20221107090753.1404679-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Nov 07, 2022 at 02:38:35PM +0100, Linus Walleij wrote: > On Mon, Nov 7, 2022 at 10:07 AM Linus Walleij wrote: > > > What the code does is to not check the return value from > > devm_gpiod_get() and then avoid using an erroneous GPIO descriptor > > with IS_ERR_OR_NULL(). > > > > This will miss real errors from the GPIO core that should not be > > ignored, such as probe deferral. > > > > Instead request the GPIO as explicitly optional, which means that > > if it doesn't exist, the descriptor returned will be NULL. > > > > Then we can add error handling and also avoid just doing this on > > the device tree path, and simplify the site where the optional > > GPIO descriptor is used. > > > > There were some problems with cleaning up this GPIO descriptor > > use in the past, but this is the proper way to deal with it. > > > > Cc: Rafał Miłecki > > Cc: Chuhong Yuan > > Signed-off-by: Linus Walleij > > Actually I think this is something of a regression that needs > a Cc: stable tag. > > On my router (DIR-890L) this is needed for the USB ports to probe > and work, I think due to recent refactorings involving device links > and whatnot, i.e. probe deferral happens all the time and the > deferral error has to be handled. I think many BCM systems are > affected. Now queued up for the next -rc release, thanks. greg k-h