From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753129AbcEPB6X (ORCPT ); Sun, 15 May 2016 21:58:23 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:54938 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbcEPB6W (ORCPT ); Sun, 15 May 2016 21:58:22 -0400 Subject: Re: [patch net-next 06/11] ACPI: bus: move acpi_match_device_ids() to linux/acpi.h To: Andy Shevchenko , Yisen Zhuang , , , References: <1463127557-90824-1-git-send-email-Yisen.Zhuang@huawei.com> <1463127557-90824-7-git-send-email-Yisen.Zhuang@huawei.com> <1463145312.17131.347.camel@linux.intel.com> CC: , , , , , , , , , From: "Yankejian (Hackim Yim)" Message-ID: <5739290D.9020701@huawei.com> Date: Mon, 16 May 2016 09:57:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1463145312.17131.347.camel@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.126.191] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.5739291A.0056,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 658bb586952f6315047d4926cb4fc1d4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/5/13 21:15, Andy Shevchenko wrote: > On Fri, 2016-05-13 at 16:19 +0800, Yisen Zhuang wrote: >> From: Hanjun Guo >> >> acpi_match_device_ids() will be used for drivers to match >> different hardware versions, it will be compiled in non-ACPI >> case, but acpi_match_device_ids() in acpi_bus.h and it can >> only be used in ACPI case, so move it to linux/acpi.h and >> introduce a stub function for it. > I somehow doubt this is right move. > > Like I said in the previous comment the architectural split might make > this a bit better. > > You might use > > #ifdef IS_ENABLED(CONFIG_ACPI) > #else > #endif > > only once to some big part of code. If kernel is build without ACPI > support you even will not have this in your driver at all. Hi Andy, Thanks for your suggestions. It will add stub function instead in next submit. > -- > Andy Shevchenko > Intel Finland Oy > > > . >