Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3240918pxb; Fri, 4 Feb 2022 04:38:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJJrAnMyC3pts1B2tR5Ygvh7hMekkOukd4kNERVwXwmDWsowssJtMrrACPFknhBrh4/BLk X-Received: by 2002:a17:906:9743:: with SMTP id o3mr2442954ejy.256.1643978334453; Fri, 04 Feb 2022 04:38:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643978334; cv=none; d=google.com; s=arc-20160816; b=mANDDTphMY3c2EH3BfyWi9zf11IhvC0s7yekLQNgv0MKOlN27gGOon/Pv7HoL1eehI xSR7frbxHTnNBQONlajT1mbXI4Q5Otf7HPig5BIAd+cd5xNSbXOaLIEaOVBsKA8bbqo0 af6/9eUGRZ3Q4nVnmP/QC2E6BMqNNvYt3tuivFmmjpmrZi+RkmiT1MFjb+OxJyF1IdwJ O9hmdtXt+IC7BWuidqhtJEXqVBl0uNdtE7zbFjvKJs04BHyPpJdYM7JCcHsN7SVWx53t UPKy2Yq9mtinucxGg9ViUAXhkdwI2daHcRSoYNz3Z96fMIEpFPBDAkRoSC5mFU/Snz0g ozEg== 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=wz74ecBRRy5osiptH6mAHo5InVXq8xkawwUnzut97j4=; b=wxeaIeArGU0lX+7E6XrJp922ZGg7/gt8GkhIj54r3qJCFWmmYqegzLGQcceUwW1Nkn U2+6n4WtR/992bCl8G2tisOMUm+tMn7SteWBCx72L6QBzJCZPezcgDrHvZAZqboM2tmP YxCDBYw7by5HCeKl/zPdwgDEhUpi9AKyvdDUsaSeeBtf78mOwpePjr9IFJbqZyN+1eHG pZNyJfmLUWi6o8cJd20fUvb5yq8QOlPLStzpAMV/yNLbE9Q8ikqVzyqUqYxXNTDzrrqA Sx6z64qd+aiHUdFjzq5X0qnyRSrOhWhw3VlotUA78SDEz0xxzqq8938qQz+oqFFpsFvy OuQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=h892aCti; 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 v9si1184087edx.205.2022.02.04.04.38.26; Fri, 04 Feb 2022 04:38:54 -0800 (PST) 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=@lunn.ch header.s=20171124 header.b=h892aCti; 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 S242415AbiBAT1e (ORCPT + 99 others); Tue, 1 Feb 2022 14:27:34 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:37850 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242278AbiBAT1d (ORCPT ); Tue, 1 Feb 2022 14:27:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=wz74ecBRRy5osiptH6mAHo5InVXq8xkawwUnzut97j4=; b=h892aCtiyDGLi3SODvyrRwY9yS E+hNgBBdBFQs19EYya29T5I+/kReGFQhXiXfXi8MM94CBLfzjq+qteCzC5X0WUKApFy5a4d6pwxXh EufxTcUUHNRFE/jT64WlV5CXWM4RRiEd/TMTpsQEs3I+z0JbfxAoeXyAjC8zZWchYvY8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nEyoE-003qai-HN; Tue, 01 Feb 2022 20:27:22 +0100 Date: Tue, 1 Feb 2022 20:27:22 +0100 From: Andrew Lunn To: "Rafael J. Wysocki" Cc: Sunil Goutham , Iyappan Subramanian , "David S. Miller" , Jakub Kicinski , Keyur Chudgar , Quan Nguyen , Heiner Kallweit , netdev@vger.kernel.org, LKML , Linux ACPI Subject: Re: [PATCH] drivers: net: Replace acpi_bus_get_device() Message-ID: References: <3151721.aeNJFYEL58@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3151721.aeNJFYEL58@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 01, 2022 at 08:07:08PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Replace acpi_bus_get_device() that is going to be dropped with > acpi_fetch_acpi_dev(). > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 4 ++-- > drivers/net/fjes/fjes_main.c | 10 +++------- > drivers/net/mdio/mdio-xgene.c | 8 +++----- > 3 files changed, 8 insertions(+), 14 deletions(-) > > Index: linux-pm/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > =================================================================== > --- linux-pm.orig/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > +++ linux-pm/drivers/net/ethernet/cavium/thunder/thunder_bgx.c > @@ -1407,9 +1407,9 @@ static acpi_status bgx_acpi_register_phy > { > struct bgx *bgx = context; > struct device *dev = &bgx->pdev->dev; > - struct acpi_device *adev; > + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); Hi Rafael Since this is part of the networking subsystem, reverse christmas tree applies. Yes, this driver gets is wrong here, but we should not make it even worse. Please put this variable first. > Index: linux-pm/drivers/net/mdio/mdio-xgene.c > =================================================================== > --- linux-pm.orig/drivers/net/mdio/mdio-xgene.c > +++ linux-pm/drivers/net/mdio/mdio-xgene.c > @@ -280,15 +280,13 @@ static acpi_status acpi_register_phy(acp > void *context, void **ret) > { > struct mii_bus *mdio = context; > - struct acpi_device *adev; > + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); Here as well please. With those changes, you can add my Reviewed-by: Thanks Andrew