All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Fuqian Huang <huangfq.daxian@gmail.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
	Tony Lindgren <tony@atomide.com>,
	Richard Fontana <rfontana@redhat.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Lee Jones <lee.jones@linaro.org>, Rob Herring <robh@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Anson Huang <anson.huang@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Luca Weiss <luca@z3ntu.xyz>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-input <linux-input@vger.kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Brian Masney <masneyb@onstation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Sylvain Lemieux <slemieux.tyco@gmail.com>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Alexios Zavras <alexios.zavras@intel.com>,
	linux-tegra@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 2/4] input: keyboard/mouse/touchscreen/misc: Use dev_get_drvdata()
Date: Tue, 2 Jul 2019 14:32:25 +0200	[thread overview]
Message-ID: <20190702143225.12b0fe07@karo-electronics.de> (raw)
In-Reply-To: <CABXRUiQ77feNzEdQ7GqNxLS9YAMybVG3eAWWSDPFdGvERaxCyg@mail.gmail.com>

Hi,

On Tue, 2 Jul 2019 19:47:16 +0800 Fuqian Huang wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> 於 2019年7月2日週二 下午5:51寫道:
> >
> > On Tue, Jul 2, 2019 at 11:20 AM Fuqian Huang <huangfq.daxian@gmail.com> wrote:  
> > >
> > > I am not an expert on this. I just write a coccinelle script to search
> > > this kind of misuse and fix it in a naive way.
> > > Could you tell me about how to use the proper bus accessors? Then I
> > > will fix it up and resend a v2 patch set.  
> >
> > First, don't top post.
> > And answering to this, simple drop the patch.
> > Proper bus accessors is exactly what it's used in the current code.  
> 
> But why not use dev_get_drvdata directly.
> It simplifies getting the 'driver_data' from 'struct device' directly.
> And the platform_device here is not required.
> Replace it can remove the unnecessary step back and forth. (dev -> pdev -> dev).
> 
Did you check whether the compiler generates different (better) code
with and without your patch? My guess is it won't.


Lothar Waßmann

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Fuqian Huang <huangfq.daxian@gmail.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
	Tony Lindgren <tony@atomide.com>,
	Richard Fontana <rfontana@redhat.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Lee Jones <lee.jones@linaro.org>, Rob Herring <robh@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Anson Huang <anson.huang@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Luca Weiss <luca@z3ntu.xyz>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-input <linux-input@vger.kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Brian Masney <masneyb@onstation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Sylvain Lemieux <slemieux.tyco@gmail.com>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Alexios Zavras <alexios.zavras@intel.com>,
	linux-tegra@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Allison Randal <allison@lohutok.net>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Enrico Weigelt <info@metux.net>,
	Pascal PAILLET-LME <p.paillet@st.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Olof Johansson <olof@lixom.net>,
	Christian Hoff <christian_hoff@gmx.net>,
	Shawn Guo <shawnguo@kernel.org>,
	Gabriel Fernandez <gabriel.fernandez@st.com>
Subject: Re: [PATCH 2/4] input: keyboard/mouse/touchscreen/misc: Use dev_get_drvdata()
Date: Tue, 2 Jul 2019 14:32:25 +0200	[thread overview]
Message-ID: <20190702143225.12b0fe07@karo-electronics.de> (raw)
In-Reply-To: <CABXRUiQ77feNzEdQ7GqNxLS9YAMybVG3eAWWSDPFdGvERaxCyg@mail.gmail.com>

Hi,

On Tue, 2 Jul 2019 19:47:16 +0800 Fuqian Huang wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> 於 2019年7月2日週二 下午5:51寫道:
> >
> > On Tue, Jul 2, 2019 at 11:20 AM Fuqian Huang <huangfq.daxian@gmail.com> wrote:  
> > >
> > > I am not an expert on this. I just write a coccinelle script to search
> > > this kind of misuse and fix it in a naive way.
> > > Could you tell me about how to use the proper bus accessors? Then I
> > > will fix it up and resend a v2 patch set.  
> >
> > First, don't top post.
> > And answering to this, simple drop the patch.
> > Proper bus accessors is exactly what it's used in the current code.  
> 
> But why not use dev_get_drvdata directly.
> It simplifies getting the 'driver_data' from 'struct device' directly.
> And the platform_device here is not required.
> Replace it can remove the unnecessary step back and forth. (dev -> pdev -> dev).
> 
Did you check whether the compiler generates different (better) code
with and without your patch? My guess is it won't.


