Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1042160imi; Fri, 1 Jul 2022 01:37:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tKOOI5fNHmeA1C3tyfVjM1WGHjqCu6u1wAL8PRONA+ld+T8xu2QFJFBsr8+9DwwYwM+sET X-Received: by 2002:aa7:90c4:0:b0:521:2cd6:bd3e with SMTP id k4-20020aa790c4000000b005212cd6bd3emr20073026pfk.19.1656664624579; Fri, 01 Jul 2022 01:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656664624; cv=none; d=google.com; s=arc-20160816; b=CfyCBFLtcML9QZJ0gZi63AhXUCxd0Er9/p9xrpdr3F1V4is7apXV1A7W3P4rw27jcR EfvM1703JUHHf3dlfW56qkjknysE8NobDS06RkJ4o9YyC8qjbpMD+ssJyYBgqUAJhiEY aEmOVR6UyFrER9nGIFbLFF9jdokxAETow01nLFJJT2O734hM5//iR5krmZo1iJWwyFws M5F4cmghKrN6qTFVT3NCE+V+VbiHwtBPpE5Ka+h0+9INfRzDzpZZ/RRdmzJz876wfvnB g0yaf2sLhvxt7WL84lw0TIpStBXaChnFcZufuS55o8HRj8nNppXwMKxbsC9TyK6zyXJ9 cWxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N+D7PJYQlkbzeaYbt2DsPkNoiMrUPtLe5rF24Dw+k1U=; b=V3fuCEB1cc0E4w81ulVPEZkbOyjeg6Uqiw1drg2L5tvtYxqMtrO6Td9sZwGAVH/OpL iAHhhlgwBS9D6BqcLnAUd7ajUd4KUY3bKqcQl4Q8LoMSyc+8GYkIVEq3eQm588I0rFGM nHNZjr9YR7ZpVy0i2pHZ5BQw04QO9V8lDvWxsBmWsHBvAX/k/y3R99VWmNQjXpDV6wJl 0SivuL7Ut/rIgAI6/TVfsQxQyRxNe0NUcWx2/EjwMBXyFI1c2aoDwuNB2DI1Ty5rDppP 8epmzZf4+B/WSi0YmffnM15St/JRS+S/+EDAMNAk+tLZNiCQA/D3DjOQJdsWIvhXyOJj jfdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tkKNsshm; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a63d90c000000b0041154ac71aesi14637445pgg.591.2022.07.01.01.36.52; Fri, 01 Jul 2022 01:37:04 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tkKNsshm; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233214AbiGAIfC (ORCPT + 99 others); Fri, 1 Jul 2022 04:35:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232328AbiGAIfB (ORCPT ); Fri, 1 Jul 2022 04:35:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD89BCB6; Fri, 1 Jul 2022 01:35:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 938E362066; Fri, 1 Jul 2022 08:34:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94419C341C6; Fri, 1 Jul 2022 08:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656664499; bh=LLt8c3rqeMX8qdkQ+TsxWoZE+pxIfMpkrg04XFEYbNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tkKNsshm94FxoLTk9gePIVNMSUAleKhLFWAoVFOOxCxlufu9pWf1IcWA85gsP29eZ IJ5TO3fo5f/k97Ctnwv4TN07QtBbJriVQZOHaOFX+ra20ykAbBVZd0YnrWySrBdOVZ nW0mqGovklNz0csbZFQJpZZ+KggttA0+DmFbKT20= Date: Fri, 1 Jul 2022 10:34:56 +0200 From: Greg Kroah-Hartman To: "Rafael J. Wysocki" Cc: Linux ACPI , John Garry , LKML , Andy Shevchenko Subject: Re: [PATCH v3] hisi_lpc: Use acpi_dev_for_each_child() Message-ID: References: <12026357.O9o76ZdvQC@kreacher> <2657553.mvXUDI8C0e@kreacher> <5606189.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5606189.DvuYhMxLoT@kreacher> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Thu, Jun 30, 2022 at 08:13:52PM +0200, 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 Reviewed-by: Greg Kroah-Hartman