Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp445073rwb; Wed, 10 Aug 2022 10:44:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5EWCGA47Y6zWri4gaPY1x20Ot2y2tWCbde22ymjyWxMpa+780bifVMHVFHFHVqpXy0WVgm X-Received: by 2002:a17:907:7290:b0:731:3c0a:97f8 with SMTP id dt16-20020a170907729000b007313c0a97f8mr13443594ejc.127.1660153454058; Wed, 10 Aug 2022 10:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660153454; cv=none; d=google.com; s=arc-20160816; b=Lu/qvPFXCaVfNRFb/7rlQgIwRC+NSoGQCH0uWCHQPwQhfx+ZHlD8oLDbmBJWylH+F1 +QsdDPpaqJstNph91esXBnNae/ZkVtciFPj6X9ytBwa3CpSmCD3n3BDcHPivfuS8gtGZ gCPbNsSPcuVPSOvvPvEn2ZtPro0TpjUnxR23ibrR7hEteiEwb6ZYR5o6VUgSgLsOYiZq oUyvFT0E+OHJxsE8NZ94fk3IttnynX00ZYIfZvS+gRUop/ghCbSgHT4RBbYVUH4an7dR acsC8+zSXIwfbxyx99QJxWIAuToOhUFvwq8/aQO+FRH4+r+RnLwiRS9pF9TKv8IpN4s0 Kmaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=q85yP2YVzd/24r4UJMoD3b6ZVzimsubpA+4QhEIQFRY=; b=wt91MwWhCzJLArsyLjVXDVtje0L9FDF2qrC2DvImjV3yUkqGJJJlt0+sO/k3Xu+1eC FGPUqU5pit8C5cDhQ459wvJl8L+2dywegQagzaZFTY4zkz/IMYpkdqJ+8FzOT3DbCT6V VhDiBrCg/i9v9AgR3w0b4nsHlGzLWVYWkV+5qGShv/yS7Kjg1SoTOmtAxWkdWakDM5WB 1iNKtXZWOOX3JQUBudTHMyc1FJWoRxQEXViGE7ImUtkSGge2kzXE0HOSgP6ylUmysn4J icixrudpOYoMNvv+x7ylRKppo6SAtR0dSAiR3pBEGlP7jYbkhhZTcV1qZX75UsocE/dP s4/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=caTnK5OU; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds11-20020a170907724b00b007308bd40223si5038041ejc.669.2022.08.10.10.43.48; Wed, 10 Aug 2022 10:44:14 -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=@intel.com header.s=Intel header.b=caTnK5OU; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233361AbiHJRKT (ORCPT + 99 others); Wed, 10 Aug 2022 13:10:19 -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> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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