From patchwork Tue Aug 9 00:30:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 9270025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BAA4607D6 for ; Tue, 9 Aug 2016 00:30:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E1B825D91 for ; Tue, 9 Aug 2016 00:30:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72FF826E69; Tue, 9 Aug 2016 00:30:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9A7125D91 for ; Tue, 9 Aug 2016 00:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582AbcHIAaL (ORCPT ); Mon, 8 Aug 2016 20:30:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59230 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbcHIAaK (ORCPT ); Mon, 8 Aug 2016 20:30:10 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 374DD3B3C2; Tue, 9 Aug 2016 00:30:10 +0000 (UTC) Received: from localhost (vpn1-4-27.pek2.redhat.com [10.72.4.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u790U7bb014283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 8 Aug 2016 20:30:09 -0400 Date: Tue, 9 Aug 2016 08:30:06 +0800 From: Baoquan He To: linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org Subject: [PATCH v2 1/2] ACPI/tables: Correct the wrong count increasing Message-ID: <20160809003006.GF16660@x1.redhat.com> References: <1470697311-1292-1-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1470697311-1292-1-git-send-email-bhe@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 09 Aug 2016 00:30:10 +0000 (UTC) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current code always increases the count in the 1st element of array proc[]. Signed-off-by: Baoquan He Cc: Rafael J. Wysocki Cc: Len Brown Cc: linux-acpi@vger.kernel.org --- v1->v2: V1 is a wrong post because I didn't update the tested code to my local laptop. Repost with a correct v2. drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 9f0ad6e..34d45bb 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -281,7 +281,7 @@ acpi_parse_entries_array(char *id, unsigned long table_size, proc[i].handler(entry, table_end)) return -EINVAL; - proc->count++; + proc[i].count++; break; } if (i != proc_num)