All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: York Sun <yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Peter Korsgaard
	<peter.korsgaard-ob4gmnvZ1/cAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg
Date: Sat, 15 Aug 2015 22:23:05 +0200	[thread overview]
Message-ID: <20150815202302.GB3463@katana> (raw)
In-Reply-To: <1434475692-4611-1-git-send-email-yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

On Tue, Jun 16, 2015 at 10:28:12AM -0700, York Sun wrote:
> Based on i2c-mux-gpio driver, similarly the register based mux
> switch from one bus to another by setting a single register.
> The register can be on PCIe bus, local bus, or any memory-mapped
> address.
> 
> Signed-off-by: York Sun <yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> CC: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> CC: Peter Korsgaard <peter.korsgaard-ob4gmnvZ1/cAvxtiuMwx3w@public.gmane.org>

Mostly good.

> +static int i2c_mux_reg_probe(struct platform_device *pdev)
> +{
> +	struct regmux *mux;
> +	struct i2c_adapter *parent;
> +	struct resource *res;
> +	int (*deselect)(struct i2c_adapter *, void *, u32);
> +	unsigned int initial_state, class;

gcc says:

drivers/i2c/muxes/i2c-mux-reg.c:182:15: warning: variable 'initial_state' set but not used [-Wunused-but-set-variable]

It seens you prepared for setting the initial state but don't do the
actual set?

> +static struct platform_driver i2c_mux_reg_driver = {
> +	.probe	= i2c_mux_reg_probe,
> +	.remove	= i2c_mux_reg_remove,
> +	.driver	= {
> +		.owner	= THIS_MODULE,

coccicheck says:

drivers/i2c/muxes/i2c-mux-reg.c:288:3-8: No need to set .owner here. The core will do it.

> +		.name	= "i2c-mux-reg",
> +	},
> +};

Thanks,

   Wolfram

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: York Sun <yorksun@freescale.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	Peter Korsgaard <peter.korsgaard@barco.com>
Subject: Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg
Date: Sat, 15 Aug 2015 22:23:05 +0200	[thread overview]
Message-ID: <20150815202302.GB3463@katana> (raw)
In-Reply-To: <1434475692-4611-1-git-send-email-yorksun@freescale.com>

On Tue, Jun 16, 2015 at 10:28:12AM -0700, York Sun wrote:
> Based on i2c-mux-gpio driver, similarly the register based mux
> switch from one bus to another by setting a single register.
> The register can be on PCIe bus, local bus, or any memory-mapped
> address.
> 
> Signed-off-by: York Sun <yorksun@freescale.com>
> CC: Wolfram Sang <wsa@the-dreams.de>
> CC: Peter Korsgaard <peter.korsgaard@barco.com>

Mostly good.

> +static int i2c_mux_reg_probe(struct platform_device *pdev)
> +{
> +	struct regmux *mux;
> +	struct i2c_adapter *parent;
> +	struct resource *res;
> +	int (*deselect)(struct i2c_adapter *, void *, u32);
> +	unsigned int initial_state, class;

gcc says:

drivers/i2c/muxes/i2c-mux-reg.c:182:15: warning: variable 'initial_state' set but not used [-Wunused-but-set-variable]

It seens you prepared for setting the initial state but don't do the
actual set?

> +static struct platform_driver i2c_mux_reg_driver = {
> +	.probe	= i2c_mux_reg_probe,
> +	.remove	= i2c_mux_reg_remove,
> +	.driver	= {
> +		.owner	= THIS_MODULE,

coccicheck says:

drivers/i2c/muxes/i2c-mux-reg.c:288:3-8: No need to set .owner here. The core will do it.

> +		.name	= "i2c-mux-reg",
> +	},
> +};

Thanks,

   Wolfram


  parent reply	other threads:[~2015-08-15 20:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 17:28 [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg York Sun
2015-06-16 17:28 ` York Sun
     [not found] ` <1434475692-4611-1-git-send-email-yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-06-17  8:54   ` Paul Bolle
2015-06-17  8:54     ` Paul Bolle
2015-06-17 15:00     ` Alexander Sverdlin
2015-06-17 15:00       ` Alexander Sverdlin
     [not found]       ` <55818BAB.5090605-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-06-17 16:03         ` Paul Bolle
2015-06-17 16:03           ` Paul Bolle
2015-06-18  7:40           ` Alexander Sverdlin
2015-06-18  7:40             ` Alexander Sverdlin
     [not found]             ` <558275F1.5020100-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-06-18  8:08               ` Paul Bolle
2015-06-18  8:08                 ` Paul Bolle
2015-06-18  9:04                 ` Alexander Sverdlin
2015-06-18  9:04                   ` Alexander Sverdlin
     [not found]                   ` <5582899B.9030307-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-06-18  9:32                     ` Paul Bolle
2015-06-18  9:32                       ` Paul Bolle
2015-06-18  9:42                       ` Alexander Sverdlin
2015-06-18  9:42                         ` Alexander Sverdlin
2015-06-18  9:55                         ` Paul Bolle
2015-06-17 15:03   ` Alexander Sverdlin
2015-06-17 15:03     ` Alexander Sverdlin
     [not found]     ` <55818C3C.8000704-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2015-06-17 16:43       ` York Sun
2015-06-17 16:43         ` York Sun
     [not found]         ` <5581A3CA.4050805-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-06-18  7:58           ` Alexander Sverdlin
2015-06-18  7:58             ` Alexander Sverdlin
2015-08-15 20:23   ` Wolfram Sang [this message]
2015-08-15 20:23     ` Wolfram Sang
2015-08-17 16:37     ` York Sun
2015-08-17 16:37       ` York Sun
     [not found]       ` <55D20DC9.2060304-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-08-18 16:44         ` Wolfram Sang
2015-08-18 16:44           ` Wolfram Sang

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=20150815202302.GB3463@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=peter.korsgaard-ob4gmnvZ1/cAvxtiuMwx3w@public.gmane.org \
    --cc=yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    /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.