linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Fabio Estevam
	<fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: [PATCH] i2c: i2c-mxs: Fix type of error code
Date: Tue, 8 Jan 2013 07:57:00 +0100	[thread overview]
Message-ID: <201301080757.00365.marex@denx.de> (raw)
In-Reply-To: <1357605126-26537-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Dear Fabio Estevam,

> From: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> 
> cmd_err is used to handle error code, so it should not be unsigned.
> 
> This fixes the following warning when building with W=1 option:
> 
> drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg':
> drivers/i2c/busses/i2c-mxs.c:331:19: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

Amazing catch

Acked-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>

Can this also go to -stable 3.7 ?

> ---
>  drivers/i2c/busses/i2c-mxs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
> index 1b1a936..621153a 100644
> --- a/drivers/i2c/busses/i2c-mxs.c
> +++ b/drivers/i2c/busses/i2c-mxs.c
> @@ -127,7 +127,7 @@ struct mxs_i2c_dev {
>  	struct device *dev;
>  	void __iomem *regs;
>  	struct completion cmd_complete;
> -	u32 cmd_err;
> +	int cmd_err;
>  	struct i2c_adapter adapter;
>  	const struct mxs_i2c_speed_config *speed;

Best regards,
Marek Vasut

  parent reply	other threads:[~2013-01-08  6:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08  0:32 [PATCH] i2c: i2c-mxs: Fix type of error code Fabio Estevam
     [not found] ` <1357605126-26537-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-08  6:57   ` Marek Vasut [this message]
2013-01-23  9:53   ` Wolfram Sang
     [not found]     ` <20130123095314.GA3767-8EAEigeeuNG034pCzgS/Qg7AFbiQbgqx@public.gmane.org>
2013-01-23 11:01       ` Marek Vasut
     [not found]         ` <201301231201.51675.marex-ynQEQJNshbs@public.gmane.org>
2013-01-23 11:10           ` Wolfram Sang
     [not found]             ` <20130123111039.GD16264-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-01-23 11:26               ` Marek Vasut

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=201301080757.00365.marex@denx.de \
    --to=marex-ynqeqjnshbs@public.gmane.org \
    --cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).