Received: by 10.192.165.148 with SMTP id m20csp4375569imm; Mon, 30 Apr 2018 17:42:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNAW+eXOj27syY+x8tPO43y5zmlQEtoHaPp/ouejUFUCrIN4scQu0357K3xssITUqx2zQe X-Received: by 2002:a65:508d:: with SMTP id r13-v6mr5150723pgp.134.1525135329681; Mon, 30 Apr 2018 17:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525135329; cv=none; d=google.com; s=arc-20160816; b=rCCkIyCdZCwIDwiCQMM4l1ZbbfY0Yn8C+HT7pqB51QuX226cT962/IryZCkQqlJUR6 PR6tZKYkCR55f94BOEo8GCcUkc7gHNOshJH49TVw9fjiobwxWYC7Kuun0nwxXE0Ypg2e X5ZvxT0eabaFKJ1cMNkt30Jp8/vqy7fu4JH5lbxwfMg2XJZgh/RGXK0EXdVvSo01vmNw PhvBEPNZCcBzpkRm0qHobh6yvJDL9UjHLI07vjKTixYOEgVXh7/Y/wHtPlWNi/AqtjES a1t93a8yecHMeA8bnm3nUS6q8kia1zJPjdeh16bLwYBpJLMdFqwsPsfwX795Ix1XRgRs fP8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=JLVDNRcrXopu4GAykxVX0bzWNF71qDEu8QRxiebuv1E=; b=U46K844iirLsA8gL+awb1jUaewVlJMx/WlDIP7YsDDUci06KLFy7m4HI5hZ/B7/2No aCr61F3/IMdiCBHMnwJ5aGRchCvtRWMtsLwH+V09gia4EvYTz1XJ8vGoIFj0Bcad3MaH jlmLM1jqQR4PRwp3j5uvLvwSno1LyUmnQl9spRm+m2NRJwkkka769RCA2be6DFnnfhIs 7qsZnYgICHQoJKvhzOQcBuK1KdsYhVMWe/nFj8gOGfs+IfcwzzEqfOIjpU197eOt1ZwT yikMLeO2u2NCKFcqtvF6xwNTDLme0Hv5t4AB/1gGipQ/14G+sK0rusDoOkMEFdXbqDtf HzoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1-v6si8482876plb.430.2018.04.30.17.41.55; Mon, 30 Apr 2018 17:42:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756020AbeEAAj4 (ORCPT + 99 others); Mon, 30 Apr 2018 20:39:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbeEAAjQ (ORCPT ); Mon, 30 Apr 2018 20:39:16 -0400 Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C604F8762D; Tue, 1 May 2018 00:39:16 +0000 (UTC) Received: from fidelio.ahs3.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B109313DD03; Tue, 1 May 2018 00:39:16 +0000 (UTC) From: Al Stone To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Al Stone , "Rafael J . Wysocki" , Len Brown Subject: [PATCH v3 1/3] ACPI: improve function documentation for acpi_parse_entries_array() Date: Mon, 30 Apr 2018 18:39:05 -0600 Message-Id: <20180501003907.4322-2-ahs3@redhat.com> In-Reply-To: <20180501003907.4322-1-ahs3@redhat.com> References: <20180501003907.4322-1-ahs3@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 01 May 2018 00:39:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I found the description of the table_size argument to the function acpi_parse_entries_array() unclear and ambiguous. This is a minor documentation change to improve that description so I don't misuse the argument again in the future, and it is hopefully clearer to other future users. Signed-off-by: Al Stone Cc: Rafael J. Wysocki Cc: Len Brown --- drivers/acpi/tables.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 849c4fb19b03..4a3410aa6540 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -222,7 +222,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) * acpi_parse_entries_array - for each proc_num find a suitable subtable * * @id: table id (for debugging purposes) - * @table_size: single entry size + * @table_size: size of the root table * @table_header: where does the table start? * @proc: array of acpi_subtable_proc struct containing entry id * and associated handler with it @@ -233,6 +233,11 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) * on it. Assumption is that there's only single handler for particular * entry id. * + * The table_size is not the size of the complete ACPI table (the length + * field in the header struct), but only the size of the root table; i.e., + * the offset from the very first byte of the complete ACPI table, to the + * first byte of the very first subtable. + * * On success returns sum of all matching entries for all proc handlers. * Otherwise, -ENODEV or -EINVAL is returned. */ @@ -400,7 +405,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler) return -ENODEV; } -/* +/* * The BIOS is supposed to supply a single APIC/MADT, * but some report two. Provide a knob to use either. * (don't you wish instance 0 and 1 were not the same?) -- 2.14.3