From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0D3BC25B0C for ; Wed, 10 Aug 2022 17:10:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233153AbiHJRKS (ORCPT ); Wed, 10 Aug 2022 13:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233382AbiHJRKQ (ORCPT ); Wed, 10 Aug 2022 13:10:16 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0021F2CB; Wed, 10 Aug 2022 10:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660151415; x=1691687415; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=se+6zjvh/5uSsxW/QEuqduedVHHp8pgTm+C8PMJwhp4=; b=caTnK5OU1smOyv3oD+2MKMLLTDnqshKhw5uMiiSzNZVdrSvwTPLKXGpb qlazKYTCrZt2MRivSzpMY2umtrxJrjxEIhRPneITfkpwgR/pwc+IEI833 bm5MciZ+rO1FxGrgHHoO2HCDJi3B/jok0pfp5nsXXM4cfLVzPWZ7KSdtf Zl+pQR/Q+EUX/JxGgkQ2n1/OGoQcKIjEDVOxcJKQw0lEqqoUYAJ3Rz63a mg4uTEBlRAsHLT5bnllHneTKs7D8Cz4DYbnRfudLm3mGmsuBmzO8RXM/V mAa+goxrUM/E7EeFzWDN5S8ZOV2fda4Wpk0cUsH9svTQb/G/u23rzY328 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="292398622" X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="292398622" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 10:10:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="664986467" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 10:10:09 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 10 Aug 2022 20:10:07 +0300 Date: Wed, 10 Aug 2022 20:10:07 +0300 From: Mika Westerberg 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 , Yehezkel Bernat , linux-hyperv@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v1 5/5][RFT] ACPI: Drop parent field from struct acpi_device Message-ID: References: <12036348.O9o76ZdvQC@kreacher> <2196460.iZASKD2KPV@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2196460.iZASKD2KPV@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Wed, Aug 10, 2022 at 06:23:05PM +0200, 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 the 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. > > Signed-off-by: Rafael J. Wysocki > --- > > I may have missed some places where adev->parent is used directly, so > if that's happened, please let me know (I'm assuming that 0-day will > pick up this patch and run it through all of the relevant configs > anyway). > > --- > drivers/acpi/acpi_platform.c | 6 +++--- > drivers/acpi/acpi_video.c | 2 +- > drivers/acpi/device_pm.c | 19 ++++++++++--------- > drivers/acpi/property.c | 6 ++++-- > drivers/acpi/sbs.c | 2 +- > drivers/acpi/sbshc.c | 2 +- > drivers/acpi/scan.c | 17 ++++++----------- > drivers/hv/vmbus_drv.c | 3 ++- > drivers/spi/spi.c | 2 +- > drivers/thunderbolt/acpi.c | 2 +- Acked-by: Mika Westerberg