Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp955507rwe; Wed, 24 Aug 2022 12:01:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR451ea+Z84vIoVQfDzKfntOj00IGS9o6aku3HEe56DqZdVxld74xzLtT4+9YPfDi4DzibD8 X-Received: by 2002:a63:8b44:0:b0:42b:2330:243b with SMTP id j65-20020a638b44000000b0042b2330243bmr241254pge.581.1661367672369; Wed, 24 Aug 2022 12:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661367672; cv=none; d=google.com; s=arc-20160816; b=IxP8M9z4WgD4+CI2qQb4XOieq3yVqfvbbIxIiJqHIy07frfX9KVidPPiuYz2k3Ab7I PVDwEI8IRcfd0+XVsWXvkgEV9Hz4LIRYyK1EsStAHVZVMs2/i8EzHZ9a3M5cHFCsUpyO L7woRAV6bq3xnLHR9yraZwnaCAv+x3/+qFgszoYkRU6AKxlOokG7WxuHV7pt9+2xkw6r VrzPPDuAuCKYmaKzt/lEXKfr4o/EJAU/9HiX8tSFYevGvhXhQXbGC7utZTIsFfr5iuD3 fFWVW/ltJlpNeStVoC5Z0AeNrCNJQLyJa7lCol/Ytob6DfXwVmkjKgdxedml5YIgPyLY 7OOA== 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:dkim-signature; bh=yK26ITzqXq21qe37kX2FSO/m5ELFXUKoDF4JXVSf2Yk=; b=No+EO4rg3zc4vIRsLsZknodOZm0uMWBCBNAeDlLfuWCkfe3ksBQCL4i4qFqeLSSLR5 tpA5eq63+o+L+e6d32QMzOs0Exu4FfQdRHrF3b42ATngvdVLtKD7qg8L6s2zdQThYhG+ R2BJBLxj6FUH1NW7tywfSbZnRBRgaLzkIcqY1cIlAng6AG7pkp/gC0NqnOtS5vR521td n3W004wzvtvqqpLXc4ClyPErfMFjhVcHLCldJQJfPQZNmkgHxjDoI+MaiclUWFhEIrsx XDTrUpD3igwK8hDdVGKO/aajm6SLerclyyxTkXiFlOhZ26NQd2xpTFabsqi+EhIapFBo LncQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MvM8l4jy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a17090a4e4800b001fb47ec7b5bsi1682849pjl.165.2022.08.24.12.00.59; Wed, 24 Aug 2022 12:01:12 -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=@gmail.com header.s=20210112 header.b=MvM8l4jy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240608AbiHXSX6 (ORCPT + 99 others); Wed, 24 Aug 2022 14:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240573AbiHXSXz (ORCPT ); Wed, 24 Aug 2022 14:23:55 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFF5E796B6; Wed, 24 Aug 2022 11:23:53 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id m2so5934337qvq.11; Wed, 24 Aug 2022 11:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=yK26ITzqXq21qe37kX2FSO/m5ELFXUKoDF4JXVSf2Yk=; b=MvM8l4jybyLdDHdEzRIMNyw4AOmrePmypzWB/zttf9T0J7PG9J4Wx7dBNTuzVXoDk6 Pts/G2fqgF/JQaMqB8fJCMqJ+beuAsVHD6sSwZSkmpwHWjs16E2IT4XNIe6Q6fgb30Zs ZcGIpsoNniM9EIH/+Zb37nJErUfqlUsOccOHh0uSZMEY0dSlyAXKjLqlO75Yqdtv7OO1 dYCSyGktFrnrMS7HOVtlvTOS/XCbqoto8P5Sqf35hN1TiAKL6A/vNI3F+nGX8XYj/qRm v0nFEnMlNMqnOzVrB+gBsvrsuai6QZJ7YhzoDyRlAbIr6vHxT20Zg8tQelGuhq4BeT5z iqhg== 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=yK26ITzqXq21qe37kX2FSO/m5ELFXUKoDF4JXVSf2Yk=; b=ew9wNes9zgcyGDsrd9Bi5eQkrcA/8ts6AbnCGm2s70xB4jHBeqa7W8sd89pDIeu4ni 0kQjTxsT6Kr/pmoRhJBNYNF9t2tHzFre8+a/zev+qyeMUtz/jJiOeIgQwhyquGxk/rxH vCSqCT6gPXnlBS5xODD1yH7QLVBrHtaGS/qvfgEegPBboL9iU/OhsqrPSXyvO8ONTbYU uWmm0Pi/DRMUicCK8RzGy+tRxV26S1KJ6qwEu4UTZ61fj9FeukNgyQteQQOgkBfLC6YA 4whmgZyiQirpwur0//6LYLmBBSYNjWN4GUplGGvjhioFLIy4P532lEiy6q16+eFWsO23 +chw== X-Gm-Message-State: ACgBeo1mIcw8u4OkCzInhBa79wJxYpkEWa69GAeKXIONalRajjGPESHV k2dXehjKwsFSnqdhqVbuCyZM91nFx3GNbXlw/FU= X-Received: by 2002:ad4:4eaf:0:b0:496:ac46:2d9c with SMTP id ed15-20020ad44eaf000000b00496ac462d9cmr345077qvb.82.1661365432794; Wed, 24 Aug 2022 11:23:52 -0700 (PDT) MIME-Version: 1.0 References: <12036348.O9o76ZdvQC@kreacher> <2196460.iZASKD2KPV@kreacher> <5857822.lOV4Wx5bFT@kreacher> In-Reply-To: <5857822.lOV4Wx5bFT@kreacher> From: Andy Shevchenko Date: Wed, 24 Aug 2022 21:23:16 +0300 Message-ID: Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device To: "Rafael J. Wysocki" Cc: 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 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 -- With Best Regards, Andy Shevchenko