Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1157398imi; Fri, 1 Jul 2022 04:25:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ul3gEsh38nh+nzwOdwcKnXzok6mGi9yw0xi6GLEjS/s4Y+S9r8irE5B2WrCijmPHmLC7QI X-Received: by 2002:a05:6402:3808:b0:435:5a6c:9dd9 with SMTP id es8-20020a056402380800b004355a6c9dd9mr18436231edb.368.1656674748075; Fri, 01 Jul 2022 04:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656674748; cv=none; d=google.com; s=arc-20160816; b=bSpQf0ffaD03a6Al5KJDHZdWtpLWb/f2lMLLJSHEw9GHpVoEuESWgtrhfQazJzKEaT vBBmF5zBQHyRBGIVZrfbSYFGUA9tddqUPvaBRPdipJtlFggfKacfyrqroU6NdAM64MxM xDHmerxza/P9XhTJ/QFMXWVctrCj0Sqq8kCt1PtMPJUfebzPJrYfilBNTP1GS7popgks Uk+Lyetm4K+9GaUQ4bYu3iAU29sB/a9IOdc+qrUFTCLsTougJOmQi1RK+xr7S+lVvTFo kF35F1OV8qpaiWhl2q1rCCj8iHSnebAvRjLP9w3GgN1AzAPSp1RHcBcn3ddDUkIUeHY9 JbAg== 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:cc:to:subject:user-agent:mime-version:date:message-id; bh=kTV7UhlNrXYOWrocAu3HBAy0ksEQ8SVwXuIqNStu4n0=; b=EMx2YuyVZywmNjrLT9ty7AuPIs0BKhipqrJR3Ie7PBBCO3bLzMjhGGpwIiAGId4RtK OqMJGOZ+K0KAQx/kmwwQjzdse117eXkfsZnY4iu5+sF18AUEPvqQViW18vvo3tnWIi9n bB6K5hggzm6ybSqqmHTR5KNAJNPCfa0MB5rI/f4tN2K8g3160itANH23Fa7MdlgcyKe9 Se+2gnvxXASR8qNSLzYEIgcsoKuEed0aFJTEoJU00KhmcsFr5F+YjbYiZr2pxTI1d8Mq PFVmKfHS2wf02H+PqIgP+97exloljCxOt9g4Vv/cvzIj3Kspce8NjTHYLNecbJAYT6O5 0mRQ== 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 sh39-20020a1709076ea700b007123ba1f12asi26656834ejc.552.2022.07.01.04.25.22; Fri, 01 Jul 2022 04:25:48 -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 S235902AbiGAKtb (ORCPT + 99 others); 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 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 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