From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95937C43334 for ; Fri, 1 Jul 2022 10:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236161AbiGAKtb (ORCPT ); Fri, 1 Jul 2022 06:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232356AbiGAKta (ORCPT ); Fri, 1 Jul 2022 06:49:30 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD607B36C; Fri, 1 Jul 2022 03:49:28 -0700 (PDT) Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LZBg542Ppz68652; Fri, 1 Jul 2022 18:45:21 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 1 Jul 2022 12:49:26 +0200 Received: from [10.126.173.51] (10.126.173.51) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 1 Jul 2022 11:49:26 +0100 Message-ID: Date: Fri, 1 Jul 2022 11:49:28 +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 v3] hisi_lpc: Use acpi_dev_for_each_child() To: "Rafael J. Wysocki" , Linux ACPI CC: LKML , Andy Shevchenko , Greg Kroah-Hartman , References: <12026357.O9o76ZdvQC@kreacher> <2657553.mvXUDI8C0e@kreacher> <5606189.DvuYhMxLoT@kreacher> From: John Garry In-Reply-To: <5606189.DvuYhMxLoT@kreacher> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.173.51] X-ClientProxiedBy: lhreml712-chm.china.huawei.com (10.201.108.63) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/06/2022 19:13, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH] hisi_lpc: Use acpi_dev_for_each_child() > > Instead of walking the list of children of an ACPI device directly, > use acpi_dev_for_each_child() to carry out an action for all of > the given ACPI device's children. > > This will help to eliminate the children list head from struct > acpi_device as it is redundant and it is used in questionable ways > in some places (in particular, locking is needed for walking the > list pointed to it safely, but it is often missing). > > While at it, simplify hisi_lpc_acpi_set_io_res() by making it accept > a struct acpi_device pointer from the caller, instead of going to > struct device and back to get the same result, and clean up confusion > regarding hostdev and its ACPI companion in that function. > > Also remove a redundant check from it. > > Signed-off-by: Rafael J. Wysocki This change itself looks fine and I quickly tested, so: Reviewed-by: John Garry However Yang Yingliang spotted a pre-existing bug in the ACPI probe and sent a fix today (coincidence?): https://lore.kernel.org/lkml/20220701094352.2104998-1-yangyingliang@huawei.com/T/#u And they conflict. This code has been this way for years, so I just suggest Yang Yingliang resends the fix on top off Rafael's change. Thanks, John