Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp955810rwe; Wed, 24 Aug 2022 12:01:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6k7XVs16Y6Gp4JM8lH2+WbMpaWHzKgKv5sJafUnbJ820JNGKOYbL0VMNQj4IWUYUtfWGjk X-Received: by 2002:a17:906:9749:b0:730:c005:5d59 with SMTP id o9-20020a170906974900b00730c0055d59mr202517ejy.419.1661367687631; Wed, 24 Aug 2022 12:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661367687; cv=none; d=google.com; s=arc-20160816; b=IRVvBvHm8L58iWl4MSAstUSdYG7mQI/5FhHP7EqrL/wUnm2hqevq4x+1E1Et3bDuq4 hxwSTEetVpW8bPCgPjNI0iAAp/VhXEGd7PeSc8/P903zNImBMariEeL0gUP9ed2l8sCT +Pw+EPH+Z94gAIqS01s0QmrGtL7Fat8a918+d2Tp+idNs96dOP/Ufdkm9N2AHjzMzU18 qqA8fJhnr0ZadHig/LOL8kW34nEUS244RtEgw4jhivrw+2fwmdM2g3rNFGRWVl7bLoby IrK3VPpiV4BUMTE9h4pNPjTkvLSoE6vWgeSm1EgLJHuLUXxN9phfchbrm15HSxn1qSoO KdVQ== 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=0fJKE51ZwEoPTaUMc8JUaf3dO19a2GBvZUGjA8lc9aM=; b=LPBqQot6mTaipjvynKKRhn5cW3DOwXKcA3iR3wsi/ItbmH1Pz1HsKomjH175wgLYhz e0zF9nnka4WEUghnraQ5TP2/Ajdp7QalHQGSbPFJ48ljxM27GIrcJ6+fe3lr5/BmWzpR 3D7/1Q1L28gRondAT8vx1MXZbGIR2IhWt2ss1e3bxidVh1amT+EWPXyACNCYVaM3WKrj Lim7c2xIbV3FtX4czWVwZUoRbHm1D4zpCU+IxHbyVczRX34sJWXYmN8+bsSGGJ41sNW3 VW64+58ctg30Yqhr0R/OHdXNfwQAA+6hCLWCNblzHPp2pygzrcrm1e6NttaUbXkzEOTu AClQ== 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 i15-20020a05640242cf00b00445f4cd9ddasi6161673edc.352.2022.08.24.12.01.01; Wed, 24 Aug 2022 12:01:27 -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 S239783AbiHXSeq (ORCPT + 99 others); Wed, 24 Aug 2022 14:34:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239788AbiHXSem (ORCPT ); Wed, 24 Aug 2022 14:34:42 -0400 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E33E07A515; Wed, 24 Aug 2022 11:34:40 -0700 (PDT) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-33db4e5ab43so1368647b3.4; Wed, 24 Aug 2022 11:34:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=0fJKE51ZwEoPTaUMc8JUaf3dO19a2GBvZUGjA8lc9aM=; b=ZwAmpYJALVf29JVgH/ycyVZHqUcyuoaZ6sYEDbMsahFUFuGFpzyCXTn0WU5ndQ/tpA mq5tv9ClbV+js8SHHUsqFNeWqmvIafm3M/Ne2avIuO31a6Mdjppt0a56ys2i/J/1QXO2 q2L/XFYyja+gUKO3GxH6imB/nQfSIj9ayY4MFNJii5HDYlyxN5FYHo6qOIhzbDDTQEDS hcd7drI46ljsW6UPWFvRx3nSn7Eskf2+CRT9/1OlEHbx1m+pKVdVhpEEk5fW0y2+G1Qs SMOFt3fl3Dwivwj4jaPzWwEAfnQrQSArFq9Gc9Eb9c9vQfxt/4ydt+6YoS2WAJJ0Gynq hJZQ== X-Gm-Message-State: ACgBeo0G1FhTBOxPa//btogDVvolGNl9lEfsd9goR8xGd1h31cINtu9S Z7nHOAhI1DcMxjNxdvU1ZpAgMfV/386trPfSKdo= X-Received: by 2002:a25:664a:0:b0:695:e7cc:9a20 with SMTP id z10-20020a25664a000000b00695e7cc9a20mr415847ybm.153.1661366079973; Wed, 24 Aug 2022 11:34:39 -0700 (PDT) MIME-Version: 1.0 References: <12036348.O9o76ZdvQC@kreacher> <2196460.iZASKD2KPV@kreacher> <5857822.lOV4Wx5bFT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 24 Aug 2022 20:34:28 +0200 Message-ID: Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device To: Andy Shevchenko Cc: "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Linux PM , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Mark Brown , Andreas Noever , Michael Jamet , Mika Westerberg , Yehezkel Bernat , Linux on Hyper-V List , linux-spi , USB , linux-arm Mailing List , linux-arm-msm , Will Deacon , Mark Rutland , Andy Gross , Bjorn Andersson , Konrad Dybcio 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,URIBL_BLOCKED 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 Wed, Aug 24, 2022 at 8:23 PM Andy Shevchenko wrote: > > On Wed, Aug 24, 2022 at 8:13 PM Rafael J. Wysocki wrote: > > > > From: Rafael J. Wysocki > > > > The parent field in struct acpi_device is, in fact, redundant, > > because the dev.parent field in it effectively points to the same > > object and it is used by the driver core. > > > > Accordingly, the parent field can be dropped from struct acpi_device > > and for this purpose define acpi_dev_parent() to retrieve a parent > > struct acpi_device pointer from the dev.parent field in struct > > acpi_device. Next, update all of the users of the parent field > > in struct acpi_device to use acpi_dev_parent() instead of it and > > drop it. > > > > While at it, drop the ACPI_IS_ROOT_DEVICE() macro that is only used > > in one place in a confusing way. > > > > No intentional functional impact. > > Side note: Should we not convert these to use acpi_dev_parent()? > > https://elixir.bootlin.com/linux/v6.0-rc2/source/drivers/acpi/property.c#L1271 > https://elixir.bootlin.com/linux/v6.0-rc2/source/drivers/bus/hisi_lpc.c#L397 That can be done later, but thanks for the pointers!