Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp567407iol; Thu, 9 Jun 2022 09:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEQTLdh/dhwXHZY2gL23ZbhKMcq2CLyOtZkDBeObApwOmCYcqmZruhzSXexLJVjIAWspJA X-Received: by 2002:a17:90b:4ccf:b0:1ea:264c:7c0c with SMTP id nd15-20020a17090b4ccf00b001ea264c7c0cmr4141731pjb.176.1654791130132; Thu, 09 Jun 2022 09:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654791130; cv=none; d=google.com; s=arc-20160816; b=vEWkPScjAoMwBbYeX8jVgCHXQm6wnqecRUWtf9Ni7GRswxBGACdlbZmr3f5uexsCGw xTY89u0GuJYWIYKqS89yENxLXDBKTmK+IcHxlBID5bMNVTU6XfKAYiUS2M62stwR6fek oHhu8fZW67GWhfXJXLXDa+LIrKEsaYDeiEBPxegZK8/YU/z/0HzgiT/1xQhg+l6meX3b DoQ5KBUfmTrDeRk0JBJttKOEY/ENwq5t88oWEkq7qPMXq1Fn2B5SOIS6IsObKiBj9y/E AGktVsQ+AfnsOZiqMWxxKXh2LkpgX0jvwqbj1ORaOalb487Pxtzfj/x1jj5kB6CqwbcV mvZQ== 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=QkjwIFSBShSANVnKqlWkqSbwyA6d8VE+MCw2zkRvhXA=; b=qT30A2k+nzp7Y6gDauXDN6YcF6bdWDn/DZZAhgw6uPVq2sehJv60ToQI0salPp9W+s X7TuNbBuRMutE6ggEuUFYHD2M7OIXNvCtledoUH7XCnHj7PDm+BIKZevRKQtkvIQs73R SZ12zaLQ9kYYY9yu3wcMINFMBQLmYiTYLzN0W2BzRWhtCa74o8V6x5/47p7UOFUFpZMK 2rHvgYTnSBvKJ4Ein06Tws+dtzG23PQhkly5d29hsKgRDF1fAScfl7x7RW2IwMpvv3so C7IcJzTUU5/dUh4pwrDZ26hXcRbdE/jElpFHBqURkdiYZHa6Xu7RwnDG5ipNFzKcJKH1 DM/Q== 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 f23-20020a63dc57000000b003fe1929619bsi8349153pgj.711.2022.06.09.09.11.47; Thu, 09 Jun 2022 09:12:10 -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 S1344155AbiFIP7u (ORCPT + 99 others); Thu, 9 Jun 2022 11:59:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241566AbiFIP7t (ORCPT ); Thu, 9 Jun 2022 11:59:49 -0400 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26665207EE1; Thu, 9 Jun 2022 08:59:48 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id s39so14938914ybi.0; Thu, 09 Jun 2022 08:59:48 -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=QkjwIFSBShSANVnKqlWkqSbwyA6d8VE+MCw2zkRvhXA=; b=4duzRHL/mWY2EU9hjFyElqH8UQy+ACfqvRTFeWNWd3oDNUa4cuIdrZuVp9QyJoFBlQ lWhI+Wma08EWQ8VgN7b5SFNBEglML9o6immKUxG3+EEc/GuktZHwWAko6hk5ZnEGXyuV V4DfOqbvLFqxZjfN/UN8hO//Ziuux1VXJNvB87Ya9AX4MiQiORS0fOkrn2tVhLImNdBN VqdjGg5CQ7Y4PFPuyNko+K7fYTdG8YNSHjIIRP1QAd74zp4rl97ngD0WIIWSdXLFlGLd gVPTGb9svZDZlLmmQYbZIMpm64KoOQq05T3uh2ChwWZve4XqXnRQom0q/wRawNF03wkM QKMw== X-Gm-Message-State: AOAM5330MrRtTGS1VgNNZPMpL8CSBS3IxbpLRWng3TCJzUyGe/smIOKB /QunUF/1qAnu9uvQOvRwl1ZRmGyoZTUK0ocoCsQ= X-Received: by 2002:a25:d748:0:b0:65c:6b00:55af with SMTP id o69-20020a25d748000000b0065c6b0055afmr39274465ybg.365.1654790387429; Thu, 09 Jun 2022 08:59:47 -0700 (PDT) MIME-Version: 1.0 References: <1843211.tdWV9SEqCh@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 9 Jun 2022 17:59:36 +0200 Message-ID: Subject: Re: [PATCH v1 00/16] ACPI: Get rid of the list of children in struct acpi_device To: Andy Shevchenko Cc: "Rafael J. Wysocki" , Linux ACPI , LKML , Linux PM , Mika Westerberg , Hans de Goede , Sakari Ailus 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 9, 2022 at 5:57 PM Andy Shevchenko wrote: > > On Thu, Jun 09, 2022 at 03:44:27PM +0200, Rafael J. Wysocki wrote: > > Hi All, > > > > Confusingly enough, the ACPI subsystem stores the information on the given ACPI > > device's children in two places: as the list of children in struct acpi_device > > and (as a result of device registration) in the list of children in the embedded > > struct device. > > > > These two lists agree with each other most of the time, but not always (like in > > error paths in some cases), and the list of children in struct acpi_device is > > not generally safe to use without locking. In principle, it should always be > > walked under acpi_device_lock, but in practice holding acpi_scan_lock is > > sufficient for that too. However, its users may not know whether or not > > they operate under acpi_scan_lock and at least in some cases it is not accessed > > in a safe way (note that ACPI devices may go away as a result of hot-remove, > > unlike OF nodes). > > > > For this reason, it is better to consolidate the code that needs to walk the > > children of an ACPI device which is the purpose of this patch series. > > > > Overall, it switches over all of the users of the list of children in struct > > acpi_device to using helpers based on the driver core's mechanics and finally > > drops that list, but some extra cleanups are done on the way. > > > > Please refer to the patch changelogs for details. > > Cool series, thanks for doing that! > > You may add my > Revieweed-by: Andy Shevchenko > to all non-commented, by me, patches (excluding soundwire) and to ones > where comment just about one line/two lines split (address them if you > are okay, otherwise ignore those comments). Thank you!