Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1996524rdh; Tue, 26 Sep 2023 09:13:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiDsXxo5xczSR4FQe3viCaezt7nuYOjd/RW+qHFNDciBtMFz1xWReCjSI5QAi6QFBlFDTB X-Received: by 2002:a05:6a20:1056:b0:154:b4cb:2e61 with SMTP id gt22-20020a056a20105600b00154b4cb2e61mr7504399pzc.60.1695744837059; Tue, 26 Sep 2023 09:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695744837; cv=none; d=google.com; s=arc-20160816; b=nDCTlX9CXXeWlqVNOOA4ofV8i4h+xKwSxK5yOFAlfvPJiV3fZppZqbXYPk8HK9QVAr 4TAEM3tcMhQOS+ZralKrFe8EpgWprm3rnfE9p8rai4fB3ptV9fFGy+2+r6Sl+rD2aTmZ rT5hEydX0VaKkfMleOMV9ZFA3yNVMcdX/hTk5W9zOvA76QtD2quXb2e/rObM8yuSlInL jWs/TA6OstgE1o/fuw4elrHFlgzCR85LDqftylUBdkSmhdAu1/NJlqGn9XSzOeVKSkNz L76mY01brmH9gm/UaP+3gly6jAqnxgDZVnf1QMZj8ws1+WATKyJDg5Km+fNYm8VuZV39 U10w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=VMVkcQ3uIvCOXHCVXNqQ9AlS6CYp5rLEEZpESBkhJL8=; fh=dlWaF0ouAk38l6ZadWZzGtL4PI4M8Q/efUW65rhq1u0=; b=HVNheHj/k55DIBGlVZ8HXv/HGHgZIgvM58nfrqLaE4pWA187jTl52+xuMldnxQUz30 m16T44E6nmCktdvOOd/fvSv+O2u6FV0+g72ahxOW4JxhOB5mrQ5TIH0LZ7kGI82cK+YM 7Df5CewS5xDg1dxzX48oKpYIyEBqjkPt6KQI+372Th/55J89UvxV/RWyq2CdQuAd+Rz8 Exp/xGBU/jb+4aCJvH/4yGhvGfhroX4Vmig6ihN9eu9rMqn1sUMmDQWOd/2kkvdO5m2G 7F1vfN35vShpZl13qX/66E17FI2u1TYi3iblvYfoKmthcp+GjBKCUAqvFKXKegrCHm0/ /kOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005784ab1c4afsi13359881pgk.736.2023.09.26.09.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CD59580A0E03; Tue, 26 Sep 2023 09:10:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234944AbjIZQKk (ORCPT + 99 others); Tue, 26 Sep 2023 12:10:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbjIZQKi (ORCPT ); Tue, 26 Sep 2023 12:10:38 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2142511D; Tue, 26 Sep 2023 09:10:32 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="381503634" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="381503634" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 09:09:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="892247973" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="892247973" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 09:07:59 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qlAcP-00000000esb-1Jq4; Tue, 26 Sep 2023 19:09:01 +0300 Date: Tue, 26 Sep 2023 19:09:01 +0300 From: Andy Shevchenko To: Duje =?utf-8?Q?Mihanovi=C4=87?= Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH RFC v2 1/6] ARM: pxa: Convert Spitz OHCI to GPIO descriptors Message-ID: References: <20230926-pxa-gpio-v2-0-984464d165dd@skole.hr> <20230926-pxa-gpio-v2-1-984464d165dd@skole.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230926-pxa-gpio-v2-1-984464d165dd@skole.hr> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 09:10:38 -0700 (PDT) On Tue, Sep 26, 2023 at 05:46:22PM +0200, Duje Mihanović wrote: > Sharp's Spitz board still uses the legacy GPIO interface for controlling > a GPIO pin related to the USB host controller. > > Convert this function to use the new GPIO descriptor interface. ... > + pxa_ohci->usb_host = gpiod_get_optional(&pdev->dev, "usb-host", GPIOD_OUT_LOW); > + if (IS_ERR(pxa_ohci->usb_host)) > + dev_warn(&pdev->dev, "failed to get USB host GPIO with %pe\n", > + pxa_ohci->usb_host); No, with _optional() you should terminate the execution and bail out. The idea behind *optional* is that we skip errors only for the cases when GPIO is not provided. Otherwise we need to handle the errors (yes, the dev_err() has to be used). -- With Best Regards, Andy Shevchenko