Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp132581imn; Fri, 1 Jul 2022 11:28:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2HAK4f7PqPFTCmmdBdqrRiYJHDIwPQUR2+M9nXoaFKoTnpWcWr9USxgWTl0GWNRdW6rOT X-Received: by 2002:a17:903:2651:b0:16b:997e:e21 with SMTP id je17-20020a170903265100b0016b997e0e21mr18007116plb.71.1656700136295; Fri, 01 Jul 2022 11:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656700136; cv=none; d=google.com; s=arc-20160816; b=J8pLiXTfLdK9suvC1EpTWQZ31a4L6LHvb4nlCP5xshx8MjS+dlZJktHHh6rrSyFjzc eYFSY+aTjtzeFx4Vnm8wMdbNepWVoTquDe4pvPhyloXrC8r4pP3m/TBRbUx+fSs6ekQ4 hz3SMydZtsRbPnH4aH0ao2XiV9By8w3W3MMls6wueHiWYxnnAoYRAclNMaGBn5UjTTRp 6EsDfZAtAbQk0n0AkG4DBinHNwonDtgI3xsvDspq6HmC00l+TIWG0qJGt9EeuchtKodf j6jrJVVY82xO0VyNJDFnSFsstn1T30C+2ctc15d6w3J9q6Qwb/I/9dBtp5wbFxPXWZFH BdiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8kR/eUTqvh3iNFusTLos2UD0LUnTcyRYTp4W2CCxSJE=; b=0YQy5PHNZw1c+LD+Ay5KiF5jFKwbWYNWSlG3CfKrum+RGEcnirPJmOHll09+xZfFSk kp3mdAlFIETWNDVNwiB5+xkoONpv6xNZJ0YRNu9ZVB7eF8X1dM//YVKShqZe4IzG4ARH wUjYfQXexc1lqwVtLh0o9uQ4F1Z0Nur7tDfhGTP+NcutUMycFiFnXVJ/s6ag1WWOmIIh C+wYqJ4IzKrHOl3Ql4kcTE9ZVzBraTaBjr0JrUm5P8eT6f0pOq2n4k4xJguVIqdWqnQt Q7q8JSk2bs/BwvaMF00ZxgVSYHC1mfUYEAYQGJdrvGE2m983+R221YGlB+LKZtiS4nQv W4aA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a170902d4c300b00163ad368fe7si36580850plg.71.2022.07.01.11.28.45; Fri, 01 Jul 2022 11:28:56 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbiGASTe (ORCPT + 99 others); Fri, 1 Jul 2022 14:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230241AbiGASTd (ORCPT ); Fri, 1 Jul 2022 14:19:33 -0400 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D2115706; Fri, 1 Jul 2022 11:19:32 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id x184so5354970ybg.12; Fri, 01 Jul 2022 11:19:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8kR/eUTqvh3iNFusTLos2UD0LUnTcyRYTp4W2CCxSJE=; b=s3+073z7F52v7p2akPPKHAIhtS8Rhk+We7iDIlnRMu0xZLVovYUijjHhx+zzWsaF8h CeWoBNdipAxwuUeHQSJDqFae4MrEIuWQQA8Y3j4QltPxLn39QhoiGhkkkiy52+UMnA6z eNpSjpBJR+bTVtig/5dMLnOYpulPdG3WqSzRqqEA4K+QMRHFcQ4lwMtbwfGRmc6WncJs Zai369cYTUhCZkEOLF/Qaw4ZdNFuk2Za0/nbiNmg1fPA7TqOok3jIBFIJOWZya6NNSPN SC6pDeN0JYEF0zIlRnJaxbIDFId9TbipQYqQH7vTW3EPTBASLLh2ACnwEuKCXAwFCsxN HNOQ== X-Gm-Message-State: AJIora89NDxkEqTfuEL0nXP1aas5vqbgTlT8c/VhfMMxPKDJBb0vU/gm n2qUgXx7kwaVJcetPrPlBUNVbRS/S2xVK9Iamqw= X-Received: by 2002:a25:ae26:0:b0:66d:1fdc:263c with SMTP id a38-20020a25ae26000000b0066d1fdc263cmr17084720ybj.137.1656699571793; Fri, 01 Jul 2022 11:19:31 -0700 (PDT) MIME-Version: 1.0 References: <12026357.O9o76ZdvQC@kreacher> <2657553.mvXUDI8C0e@kreacher> <5606189.DvuYhMxLoT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 1 Jul 2022 20:19:18 +0200 Message-ID: Subject: Re: [PATCH v3] hisi_lpc: Use acpi_dev_for_each_child() To: John Garry Cc: "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Greg Kroah-Hartman , Yang Yingliang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, Jul 1, 2022 at 12:49 PM John Garry wrote: > > 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. Well, as I've just said, I can apply both patches just fine.