Lothar Waßmann

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Fuqian Huang <huangfq.daxian@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Tony Lindgren <tony@atomide.com>,
	Richard Fontana <rfontana@redhat.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Fabio Estevam <festevam@gmail.com>, Rob Herring <robh@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Anson Huang <anson.huang@nxp.com>,
	Lee Jones <lee.jones@linaro.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Luca Weiss <luca@z3ntu.xyz>, NXP Linux Team <linux-imx@nxp.com>,
	Sylvain Lemieux <slemieux.tyco@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Brian Masney <masneyb@onstation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-input <linux-input@vger.kernel.org>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Alexios Zavras <alexios.zavras@intel.com>,
	linux-tegra@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Allison Randal <allison@lohutok.net>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Pascal PAILLET-LME <p.paillet@st.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Olof Johansson <olof@lixom.net>,
	Christian Hoff <christian_hoff@gmx.net>,
	Enrico Weigelt <info@metux.net>,
	Gabriel Fernandez <gabriel.fernandez@st.com>
Subject: Re: [PATCH 2/4] input: keyboard/mouse/touchscreen/misc: Use dev_get_drvdata()
Date: Tue, 2 Jul 2019 14:32:25 +0200	[thread overview]
Message-ID: <20190702143225.12b0fe07@karo-electronics.de> (raw)
In-Reply-To: <CABXRUiQ77feNzEdQ7GqNxLS9YAMybVG3eAWWSDPFdGvERaxCyg@mail.gmail.com>

Hi,

On Tue, 2 Jul 2019 19:47:16 +0800 Fuqian Huang wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> 於 2019年7月2日週二 下午5:51寫道:
> >
> > On Tue, Jul 2, 2019 at 11:20 AM Fuqian Huang <huangfq.daxian@gmail.com> wrote:  
> > >
> > > I am not an expert on this. I just write a coccinelle script to search
> > > this kind of misuse and fix it in a naive way.
> > > Could you tell me about how to use the proper bus accessors? Then I
> > > will fix it up and resend a v2 patch set.  
> >
> > First, don't top post.
> > And answering to this, simple drop the patch.
> > Proper bus accessors is exactly what it's used in the current code.  
> 
> But why not use dev_get_drvdata directly.
> It simplifies getting the 'driver_data' from 'struct device' directly.
> And the platform_device here is not required.
> Replace it can remove the unnecessary step back and forth. (dev -> pdev -> dev).
> 
Did you check whether the compiler generates different (better) code
with and without your patch? My guess is it won't.


Lothar Waßmann

  reply	other threads:[~2019-07-02 12:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  3:23 [PATCH 2/4] input: keyboard/mouse/touchscreen/misc: Use dev_get_drvdata() Fuqian Huang
2019-07-01  3:23 ` Fuqian Huang
2019-07-01  3:23 ` Fuqian Huang
2019-07-01  7:52 ` Dmitry Torokhov
2019-07-01  7:52   ` Dmitry Torokhov
2019-07-01  7:52   ` Dmitry Torokhov
2019-07-02  8:18   ` Fuqian Huang
2019-07-02  8:18     ` Fuqian Huang
2019-07-02  8:18     ` Fuqian Huang
2019-07-02  9:51     ` Andy Shevchenko
2019-07-02  9:51       ` Andy Shevchenko
2019-07-02  9:51       ` Andy Shevchenko
2019-07-02 11:47       ` Fuqian Huang
2019-07-02 11:47         ` Fuqian Huang
2019-07-02 11:47         ` Fuqian Huang
2019-07-02 12:32         ` Lothar Waßmann [this message]
2019-07-02 12:32           ` Lothar Waßmann
2019-07-02 12:32           ` Lothar Waßmann
2019-07-03  6:17           ` Lee Jones
2019-07-03  6:17             ` Lee Jones
2019-07-03  6:17             ` Lee Jones
2019-07-02 12:34         ` Andy Shevchenko
2019-07-02 12:34           ` Andy Shevchenko
2019-07-02 12:34           ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702143225.12b0fe07@karo-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=alexios.zavras@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=anson.huang@nxp.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@oracle.com \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=huangfq.daxian@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luca@z3ntu.xyz \
    --cc=masneyb@onstation.org \
    --cc=rfontana@redhat.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=slemieux.tyco@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.