Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754221AbdHURY3 (ORCPT ); Mon, 21 Aug 2017 13:24:29 -0400 Received: from g2t2352.austin.hpe.com ([15.233.44.25]:43112 "EHLO g2t2352.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753927AbdHURY1 (ORCPT ); Mon, 21 Aug 2017 13:24:27 -0400 From: "Kani, Toshimitsu" To: "bp@alien8.de" CC: "linux-edac@vger.kernel.org" , "lenb@kernel.org" , "mchehab@kernel.org" , "tony.luck@intel.com" , "linux-kernel@vger.kernel.org" , "rjw@rjwysocki.net" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH v3 1/5] ACPI / blacklist: add acpi_match_platform_list() Thread-Topic: [PATCH v3 1/5] ACPI / blacklist: add acpi_match_platform_list() Thread-Index: AQHTGFwjnywryIINFUyGdWm/Gs0MS6KOsEQAgABU+oCAAAkSgIAAAqkA Date: Mon, 21 Aug 2017 17:23:37 +0000 Message-ID: <1503335626.2042.165.camel@hpe.com> References: <20170818194644.14538-1-toshi.kani@hpe.com> <20170818194644.14538-2-toshi.kani@hpe.com> <20170821112657.hrtjoeagxhc67rrr@pd.tnic> <1503333107.2042.163.camel@hpe.com> <20170821170415.kttnqiwj2fkntsc7@pd.tnic> In-Reply-To: <20170821170415.kttnqiwj2fkntsc7@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=toshi.kani@hpe.com; x-originating-ip: [15.211.195.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0316;6:qFBQkbd2rABX/iv5fT8u7a0ulSn1tPaC4sYY04X7LeMqP5/kn7WRp8FrvqQxqojHKE+BvoZ+w7ssVWBXmsQtzKf1bJkKp/Di1Yh3b2CrajQOjVk7NLP3qse0i0c7vY0WEj26LZBa1SLIGlAZ7ClW3pet0XmPRLuUgTjD5Pbli61okkAsnIRYn+yZm1LZDO5GFlmpNTf28LSWvVDZBWAkAbXVAFQFd9pys4pq65oT3VLCkmduLCWcw8AH8IyTMVU53U18a8gEN0ON8p8xPyzpGRotXvPrg1WVesJVoA1wGR6HhHANnNbDqLUHox2jecln52gCpeYPw0JorW1URNlXIg==;5:eXl3TUgpGPErfgvmWd4VBB8xCuakgmAl1edgLvcY0dZKg7lhALZGgdWEY275jz4L+rsPwRywgy/9V0ZpQwwC545FrsfupeIMkXPvOWWTYngk1vHq3ecOlzZRszXONp4jJOyJdu7pnQ9lb9i1a3TNFw==;24:h6t3d9+Q0eRLmoeZnArlt3X5j4dTXHB0ig+d5TI/v5HIimawMkDW56NOwjrUJwqkBrTyLEMwQw+JeCl5xiNysrmizijwfcuVGRy2lEDuQrU=;7:Da7LpBX9zC0eK4Ug+Uex1bi7Tckyt65EoJBUTNEvEY4TA2b6Z7Gbko3u38VomilC5LVGUU8SyDExNswyonjEJ1jdBWnL4SuGtanVPr5NSJwyC6W9LqSvugjfEfWYu+G3zzQco1lOkt+Q3rtS9Vsg3nUhz9Yn2FZ6VbzjxOJAERqUIjwsFvGLO2rOT27YxcYP7Vh31odU54x7brY6swVyD4XFt/IVuv0QMDMtTpyt6wQ= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: cb3a1a00-2121-4eb7-4963-08d4e8b95c02 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DF4PR84MB0316; x-ms-traffictypediagnostic: DF4PR84MB0316: x-exchange-antispam-report-test: UriScan:; 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)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0316;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0316; x-forefront-prvs: 040655413E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(377424004)(24454002)(199003)(189002)(86362001)(7736002)(2501003)(36756003)(189998001)(77096006)(25786009)(6486002)(305945005)(6436002)(8936002)(4326008)(14454004)(229853002)(2351001)(53936002)(6246003)(6916009)(93886005)(6512007)(2950100002)(6506006)(5640700003)(54906002)(2900100001)(97736004)(110136004)(3846002)(76176999)(50986999)(478600001)(6116002)(102836003)(3660700001)(103116003)(5660300001)(101416001)(66066001)(81166006)(81156014)(8676002)(1730700003)(106356001)(3280700002)(33646002)(68736007)(105586002)(54356999)(2906002);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0316;H:DF4PR84MB0187.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <1AFD20AE55016A40A56A15FA9B076B89@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Aug 2017 17:23:37.5705 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0316 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 v7LHOYk4013810 Content-Length: 1885 Lines: 45 On Mon, 2017-08-21 at 19:04 +0200, Borislav Petkov wrote: > On Mon, Aug 21, 2017 at 04:41:38PM +0000, Kani, Toshimitsu wrote: > > Putting to a single line leads to "line over 80 characters" warning > > from checkpatch.pl.  Would you still advice to do that? > > Yes, the 80 cols rule is not a hard one. Rather, it should be > overridden by human good judgement, like making the code more > readable. I see. I will make these changes. (It's really personal preference, but long lines of if-conditions are not so easy to read to my eyes, though.) > > strncmp() is fine without these, but it'd be prudent in case > > someone decides to print these strings with printk().  Will do. > > Someone does already use them in printk(): > > +               pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" > Revision 0x%x has a known ACPI BIOS problem.\n", > +                      acpi_blacklist[i].oem_id, > +                      acpi_blacklist[i].oem_table_id, > +                      acpi_blacklist[i].oem_revision); Oh, you are right about that! > > 'data' here is private to the caller.  So, I do not think we need > > to define the bits.  Shall I change the name to 'driver_data' to > > make it more explicit? > > You changed it to 'data'. It was a u32-used-as-boolean > is_critical_error before. > > So you can just as well make it into flags and people can extend > those flags if needed. A flag bit should be enough in most cases > anyway. If they really need driver_data, then they can add a void * > member. Hmm.. In patch 2, intel_pstate_platform_pwr_mgmt_exists() uses this field for PSS and PCC, which are enum values. I think we should allow drivers to set any values here. I agree that it may need to be void * if we also allow drivers to set a pointer here. Thanks, -Toshi