Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753961AbdHUNaw (ORCPT ); Mon, 21 Aug 2017 09:30:52 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:38389 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753840AbdHUNat (ORCPT ); Mon, 21 Aug 2017 09:30:49 -0400 MIME-Version: 1.0 In-Reply-To: <20170821132054.mwhdxkcka4ocp6h5@pd.tnic> References: <20170818194644.14538-1-toshi.kani@hpe.com> <20170818194644.14538-2-toshi.kani@hpe.com> <20170821112657.hrtjoeagxhc67rrr@pd.tnic> <20170821132054.mwhdxkcka4ocp6h5@pd.tnic> From: "Rafael J. Wysocki" Date: Mon, 21 Aug 2017 15:30:47 +0200 X-Google-Sender-Auth: HHORSrsd6u6RXZyzx6Zp3C70aXA Message-ID: Subject: Re: [PATCH] ACPICA: Check whether ACPI is disabled before getting a table To: Borislav Petkov Cc: "Rafael J. Wysocki" , Toshi Kani , "Rafael J. Wysocki" , Mauro Carvalho Chehab , Tony Luck , Len Brown , ACPI Devel Maling List , "open list:EDAC-CORE" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 30 On Mon, Aug 21, 2017 at 3:20 PM, Borislav Petkov wrote: > Borislav Petkov > > ... and save us the splrinking of this test around in the callers. > > No functionality change. > > Signed-off-by: Borislav Petkov > --- > drivers/acpi/acpica/tbxface.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c > index 010b1c43df92..881b0d5b2838 100644 > --- a/drivers/acpi/acpica/tbxface.c > +++ b/drivers/acpi/acpica/tbxface.c > @@ -226,6 +226,9 @@ acpi_get_table_header(char *signature, > u32 j; > struct acpi_table_header *header; > > + if (acpi_disabled) > + return (AE_ERROR); > + > /* Parameter validation */ > > if (!signature || !out_table_header) { > -- Is acpi_disabled an ACPICA variable? If not, this cannot go upstream. Not a big deal I guess, but somewhat yucky.