Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp497257lqb; Wed, 29 May 2024 01:53:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWT7tclKzsNjGGCgnNR12jDF0VA13UuXSxk1Rs4YvX3nAy5KmUwdz81x9k5O+pZQLQecT7SZtCU4SuVA9D9qru9tYYqJOYTKstmRDF3vQ== X-Google-Smtp-Source: AGHT+IG0NoYU3fpjljHwNTRfHUFum8tAt+iD1qhDzte7sQwCxmPAi24Tv7xXS9SaAqCsO6grlQXt X-Received: by 2002:a25:824d:0:b0:de5:5255:ceb5 with SMTP id 3f1490d57ef6-df77218a263mr13949144276.3.1716972802220; Wed, 29 May 2024 01:53:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716972802; cv=pass; d=google.com; s=arc-20160816; b=sAr8aQPqCFmJ+9DWfUSnPpms3219R2mvJ7K2rWADLXrE2GiSkAWUWRbeLqTpU4EKWZ a4S8af4hUMkcVZv0Lx+tOwy32BNBC9ilKJhbscfVHpwhV615AMJYSBjzOYCDGeHuAhbo S6jp90X7OrTC2fdv9n+5R0TLC1y/Ar8OawUbjq7Rlw/CwREtcNt5UIG6nZwrYp9ywWu8 puSy2Nrs58g+6pfM1rWdRfGKycKYdOBmw0dWgWAEc48YnuN54hN7ABmHpCMU+5oBW8tc FDBD4ZSFwhPcD0P1SRvjHiV5rEWwIhMUl3Gg5L4HMs73NTNlUl9rm3U1N5Pp0i3UKzP6 ouSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=QfPMyyR+iWeVmk5b8xxuxiihFBSuXvoXrdmY9jvSKDE=; fh=MgprcPV4K71thvsrQx3Max+2gH8/EKSJEMqhpGSlIKY=; b=B7ACzwlbcZ37YiQdSJrCS+BbyBTTQkGM0Ah4+19W312U9LzlN7p6OJzDZrkoe5tN7h SmbcRPjstscjilIvsXlYfuS4MlGRR5O50fPhCZBZLM84q1YW8XgZNQpeJKqlavWC1c8O GDbTVik2CIeJgUlMAmmCbTcVeRwsMHGYvvK7YoHRvBLqPPvfG7aHba+eLIe2w6DmdsiS t6iXdhu2FL6Q2TwQIEg31ps0B2tc5z6aywHI/SZRfaPy1rvoupFBUZjPR/HAajlpC21o Uf0Xrp3OManD5i7wjTy2o9WbCbhNhTLhszwpDILdzIopOKPEHaYF5Ft4/XX2SdK6DA9e p7xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XZ3vFxff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac10d75bc8si129039246d6.322.2024.05.29.01.53.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XZ3vFxff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EABA91C223E9 for ; Wed, 29 May 2024 08:53:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 381AE17F396; Wed, 29 May 2024 08:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XZ3vFxff" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BDB117F376; Wed, 29 May 2024 08:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716972583; cv=none; b=gMfLGGtBC/1MOsIjbivoTPUUWOUFY9BUIqLw5QIEBqKu+j+3SFnrws8WhZlMwAf5z1vakWj2sXwK6UzekedPsyBW0ZAsVL8xbXtH2whUf9MCsAX5Rlf1yCCioR3RlsvvmWL0AxZ0jt6JbfBGpp6IhUm/tpbGAp2W7w5sogzeUdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716972583; c=relaxed/simple; bh=oXs1Lc37Mxk8x9catadbvHDsc/E6WhT/Inpb76eDDHo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cWpj71PNnYZZkNeNdbi/KIwYrzIum0C1TkWZ0PDXNeHHJEvFq/x7c6j/gDnUHJN7ni7H5PBXKJ4R+quUOL7sPMOenkn/2rrr/NLr6ElVJs8cim7AKFCmT9qRxyJXEGGn8H6oJtBdvU2nvkI9syid40YcwcNp4rTTETHEzf9FiF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XZ3vFxff; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01170C2BD10; Wed, 29 May 2024 08:49:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716972583; bh=oXs1Lc37Mxk8x9catadbvHDsc/E6WhT/Inpb76eDDHo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XZ3vFxffA1yGqcEdQk4ksMu6nQIFKdwGwVfeExHsTs8FTcbMKZs7uCiJt9RQMQu7v B/GYua/Y/vlLCX78hxvhSEti9MJyqwp/A0Ak0GyXUEIzwm30+kuK/lsZ4MADJo5Npf Nk85BaDFgBE85jKDLH98D7BFzp9C+4z9AFH3vUh9PO6GasRUwZ8XlL9xYnU8DJQJ7v qJsFUtoZNSWfG9BtJBn2T1jj+urRSfgpfPrVPDYjDRy0TASqJ4+ShlEEbhO1cZnbn/ XuEKEUcYNez7FCte/zlXg9W91w2G8Qlvy+eIB4q2vMGCci54KsMYeNHWThEjeAorOw hI7ya43NzEa0g== Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-57a034697fbso677338a12.0; Wed, 29 May 2024 01:49:42 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU3zY5RbY0y6wzjGbM8QbG31BdgI3X79sOW7zl7dCVorWnPr6Lmq2K9Z8/pFVS7j+ZyERuDF1ucIaBM/ETy5dBwJULSGi2ltDciJuttaMGJsfzB76hgbXCRZ/iyvCZ7E5Oax0lBUagZmg== X-Gm-Message-State: AOJu0YxohrdnYhowB5s7Gi9vAINSJvMkKDeOtSPildpCAwKEl0aK6BhV 42m60Q/fCKPkEoRU4LTv5QpIkIYCp/NAPUVO/uGuklgB2+15UgGmbb/UNEhp3JEaDLb3W1WVX0G k2nvaXH+8JLOED8MaXYsMAYK60kM= X-Received: by 2002:a17:906:55ce:b0:a59:c3dd:db2a with SMTP id a640c23a62f3a-a62641aaf08mr896630366b.11.1716972581608; Wed, 29 May 2024 01:49:41 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240529063206.30421-1-yangtiezhu@loongson.cn> In-Reply-To: <20240529063206.30421-1-yangtiezhu@loongson.cn> From: Huacai Chen Date: Wed, 29 May 2024 16:49:30 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] LoongArch: Remove CONFIG_ACPI_TABLE_UPGRADE in platform_init() To: Tiezhu Yang Cc: rafael@kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Applied, thank you. Huacai On Wed, May 29, 2024 at 2:32=E2=80=AFPM Tiezhu Yang wrote: > > acpi_table_upgrade() and acpi_boot_table_init() are defined as > empty function under !CONFIG_ACPI_TABLE_UPGRADE and !CONFIG_ACPI > in include/linux/acpi.h, there are no implicit declaration errors > with various configs. > > As Huacai suggested, CONFIG_ACPI_TABLE_UPGRADE is ugly and not > necessary here, just remove it. At the same time, just keep > CONFIG_ACPI to prevent build error and give a signal to tell > us the code is ACPI-specific, and also put acpi_table_upgrade() > under CONFIG_ACPI. > > #ifdef CONFIG_ACPI_TABLE_UPGRADE > void acpi_table_upgrade(void); > #else > static inline void acpi_table_upgrade(void) { } > #endif > > #ifdef CONFIG_ACPI > ... > void acpi_boot_table_init (void); > ... > #else /* !CONFIG_ACPI */ > ... > static inline void acpi_boot_table_init(void) > { > } > ... > #endif /* !CONFIG_ACPI */ > > Signed-off-by: Tiezhu Yang > --- > arch/loongarch/kernel/setup.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.= c > index ea6d5db6c878..08a077e4efd7 100644 > --- a/arch/loongarch/kernel/setup.c > +++ b/arch/loongarch/kernel/setup.c > @@ -353,10 +353,8 @@ void __init platform_init(void) > arch_reserve_vmcore(); > arch_reserve_crashkernel(); > > -#ifdef CONFIG_ACPI_TABLE_UPGRADE > - acpi_table_upgrade(); > -#endif > #ifdef CONFIG_ACPI > + acpi_table_upgrade(); > acpi_gbl_use_default_register_widths =3D false; > acpi_boot_table_init(); > #endif > -- > 2.42.0 >