Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp898754rwb; Thu, 6 Oct 2022 06:05:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4i9h8D+xgHPOanHYA0HScRWX33Sk8Zk7JWdBCv/GGYeD8P0/r6U3sHHV4RwoJ/qOjX59sm X-Received: by 2002:a63:5a50:0:b0:429:8580:fc61 with SMTP id k16-20020a635a50000000b004298580fc61mr4618158pgm.215.1665061547045; Thu, 06 Oct 2022 06:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665061547; cv=none; d=google.com; s=arc-20160816; b=H82mAByBLArqccE/0U1Ge9El2Ht5G2FbUO+B38Txsb3XITzL4zQddT0vp0a4dNih5k c6hm6NMeYzG2ymXw5BAEO9J7hAU3Wwf98H9lSjywJ+KQEYcNhVSc4EtwfQkLP73X8ZCo JJa8H9NK4Me8xQotNqm7upv2D9Hp0+HdAC9y5SaqK+S9NbusYOpgA/ysI0gVr0alevVL VZNy3ieNnLjlSw2u/j0RzBre3gBnVLOB38biyfbNd9zf9iACfeimAat0wCFFevrXNkuB YOl4gf9W7nCI/Rz1AbLaUwvTQ2DWFkeASqPM+WdfpYaFkVNjk8sFNdUL+q5C/7dWiiTo B8ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ebt9Azo1BcWQvkTd69/Q9lEe6n7zN93mPl+gh0XGfIk=; b=o4oioPMX0dcmIHLfrVn8NqcWvgFBcOOlVbQ/y2EKPvdLo3cK0xt0gsiSqRVWkuhggC MCfWSVAAX8h2CPHCmbIAhzEAszoNn6uZFX9gLuueEibGK9ij3lXMS+MHT5rSajfFzfMZ YuYg8gtcvEVzPKdy3gV8mySDJD1gGhtva0iN+1o1eNext+QKo1ngz45DzzJ5zFX8upsW NsgEOsoTDIDEk2EUb+ycydBhPiVmLZLALogxPRRD2YqQ0n5KpfRth0Rt+YZDXMEc0W77 ijFKRlUyXUYeIz1vRcG5YtbHaDVILaI7luRQO9wDMaU8G13DbXTYkh/J1mmT8GL56NaA F1Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DEFe9zQy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a056a00195500b00548d480e340si25022869pfk.92.2022.10.06.06.05.28; Thu, 06 Oct 2022 06:05:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DEFe9zQy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbiJFMpt (ORCPT + 99 others); Thu, 6 Oct 2022 08:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbiJFMpr (ORCPT ); Thu, 6 Oct 2022 08:45:47 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1E9788DFE; Thu, 6 Oct 2022 05:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665060345; x=1696596345; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/BOOh1Cu+BGPC3M+7vmWVFiM/nnxyxHswxdVOZ9jz6Q=; b=DEFe9zQyyp+9TYws/RQNBmxwI+OLpw8Iqi2OSd4xl1ZroI+YKcTDdQQ9 LLaX2/VwRdpX/2sbMoZkhY9snea4GvvqmfLGz+/rTUe9/W7IVT+TBtEr4 A7vbreYVXihz9taY8Ct9I/UR5wvQu1NFveRHPRUn2RF1223tZFSxTod69 db8I1TSpcHPyRn/bqoH1rVayQ3wO5cN9rQAySC81Qx/15tajaYPNa+xe4 peY2Bsn3ax+mbj331V2vgTvyaBNc6aaZ2j2ET/Js5U4luG/FOcEMFESHw uJbNuGXRVOWZ/hB2YTnqc+BHjdGbTapk927jAa1fMERKbmm9yMFwfUwNq g==; X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="303407825" X-IronPort-AV: E=Sophos;i="5.95,163,1661842800"; d="scan'208";a="303407825" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 05:45:45 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="693338655" X-IronPort-AV: E=Sophos;i="5.95,163,1661842800"; d="scan'208";a="693338655" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 05:45:43 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 527B9201DB; Thu, 6 Oct 2022 15:45:41 +0300 (EEST) Date: Thu, 6 Oct 2022 12:45:41 +0000 From: Sakari Ailus To: Andy Shevchenko Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Scally , Heikki Krogerus , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: Re: [PATCH v1 1/1] device property: Fix documentation for *_match_string() APIs Message-ID: References: <20221006123807.37014-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221006123807.37014-1-andriy.shevchenko@linux.intel.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Thu, Oct 06, 2022 at 03:38:07PM +0300, Andy Shevchenko wrote: > The returned value on success is an index of the matching string, > starting from 0. Reflect this in the documentation. > > Fixes: 3f5c8d318785 ("device property: Add fwnode_property_match_string()") > Signed-off-by: Andy Shevchenko > --- > drivers/base/property.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/base/property.c b/drivers/base/property.c > index 617007a25783..bfed224c5724 100644 > --- a/drivers/base/property.c > +++ b/drivers/base/property.c > @@ -236,7 +236,7 @@ EXPORT_SYMBOL_GPL(device_property_read_string); > * Find a given string in a string array and if it is found return the > * index back. > * > - * Return: %0 if the property was found (success), > + * Return: index, starting from %0, if the property was found (success), > * %-EINVAL if given arguments are not valid, > * %-ENODATA if the property does not have a value, > * %-EPROTO if the property is not an array of strings, There are other error codes that can be returned such as -ENOMEM or what else may be returned by fwnode_property_read_string_array(). I might just refer to fwnode_property_read_string_array() and document here those specific to these functions. Just FYI... I guess this could be a separate patch, too. Reviewed-by: Sakari Ailus > @@ -457,7 +457,7 @@ EXPORT_SYMBOL_GPL(fwnode_property_read_string); > * Find a given string in a string array and if it is found return the > * index back. > * > - * Return: %0 if the property was found (success), > + * Return: index, starting from %0, if the property was found (success), > * %-EINVAL if given arguments are not valid, > * %-ENODATA if the property does not have a value, > * %-EPROTO if the property is not an array of strings, -- Kind regards, Sakari Ailus