From patchwork Wed Nov 13 06:43:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 1194079 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47CZp15cxmz9sPJ for ; Wed, 13 Nov 2019 17:43:53 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725987AbfKMGnw (ORCPT ); Wed, 13 Nov 2019 01:43:52 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37782 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfKMGnw (ORCPT ); Wed, 13 Nov 2019 01:43:52 -0500 Received: by mail-lj1-f196.google.com with SMTP id d5so1244639ljl.4; Tue, 12 Nov 2019 22:43:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=eleBs2EZgeGxIdjnJxRUDgNR0QCEuHcKtl+2MMsiu+k=; b=CKLN1WWya4db7NlFWfND/NCsqsaMf+8NB6E27+MwdsNvAxqhP1YL+CheUb9KbyCZi5 p5fbwidJrCng5XE3vyjjm4O2ciVoDC6nuBwLz3Wqw6F3CS1H/rRPuDe3txKl4iax7A2B FACJ1S9ErnK5iWa0ojtK//v2muhOnZhb9COPdLK20VIbNft4y0S2Jd6ex4ueeo1ISgWQ 92mYSwUVnk//irmXp2eieS3kb8H/niqRbANWH9LYihT71vmf3nD3kxHLFi/Y19cx9s+c 56jXV+tzcteOODQyIzgQ5wBmAZph/vcyFT4EFpTL+buFbhw42ny6Oo1T5Hc8IPB0Z4ze A9Dg== X-Gm-Message-State: APjAAAWWgOrPxyZlH3aX0AmL5AWs71OZm+JfU/q8XnQnJVpsBaHuja9A nK43CXFX09hdT39uJU4ZvBNfD+vauKE= X-Google-Smtp-Source: APXvYqzfHxLlPwdFw2DoXrFuJQBzFi2hHUa+ERPi2s1nSF9oBLUW98LODz/V3AZQroxmCtcGB1zjZg== X-Received: by 2002:a2e:9ad8:: with SMTP id p24mr1279835ljj.114.1573627430381; Tue, 12 Nov 2019 22:43:50 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id b28sm472234ljp.9.2019.11.12.22.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 22:43:49 -0800 (PST) Date: Wed, 13 Nov 2019 08:43:38 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Rob Herring , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] of: property: Fix documentation for out values Message-ID: <20191113064338.GA13274@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.12.1 (2019-06-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Property fetching functions which return number of successfully fetched properties should not state that out-values are only modified if 0 is returned. Fix this. Also, "pointer to return value" is slightly suboptimal phrase as "return value" commonly refers to value function returns (not via arguments). Rather use "pointer to found values". Signed-off-by: Matti Vaittinen Reviewed-by: Frank Rowand --- Changes from v1. Removed statement about modifying arg ptr only upon successful execution (as requested by Frank). Also changed "pointer to return value" with "pointer to found values" drivers/of/property.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) base-commit: 31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c diff --git a/drivers/of/property.c b/drivers/of/property.c index d7fa75e31f22..c1dd22ed03f3 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -164,7 +164,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64_index); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_values: pointer to return value, modified only if return value is 0. + * @out_values: pointer to found values. * @sz_min: minimum number of array elements to read * @sz_max: maximum number of array elements to read, if zero there is no * upper limit on the number of elements in the dts entry but only @@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u8_array); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_values: pointer to return value, modified only if return value is 0. + * @out_values: pointer to found values. * @sz_min: minimum number of array elements to read * @sz_max: maximum number of array elements to read, if zero there is no * upper limit on the number of elements in the dts entry but only @@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u16_array); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_values: pointer to return value, modified only if return value is 0. + * @out_values: pointer to return found values. * @sz_min: minimum number of array elements to read * @sz_max: maximum number of array elements to read, if zero there is no * upper limit on the number of elements in the dts entry but only @@ -334,7 +334,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_values: pointer to return value, modified only if return value is 0. + * @out_values: pointer to found values. * @sz_min: minimum number of array elements to read * @sz_max: maximum number of array elements to read, if zero there is no * upper limit on the number of elements in the dts entry but only