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 9DAEDEB8FD2 for ; Wed, 6 Sep 2023 14:13:59 +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=BWwOXLxJaRzDiPTgI+gp5Bg1IGIR120u5dJDMZ4IyK0=; b=fSpDuB0rcpmIJ2 vM3tLDWEmOvt6c1TW0n83tAz5nvDd4/wdEo72xi1kR8mwcxSwkU1BXBgtwXGcUnlS+yifULUsHFUf aavdJnjsa6f1LehaspR1hmWKk2iX/P+hBatpx6ARmPteidlnCtUyJfDeco2G9OzPTr9SLdWXHI9jV O/Ej6fn5D5XzvLnF2BvOqcv3bYhv/K4yESS4X+mESi0t4BZyLf1uk/n4u/B3OYYV8PLgHgNH9F0oL KNfOhzX1UobniQ6USxur6qmPbKXI1zgtLQu9cbq7UF7MPApKyyJ7rMa8ogXdnlkXMDGQ6f6MH2cFZ 3fUSZXJm8ELh7v8DWNkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdtHh-00ACJ7-1x; Wed, 06 Sep 2023 14:13:33 +0000 Received: from mgamail.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdtHf-00ACHq-1P for linux-arm-kernel@lists.infradead.org; Wed, 06 Sep 2023 14:13:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694009611; x=1725545611; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=IDnUPIn2SR7PPT+yx17NZwjwnlF2gGHn7F4nZ5dZw5o=; b=d1PJl3crDFtjg+1l7gfERvFHqUrCbx19ZjEckQ7CMzt1W12sz++PRDWM HQ9yltzbi41BuxsDLn/sUzBWpKtw5XMkmppEQV9/EsI9cI6UnTSZ10W8x O7yUn4wc83oT1LDepdX8z6JOQkuCMMkZobpMUZh34pLxNlgqp8Zlp1rOd WbsPc+TptO73CGiD9ULLVVLeCddNaVLVIOXqSyfhIEv0MAMkVnRx0YkAB X7T4IxnUZiwgzDB0m8Szsm4oMnYUXVXpcQIp6SEabcxhFXuFm3TTdKkIW Rq/zbYA67XIvFMu9CAF81vW0+ntZUMYApfLdi0Avj3GUFSJHAbuTTxiQf Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="362106879" X-IronPort-AV: E=Sophos;i="6.02,232,1688454000"; d="scan'208";a="362106879" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 07:13:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="831679120" X-IronPort-AV: E=Sophos;i="6.02,232,1688454000"; d="scan'208";a="831679120" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 07:13:24 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qdtHU-006xaj-2B; Wed, 06 Sep 2023 17:13:20 +0300 Date: Wed, 6 Sep 2023 17:13:20 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Mika Westerberg , Linus Walleij , Dipen Patel , Thierry Reding , Jonathan Hunter , Hans de Goede , Mark Gross , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, timestamp@lists.linux.dev, linux-tegra@vger.kernel.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 03/21] gpiolib: provide gpio_device_find_by_label() Message-ID: References: <20230905185309.131295-1-brgl@bgdev.pl> <20230905185309.131295-4-brgl@bgdev.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230905185309.131295-4-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230906_071331_525166_81F5DBC5 X-CRM114-Status: GOOD ( 15.62 ) 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 Tue, Sep 05, 2023 at 08:52:51PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > By far the most common way of looking up GPIO devices is using their > label. Provide a helpers for that to avoid every user implementing their > own matching function. ... > +/** > + * gpio_device_find_by_label() - wrapper around gpio_device_find() finding the > + * GPIO device by its backing chip's label > + * @label: Label to lookup > + * > + * Returns: > + * Reference to the GPIO device or NULL. Reference must be released with > + * ``gpio_device_put``. Out of a sudden different format to refer the function. Should be gpio_device_put(), so kernel-doc makes a hyperlink. > + */ So, please, render all your kernel docs and look at the end result. ... > + return gpio_device_find((void *)label, gpio_chip_match_by_label); This casting is a bit awkward... But I have no good proposal for a change. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel