Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3288676rwe; Mon, 29 Aug 2022 08:56:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5uWvWwvtzNX5TEvLND7jVVFJXTcLlQRehcWL/HYA89gicVVsLi0fZm6tYnTU5A3jn2Vgb/ X-Received: by 2002:a63:1a45:0:b0:42a:88e8:f14 with SMTP id a5-20020a631a45000000b0042a88e80f14mr14446685pgm.17.1661788572460; Mon, 29 Aug 2022 08:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661788572; cv=none; d=google.com; s=arc-20160816; b=SYBV3nmtdM19CFCiRDKHZXpQjUQHySfleksJ1nk38azVPgxa22QqrpWgrhffu9RfMN vUZ+cfqKO3OJNsmnabvgXX8f7prRz+QovaDVeubPKArD3DLp//QmNPq7YbLP8e+AWpwI PzPAmI/oLouY0sWa/Lp7q4K4D57Jn2qoyofKOCsnY/MSAHyDM+YaC1VPbc3v7Ec6bGQ2 ReBVu2XM330vUzq/dTz6Agvfa0//AS7kGUWvxPgbO4BcSgLYPDhxxgGcY5h9d2RUPKpI o8uksLmHiTw7iqKYnEj1o6CVmWBv2CpqPotxmnRdZcLX8H6nbWOs8vVynpYAbpgvLtSd 9U9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XOKmN19tfqaWFkOjYV/ZXKkz1+UmzfuyIT9ChOgZjAI=; b=kj3rezctLS4e1LGCy2g7GDkl2WIBJHksTw3nxP5d/A0dGEMpIni9Z5em5NubwsvHVU skzqTiGzdgkz1WypcoIwQB6TP4Ko+usqVXb+VGIyh4QLdw5NIR7osnL5DSiSwv6iOpbj rt04E8Ypb3vT/ikd4NhGST6PQPl+hHDgre+0BVtytXzwHCkaUpVLzaFVpqOhWHcQhHMJ F7NXxi9U2k1/sXpmln4BH6r3fg5t4DaqbHCFuOQFZaha4in2X2+h1wj5KU+ZTHrybIJs HF58j3so8gwbAMJ453sap8WQ7pr4gJZ9IwjgSHbeEn41veNDDO1r4hewJ6TIeNXTpePs /fVQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d142-20020a621d94000000b00537a3b296e4si9189266pfd.295.2022.08.29.08.56.01; Mon, 29 Aug 2022 08:56: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbiH2PyN (ORCPT + 99 others); Mon, 29 Aug 2022 11:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiH2PyL (ORCPT ); Mon, 29 Aug 2022 11:54:11 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0ECA96749; Mon, 29 Aug 2022 08:54:09 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id 936fe8cf992e9b5f; Mon, 29 Aug 2022 17:54:08 +0200 Received: from kreacher.localnet (public-gprs523165.centertel.pl [31.61.162.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 957EF66D25B; Mon, 29 Aug 2022 17:54:06 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI , Hanjun Guo Cc: 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-hyperv@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Will Deacon , Mark Rutland , Andy Gross , Bjorn Andersson , Konrad Dybcio Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device Date: Mon, 29 Aug 2022 17:54:06 +0200 Message-ID: <5617470.DvuYhMxLoT@kreacher> In-Reply-To: References: <12036348.O9o76ZdvQC@kreacher> <5857822.lOV4Wx5bFT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 31.61.162.222 X-CLIENT-HOSTNAME: public-gprs523165.centertel.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekuddgleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeefuddriedurdduiedvrddvvddvnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepfedurdeiuddrudeivddrvddvvddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepvdehpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepghhuohhhrghnjhhunheshhhurgifvghirdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghnughrihihrdhshhgvvhgthhgvnhhkoheslhhinhhugidrihhnthgvlhdrtgho mhdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehkhihssehmihgtrhhoshhofhhtrdgtohhmpdhrtghpthhtohephhgrihihrghnghiisehmihgtrhhoshhofhhtrdgtohhmpdhrtghpthhtohepshhthhgvmhhmihhnsehmihgtrhhoshhofhhtrdgtohhmpdhrtghpthhtohepfigvihdrlhhiuheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggvtghuihesmhhitghrohhsohhfthdrtghomhdprhgtphhtthhopegsrhhoohhnihgvsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhgvrghsrdhnohgvvhgvrhesghhmrghilhdrtghomhdprhgtphhtthhopehmihgthhgrvghlrdhjrghmvghtsehinhhtvghlrdgtohhmpdhrtghpthhtohepmhhikhgrrdifvghsthgvrhgsvghrgheslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopegjvghhvgiikhgvlhfuhheusehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhinhhugidqhhihphgvrhhvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqshhpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhushgssehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtoheplhhinhhugidqrghrmhdqmhhsmhesvhhgv ghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopeifihhllheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhgrrhhkrdhruhhtlhgrnhgusegrrhhmrdgtohhmpdhrtghpthhtoheprghgrhhoshhssehkvghrnhgvlhdrohhrghdprhgtphhtthhopegsjhhorhhnrdgrnhguvghrshhsohhnsehlihhnrghrohdrohhrghdprhgtphhtthhopehkohhnrhgrugdrugihsggtihhosehsohhmrghinhhlihhnvgdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=25 Fuz1=25 Fuz2=25 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Saturday, August 27, 2022 3:19:33 PM CEST Hanjun Guo wrote: > Hi Rafael, > > On 2022/8/25 0:59, Rafael J. Wysocki wrote: > > Index: linux-pm/include/acpi/acpi_bus.h > > =================================================================== > > --- linux-pm.orig/include/acpi/acpi_bus.h > > +++ linux-pm/include/acpi/acpi_bus.h > > @@ -365,7 +365,6 @@ struct acpi_device { > > int device_type; > > acpi_handle handle; /* no handle for fixed hardware */ > > struct fwnode_handle fwnode; > > - struct acpi_device *parent; > > struct list_head wakeup_list; > > struct list_head del_list; > > struct acpi_device_status status; > > @@ -458,6 +457,14 @@ static inline void *acpi_driver_data(str > > #define to_acpi_device(d) container_of(d, struct acpi_device, dev) > > #define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) > > > > +static inline struct acpi_device *acpi_dev_parent(struct acpi_device *adev) > > +{ > > + if (adev->dev.parent) > > + return to_acpi_device(adev->dev.parent); > > + > > + return NULL; > > +} > > + > > static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta) > > { > > *((u32 *)&adev->status) = sta; > > @@ -478,6 +485,7 @@ void acpi_initialize_hp_context(struct a > > /* acpi_device.dev.bus == &acpi_bus_type */ > > extern struct bus_type acpi_bus_type; > > > > +struct acpi_device *acpi_dev_parent(struct acpi_device *adev); > > We have a static inline function above, is it duplicated here? > Or did I miss some use cases? No, you didn't, it is redundant. I've just sent a fix for this. Thanks!