Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2385347pxb; Mon, 20 Sep 2021 20:59:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxSIJRYNOC7A9dP2C+VMaFQ7HBRT7v1Vfnn0dhMKXwtc/gYXMYv9Usvx1kw29/we1vSB4a X-Received: by 2002:a6b:fe05:: with SMTP id x5mr15480114ioh.26.1632196749669; Mon, 20 Sep 2021 20:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632196749; cv=none; d=google.com; s=arc-20160816; b=zy7eHkXSsdBteVUtlnN/J2CW3tWWimyXi7zuo0VH162hCINNCmINJy7FUj4CDhHYiM 1ne6w6nF/VG195aAaTcr49bNMSXR61COqoUxQlRBjTBGYJsnjI92FuLHVL1EZVT9f8eb wpmvpFFxXMq0WyNf/jm/+ODgEUMX5yOlav5oGWb5Hs7Om7i/dADhSWt0o/KaQeJImnp/ Ntnx+9n9SU24vu0RmwcmYuH8e6u95KcBOssSec91DipcEclePuSVQB7GleAP7MxkeLwG w8pMAJCuAX9HRw9t9hipqjXOMxVb7I667GPZiKtf8shXQE0gnkkqzdQf8QFlJ1IV9jO8 O+2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kY/4eMbED4CLtz6FkJE/bYjN2trJmqcJcBgHfiCqU6o=; b=aTRnx5bWLB5dHr1s1qvwAUvlwEn85wxBmhz3U7FU5+aKpZxkEFiQGT3DsqSwyZbwOv xkYA106F2lMcCldORrt5ahz64OstE5LtPAH4K+9VWWa/vnu6w7irXZ0svdoOWRV1gaE7 EeWHWawAlAV6GQshRMXvj6RHjg68hooosVSrwDUyP3ul/gs7RCKZUymfRnXq00gEkIov QL5BiWTPMrdf9vpR6W8He5T8iGhkr4dSVkI55KWOjAgm/zBBOgPufxBNcZ1sd/T2oPSV Z1GEwcexEy+3qGc2i/ugF7hlGSHPXnxlfh9mySjmWDkyJOAc+a59l17/LhDaloUeACue u4WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bOO4yQ0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c184si15710941iof.111.2021.09.20.20.58.51; Mon, 20 Sep 2021 20:59:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bOO4yQ0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbhIUCGj (ORCPT + 99 others); Mon, 20 Sep 2021 22:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236343AbhIUBuH (ORCPT ); Mon, 20 Sep 2021 21:50:07 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B435C06AB1D; Mon, 20 Sep 2021 14:56:47 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id g184so18742098pgc.6; Mon, 20 Sep 2021 14:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kY/4eMbED4CLtz6FkJE/bYjN2trJmqcJcBgHfiCqU6o=; b=bOO4yQ0nZzQgEuX1DLTzV9WniMTMSauFJDXNpUhKe7qX4Qy9rVoUV8W4RWWhgPbNQI +7dZyowGszGTR8YabQ5aWV2weDZb5+RK6oHgmO3u9A2Gwz36c8F5KvSR4GZHvUuo2FwC qaj2s+ZV4Q412NuIFPsvVHjAv3+IMnXR1ZbjHHuBHFKbqsTXLwUWrwHdIeLBaLCiRLSV 5O9cdT4FPGre+whF+uMGz/HBSFfM1PtIpFHXP7ComNKLO07Rl+IJA3UTkAywtg82N1sJ LIUTbcxD7KR84EOI+z/HJm5zb8qYQ9ZWFvmCsnur2LNBYcKznrBCbOx7ZUo6IzYg2P2O Tqag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kY/4eMbED4CLtz6FkJE/bYjN2trJmqcJcBgHfiCqU6o=; b=vtSdXte1db8SJdv1l8ZiLdklqhh43OdKdB0dZlyeW4QRAjGKlAST2gzcSYC6DKamps /UIDanZ8RGv7X0M8HvXD1OJkz1n+wr+xUdR7pIqbA7YsP1MwBY2qxG754OS4QdN3ZnLz uXeasgPMZCcHTDRdJbdel1hVr6HioJ9g7fxUaXwU+mVBAFNs9Y0eruJH2g3BI3qd7IiT glv+dHZQ8zJQGOU6sDfL4Ug3BKa/K1jI6gobsKw+wvTQ0bvJP9yjoVc3KqsJk3+cC9dS 78k3xHvr4Ghn8oTDTtrWKuUKR6OxKbsXgQxnJ/Y8lIHNat8m8j44ODzvR3lIQxJqz8GL JV4g== X-Gm-Message-State: AOAM530fluLxg8v5LDNDgINHxlenf+2Q81ufEmwcOdX+NJesEuF7JIEV iSY1rrrEdms+I3w54N3CiFY= X-Received: by 2002:a63:35cc:: with SMTP id c195mr25143261pga.373.1632175006686; Mon, 20 Sep 2021 14:56:46 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id i12sm356346pjv.19.2021.09.20.14.56.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Sep 2021 14:56:45 -0700 (PDT) Subject: Re: [PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> <20210920090522.23784-8-wsa+renesas@sang-engineering.com> From: Florian Fainelli Message-ID: <6a8ffcab-4534-1692-5f6a-8a7906d07a09@gmail.com> Date: Mon, 20 Sep 2021 14:56:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210920090522.23784-8-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/20/21 2:05 AM, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang > --- > > Build tested only. buildbot is happy. > > drivers/net/mdio/mdio-bcm-iproc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c > index 77fc970cdfde..5666cfab15b9 100644 > --- a/drivers/net/mdio/mdio-bcm-iproc.c > +++ b/drivers/net/mdio/mdio-bcm-iproc.c > @@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev) > #ifdef CONFIG_PM_SLEEP > static int iproc_mdio_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct iproc_mdio_priv *priv = platform_get_drvdata(pdev); > + struct iproc_mdio_priv *priv = dev_get_drvdata(dev); The change looks good to me, however if you change from platform_get_drvdata() to dev_get_drvdata(), you might also want to change from using platform_set_drvdata() to dev_set_drvdata() for symmetry no? If not, then maybe this patch should be dropped? -- Florian