Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1353679imw; Tue, 5 Jul 2022 08:03:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0/nnOaCGudtUaXGWDuSjURQHFks0nVCXGHHUm9onuTFpxJJQ3N6hlWBtSdB6tDY0qbPmM X-Received: by 2002:a17:90b:3cf:b0:1ef:8a69:9ad1 with SMTP id go15-20020a17090b03cf00b001ef8a699ad1mr11827259pjb.114.1657033392617; Tue, 05 Jul 2022 08:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657033392; cv=none; d=google.com; s=arc-20160816; b=ocOa2+fOKelrWL5o4SL6u4P9CjYYuVZ98crHFROfOQ0gc1xzovTBVPcuGHiIJB2Ppe BAUUFeBEIsdpCe35VNQM+T7qDUaR0xtwcMCFSJIEH18DeS0eCTLEKQE0PAgoqZzReBPF Xrj8qwxj8FwSGldRLWNRTIwrpjUesfK0xY/hRn9lrWXDcxZEtwcEDCBfMa0dvwhR9MNE 9gXuL4ZBe6DZ1zXYkBBVzVfsJ5gYpediE6t/xDOdiiXDAuNBjgba3+tgv5LJ6TXWH+qB askmf6yV6oWZhXQ7ksOTxH3uQpxOAfCaw4YsQPgcctndjzsxxIOvLo03OxAKtmUynLTo 7hHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:subject:user-agent:mime-version:date:message-id; bh=8Gc7tgAudRh7Oftrt8SjP92/bo4taOYMpHKTzVvyALA=; b=rkhi/XBQpOIc5y2TGZk7kRfpGXNRDc/qD8iZN7FnMK1Zup0W9rs6M+5c0S1VjgWZ7C QzUr63BHO9CSxUd2Ztc0zh5T9PmxHmgEtbgbc9d2CV0Wjk6tcrZSxc5dxwNka15dShpx GL0tIYnWiypdUxG1bIRpJWN7oF3+VozuLg9Nen1LsJb00QlFQvSmwYYt8lCtDF78fbcu n8FVvDn0VmmyGLJ8D1TDvW2UpVik6eR+qip1eXN+8m0R5N0NA6bFL7Jebna26bjbv9XL WwhY+ePgZfwCtXtobq0uF2kIynoXNW5oFs6at/huewY35Y8U3RrBLjeHJH9FqdNPGniz VQyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r192-20020a632bc9000000b004125addbbc9si6047630pgr.470.2022.07.05.08.03.00; Tue, 05 Jul 2022 08:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbiGEOwF (ORCPT + 99 others); Tue, 5 Jul 2022 10:52:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbiGEOwD (ORCPT ); Tue, 5 Jul 2022 10:52:03 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0AEFA3 for ; Tue, 5 Jul 2022 07:52:02 -0700 (PDT) Received: from fraeml701-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Lcltm6k9hz689P2; Tue, 5 Jul 2022 22:49:20 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml701-chm.china.huawei.com (10.206.15.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Tue, 5 Jul 2022 16:52:00 +0200 Received: from [10.126.171.232] (10.126.171.232) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.24; Tue, 5 Jul 2022 15:51:59 +0100 Message-ID: Date: Tue, 5 Jul 2022 15:51:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v1 4/4] bus: hisi_lpc: Don't guard ACPI IDs with ACPI_PTR() To: Andy Shevchenko , "Rafael J. Wysocki" , References: <20220705114312.86164-1-andriy.shevchenko@linux.intel.com> <20220705114312.86164-4-andriy.shevchenko@linux.intel.com> From: John Garry In-Reply-To: <20220705114312.86164-4-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.171.232] X-ClientProxiedBy: lhreml703-chm.china.huawei.com (10.201.108.52) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/07/2022 12:43, Andy Shevchenko wrote: > The OF is not guarded neither ACPI needs. This doesn't read well. > The IDs do not depend > to the configuration. Hence drop ACPI_PTR() from the code and > move ID table closer to its user. Do you need to explicitly include mod_devicetable.h, which has the definition of acpi_device_id? I saw a similar change for another driver and it was claimed that including mod_devicetable.h was required. Thanks, John > > Signed-off-by: Andy Shevchenko > --- > drivers/bus/hisi_lpc.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c > index a6513a571d7b..74f4448bff9d 100644 > --- a/drivers/bus/hisi_lpc.c > +++ b/drivers/bus/hisi_lpc.c > @@ -589,11 +589,6 @@ static int hisi_lpc_acpi_probe(struct device *hostdev) > > return ret; > } > - > -static const struct acpi_device_id hisi_lpc_acpi_match[] = { > - {"HISI0191"}, > - {} > -}; > #else > static int hisi_lpc_acpi_probe(struct device *dev) > { > @@ -688,11 +683,16 @@ static const struct of_device_id hisi_lpc_of_match[] = { > {} > }; > > +static const struct acpi_device_id hisi_lpc_acpi_match[] = { > + {"HISI0191"}, > + {} > +}; > + > static struct platform_driver hisi_lpc_driver = { > .driver = { > .name = DRV_NAME, > .of_match_table = hisi_lpc_of_match, > - .acpi_match_table = ACPI_PTR(hisi_lpc_acpi_match), > + .acpi_match_table = hisi_lpc_acpi_match, > }, > .probe = hisi_lpc_probe, > .remove = hisi_lpc_remove,