Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp655298iog; Thu, 30 Jun 2022 07:47:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v1olF5UIjLJqWp3V56Pt9nbG3K9nJFZ9XJZ9F/2wyIcFy5JPo3+7nTXqnCmhYV5gjiggfr X-Received: by 2002:a17:907:9605:b0:6f5:c66:7c13 with SMTP id gb5-20020a170907960500b006f50c667c13mr9564950ejc.66.1656600438325; Thu, 30 Jun 2022 07:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600438; cv=none; d=google.com; s=arc-20160816; b=S5/4FD4rML6ibbPU4RQYqhJOKgSGOPvsiXimvHLImXxboXSD0/8GUC3LchP/qHVEgj eTOCT3IAljas6kqeqEeLqDG7dTy1C9MRoLnsZ5UIGv5qxh5JZ3DbrTD0BKAF6Wj6MIxI oXccvleZfRY38yGT/W4N420aAIuIdwvxpwLtWit3uGxHpRtYt/ft0tEoEcXNzr60IgJ2 F34TPQVtebTx4cHnyHcUH1V8CQBtqYXB6OMfY014loCI+rCAExhb0S5IveeaKg73AlaK RFM8fumnoNyhiV2x6gOFgZravIZusbxz/Qo1ikWvMDH4NlzC7kNbu2W256vyk9knBLcY ZCuQ== 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=C4EqGBirXKDcf9WNpbRPzeXkxUlfCYbtVRjNQitJ5Gc=; b=peMFlk04+dX+eiz/ymKfkdSc0HVJ86oBOvz58Q6dPLS1PJbeiOm4G2G4v+JLSuL+yd 86avJRfZfdf+oioQJ/cMFCHGVTkpfbu9+qwojPr4PE3EMPVwZ1sx33ynFVccxvf5sgf+ D8UzRlqvbtR4rMcvuIihHWR1e3eGyy8M/fyYwpr4NyXeEQyDOrzh8IHW8+zn1rmpb+J/ YX5iBgBzq6ikJdd8QygT74YeOhYvuva18ZkGJW5l52tBXIv4/Lr/qjoUui6AaOVeaevL hHEOPxZ/K5NNBTKTXujCOI2RSCmh11yQUqweVbXR+AUnLhUs+uAEN4wtvGGLvreEsgWh 7KFQ== 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 pw16-20020a17090720b000b00722f70c72e5si4941379ejb.420.2022.06.30.07.46.53; Thu, 30 Jun 2022 07:47:18 -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 S234246AbiF3NkQ (ORCPT + 99 others); Thu, 30 Jun 2022 09:40:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbiF3NkO (ORCPT ); Thu, 30 Jun 2022 09:40:14 -0400 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8BAD1F615; Thu, 30 Jun 2022 06:40:13 -0700 (PDT) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-31bf327d4b5so89955587b3.13; Thu, 30 Jun 2022 06:40:13 -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=C4EqGBirXKDcf9WNpbRPzeXkxUlfCYbtVRjNQitJ5Gc=; b=DDeDs6akHIDbDq8tzkm9PzrqWn1T7DKhcbUaiP1fnZtdRz+I6kNztzl+9hDcidYDma HjPn+ciNJW31MMvhaWyAO8cR+uaIrPacQkYSVq3LvCOUGCsb+wWRHMc1t0Cm+al60CvG ki11Q/RtXVt6E1kecXAZhmv2WbO4lM7nIykApvoJu2a1unwUZc9ZRbmb8f7SjCMyDVTy 5lWUWNGCE7WQSrXzYMq3zQf2A5FhNJCZomsHXNli/wvPsJ980xUGITUHA1XLW8eK2baV xokVbB4J6BhFAJGz2YPmxT481IcY9mib2VVF4WKKf0UXrLrsiUfTyIFhZwQV0cRFjhRW BgMA== X-Gm-Message-State: AJIora8pp1WA5Uj0kDU6jFO6CtyiEzpWAisrun1fkQbTZNzZ61TxcxPa Cvlq0KVccrrYwgB54KlPy0wSY7BcQo/L3Iy/Sg4EQSN9 X-Received: by 2002:a0d:d086:0:b0:31b:d0b2:e11f with SMTP id s128-20020a0dd086000000b0031bd0b2e11fmr10281349ywd.515.1656596413216; Thu, 30 Jun 2022 06:40:13 -0700 (PDT) MIME-Version: 1.0 References: <12026357.O9o76ZdvQC@kreacher> <2657553.mvXUDI8C0e@kreacher> <7aad2916-1774-76c5-339a-bbcac4655642@huawei.com> In-Reply-To: <7aad2916-1774-76c5-339a-bbcac4655642@huawei.com> From: "Rafael J. Wysocki" Date: Thu, 30 Jun 2022 15:40:02 +0200 Message-ID: Subject: Re: [PATCH v2] hisi_lpc: Use acpi_dev_for_each_child() To: John Garry Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Greg Kroah-Hartman 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 Thu, Jun 30, 2022 at 3:37 PM John Garry wrote: > > On 30/06/2022 13:48, Rafael J. Wysocki wrote: > > On Wed, Jun 29, 2022 at 3:47 PM Rafael J. Wysocki wrote: > >> > >> From: Rafael J. Wysocki > >> > >> 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). > > > > I've overlooked another usage of the children list in hisi_lpc, in > > hisi_lpc_acpi_probe(), and eliminating that one is a bit more > > complicated. > > > > So please scratch this one and I will send a v3 when 0-day tells me > > that it builds. > > Hi Rafael, > > If it makes things simpler then I can just fix the driver so that we > can't unload it. Let me know if that suits better. I'd rather do the ACPI change first. Also it looks like the "remove" is needed to do the cleanup in the "probe" error path anyway. Cheers!