Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3388421rwe; Mon, 29 Aug 2022 10:40:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7lNEkCZcvD/RMTsVrZhFdcBhIE/r3/n/gmbzvdxg0847TyJn+Lur6bkXc+XDXf2z2ZjA4t X-Received: by 2002:a17:907:2cef:b0:741:4fbf:4628 with SMTP id hz15-20020a1709072cef00b007414fbf4628mr6866045ejc.334.1661794819841; Mon, 29 Aug 2022 10:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661794819; cv=none; d=google.com; s=arc-20160816; b=cP36dXKZczXUHNSVqoPGADKORFVowf05smGXIMKfqbDO4kdFlQvFuf8tVIcP/O5Q+X K5Y3b95lgdv3zuVEhYeXOi2V5IirEPdbizmoD63+4AfIp536bClHr1BkjXIGqYbr3tlg Gh/2YNQWKROQ0f70vz1psQtZB5/0TlsfLfixh2DeU5kRywPNeTuSKDvhKd6ks8JDv89C +3aVCE/JbFhwsunIsK+7Tq7dBFdpBfbBZwEX0bci56/Da2vV75TmPIeSxcfHTyj8DMMi EyfyBGu9s5SWG3ARtzT+Y05c9M6IslJSfdaMqB5kIvOoqr9WhNYjSz4qoc45u7Dfzf4e VCYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0ot93cHnqeEcl6UcTB7wo6X2N37F+xWAKwrt04uxcgA=; b=0Jlrmq05YWB9poUG+hVKjG2EKObZIrA1rvbvjf092ozG5kdMfuYNr43mbfc6bZ5uI5 /PTsAnQ46WfPV9TKYkloo+4zTQuyuZYjEVeZA8WluT1/FBw6udCUFrjNegzCZD9XrjPK k+GV4Y6hxeoDHTEBv9ulDXm9T9iaF4Cd+sL8D/yPnF3pdtZBLoaZNyCwoE+Mc1BorHB8 F7FizTe0e92UU0OYBYEKnee0VuK9zM5wEYF8U7zueoQ/xN9mt5HgvDPrqnHsjwpTtVUW AIlssNUsbBrs0kfksmvxoIeiARx6e5REidw8f99xCPBPjec/9P9+YFz0YelKTMhCq0jc lOEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Qjw3/7BF"; 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 r1-20020a1709063d6100b0073cd848ae8asi6035869ejf.321.2022.08.29.10.39.53; Mon, 29 Aug 2022 10:40:19 -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="Qjw3/7BF"; 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 S231230AbiH2RAQ (ORCPT + 99 others); Mon, 29 Aug 2022 13:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbiH2RAJ (ORCPT ); Mon, 29 Aug 2022 13:00:09 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3AF34A811; Mon, 29 Aug 2022 10:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661792407; x=1693328407; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6nppHl6aPXqc0co9Epu68ExNtuFi/fpCELicTEOpI80=; b=Qjw3/7BFfbUa9vcgckOXu9Opxf/g/G5pfRyCOf49MTRw1zBbjffsuEjE Qx0C0jFPt2U/W5YCOWqLleRF09DtDymEztDQdn4sZUMcDuGI6ywtnKZ1v NXUV/8yFggHf+SV4e2rv5H4JDd8PA4qLstAfPcZA3pNYnpfauS5xdP8Es pilXT02Xkw8bIedF/AffvpXkp39K3ildMOmEB6F5DGtSWfHpkoOWgqLlp P5hEDPOsDyQi08Dizo1/ACmAe1LfesqMFsiaEvXgi3Ae3vkx/WacqQgc+ wOaeoQbod8bXJj9AYGnLJ+hd5NldSckUYCVeVNQhAbbU1s9qNTKbrHQLP g==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="295724910" X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="295724910" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 10:00:05 -0700 X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="562295517" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 10:00:04 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oSi7F-005c6k-2I; Mon, 29 Aug 2022 20:00:01 +0300 Date: Mon, 29 Aug 2022 20:00:01 +0300 From: Andy Shevchenko To: "Rafael J. Wysocki" Cc: Linux ACPI , LKML , Linux PM Subject: Re: [PATCH v1] ACPI: property: Use acpi_dev_parent() Message-ID: References: <4756666.GXAFRqVoOG@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4756666.GXAFRqVoOG@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Mon, Aug 29, 2022 at 06:12:33PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > After introducing acpi_dev_parent() in commit 62fcb99bdf10 ("ACPI: Drop > parent field from struct acpi_device"), it is better to use it instead > of accessing the dev.parent field in struct acpi_device directly. > > Modify acpi_node_get_parent() accordingly. Reviewed-by: Andy Shevchenko Thanks! > Suggested-by: Andy Shevchenko > Signed-off-by: Rafael J. Wysocki > --- > drivers/acpi/property.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > Index: linux-pm/drivers/acpi/property.c > =================================================================== > --- linux-pm.orig/drivers/acpi/property.c > +++ linux-pm/drivers/acpi/property.c > @@ -1269,10 +1269,11 @@ acpi_node_get_parent(const struct fwnode > return to_acpi_data_node(fwnode)->parent; > } > if (is_acpi_device_node(fwnode)) { > - struct device *dev = to_acpi_device_node(fwnode)->dev.parent; > + struct acpi_device *parent; > > - if (dev) > - return acpi_fwnode_handle(to_acpi_device(dev)); > + parent = acpi_dev_parent(to_acpi_device_node(fwnode)); > + if (parent) > + return acpi_fwnode_handle(parent); > } > > return NULL; > > > -- With Best Regards, Andy Shevchenko