Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427AbdGRPtw (ORCPT ); Tue, 18 Jul 2017 11:49:52 -0400 Received: from g9t5009.houston.hpe.com ([15.241.48.73]:53448 "EHLO g9t5009.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbdGRPtt (ORCPT ); Tue, 18 Jul 2017 11:49:49 -0400 X-Greylist: delayed 63682 seconds by postgrey-1.27 at vger.kernel.org; Tue, 18 Jul 2017 11:49:49 EDT From: "Kani, Toshimitsu" To: "bp@alien8.de" CC: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "mchehab@kernel.org" , "rjw@rjwysocki.net" , "srinivas.pandruvada@linux.intel.com" , "lenb@kernel.org" , "linux-acpi@vger.kernel.org" , "linux-edac@vger.kernel.org" Subject: Re: [PATCH 1/3] ACPI / blacklist: add acpi_match_oemlist() interface Thread-Topic: [PATCH 1/3] ACPI / blacklist: add acpi_match_oemlist() interface Thread-Index: AQHS/0k82DJdcf3Cl0iqbrqG8JixhKJZEJmAgACo9oA= Date: Tue, 18 Jul 2017 15:48:54 +0000 Message-ID: <1500392379.2042.13.camel@hpe.com> References: <20170717215912.26070-1-toshi.kani@hpe.com> <20170717215912.26070-2-toshi.kani@hpe.com> <20170718053455.GA8736@nazgul.tnic> In-Reply-To: <20170718053455.GA8736@nazgul.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.219.147.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0185;7:5rXAJpWdfVR5XUD6byYJw7vdVWgEzJ8HJK0BZ6y8ccb2oeFEu7fV8gZUdd9ZNASYDIdsWVmO9zlmf8NkoCUMt5QZKdlyRflxPZVXrHKeWSiZjNDpQyGnJM9+VbXluYip+eJXZ7P/P97Z1Ze5fypLhL9nTtpwJNbZFVlmcs+fgdshfS6xRxnERvC+tkAmFPss9oPi1uNeuaW6EwzROiSpIf3XfMG+PpCOm/10J49ntJGV5OoE0i28tLqWnlvnWTe015XY/co9aTSqrlmCYJFvQMzUHzcB8f0vFn7eZUnXm1FFF1GOzJ7bKXKaoLuG+/hNhTEw/Q099LPb5q4YCu5XOHor4eMaSBDfZJP5fA9nQcyETcQ1VLHmAwVlnnlwcwMGBLwfaILIta4TPFf9df0PN4sdEUlV9JS8pquTlO+eJRh3RIC40cbiO3mYpzX2tZHujUcZCT2SASKVo4v0eB+A/pE3Y7i/nT+X6FRYJBAyVqXGZ0b5pHZaigcbVQtHJWhiS3ughG0P7Evm7z8hcTzDbAOIJJVzG4nvXY320y3MNsz02ryTynNG6gfsiuciRxckEUHQODiHOOLCAa/3ZQe6cn76QP8XT1vlChAEj+AMZQu+R9EoM3dvPxBtJSMUS0CRs7vqC4vszVUdhi22xCIQ9hUa1Yk4FsmimUq/e7os7TgyTJBABT1vT+pYbw/jFIvig7SUPXE9btnmzwvT5X3B/PYf9Kn/FqQFjjyGejbdxVMUNNE77jyWwhRtjQ+9TbUKvKoi4us9AwEq3JC5Pu8UKb2K0SLXLraAhj6ydLnUF+w= x-ms-office365-filtering-correlation-id: 60adbb0d-2219-47e3-9de2-08d4cdf47e63 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DF4PR84MB0185; x-ms-traffictypediagnostic: DF4PR84MB0185: x-exchange-antispam-report-test: UriScan:(236129657087228); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(2017060910075)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0185;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0185; x-forefront-prvs: 037291602B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39450400003)(39860400002)(39840400002)(39400400002)(39850400002)(39410400002)(377424004)(24454002)(53936002)(3660700001)(50986999)(6246003)(6116002)(38730400002)(110136004)(102836003)(3846002)(2950100002)(2906002)(6916009)(305945005)(7736002)(2900100001)(5660300001)(81166006)(8676002)(1730700003)(8936002)(3280700002)(14454004)(54356999)(77096006)(86362001)(76176999)(6486002)(2351001)(2501003)(189998001)(33646002)(36756003)(229853002)(6512007)(66066001)(4326008)(478600001)(25786009)(103116003)(6506006)(5640700003)(54906002)(6436002);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0185;H:DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <4CB520251833004FA64699DDB21EC922@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jul 2017 15:48:54.1317 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0185 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v6IFnvxi014294 Content-Length: 1677 Lines: 50 On Tue, 2017-07-18 at 07:34 +0200, Borislav Petkov wrote: > On Mon, Jul 17, 2017 at 03:59:10PM -0600, Toshi Kani wrote: > > ACPI OEM ID / OEM Table ID / Revision can be used to identify > > platform type based on ACPI firmware.  acpi_blacklisted(), > > intel_pstate_platform_pwr_mgmt_exists() and some other funcs > > have been using this type of check to detect a list of platforms > > that require special handlings. > > > > Move the platform type check in acpi_blacklisted() to a common > > utility function, acpi_match_oemlist(), so that other drivers > > do not have to implement their own. > > > > There is no change in functionality. : > >  /* > >   * POLICY: If *anything* doesn't work, put it on the blacklist. > >   *    If they are critical errors, mark it critical, and > > abort driver load. > >   */ > > -static struct acpi_blacklist_item acpi_blacklist[] __initdata = { > > +static struct acpi_oemlist acpi_blacklist[] __initdata = { > > Why the arbitrary rename? This patch defines 'struct acpi_oemlist' in "include/linux/acpi.h" as a common structure, and replaces this specific 'struct acpi_blacklist'. > If anything, you should shorten that > > enum acpi_blacklist_predicates oem_revision_predicate; > > unreadable insanity. Agreed. Will change to a shorter name like below. enum acpi_oemlist_pred predicate; + i = acpi_match_oemlist(acpi_blacklist); > > + if (i >= 0) { > > + pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" " > > +        "Revision 0x%x has a known ACPI BIOS > > problem.\n", > > Put that string on a single line for grepping. checkpatch catches > that error, didn't you see it? Will do. Thanks! -Toshi