Skip to contentSkip to conversation

i2c: i2c-mxs: Fix type of error code

PATCH Applied Fabio Estevam 3 participants 6 messages Jan 8, 2013 – Jan 23, 2013 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: i2c-mxs: Fix type of error code

From: Fabio Estevam <[email protected]>

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]

---
 drivers/i2c/busses/i2c-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mxs.c +1 -1
index 1b1a936..621153a 100644
@@ -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;
 
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1357605126-26537-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Acked-by
#2 lore raw

Dear Fabio Estevam,

Quoted 11 lines

From: Fabio Estevam <[email protected]>

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]

Amazing catch

Can this also go to -stable 3.7 ?

Quoted 9 lines
---
 drivers/i2c/busses/i2c-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mxs.c +0 -0
index 1b1a936..621153a 100644

drivers/i2c/busses/i2c-mxs.c struct mxs_i2c_dev { · line 132

Quoted 7 lines
drivers/i2c/busses/i2c-mxs.c +1 -1
@@ -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

Applied
#3 lore raw
In reply to a message not in the archive
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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]

Thanks! Applied to current and added stable.

A message that is not in the archive (sent off-list or not yet received): 20130123095314.GA3767-8EAEigeeuNG034pCzgS/[email protected]

#5 lore raw

Dear Wolfram Sang,

Quoted 7 lines · Fabio Estevam
Quoted 6 lines

From: Fabio Estevam <[email protected]>

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:

Quoted 7 lines
Quoted 5 lines

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]

Thanks! Applied to current and added stable.

I dont wanna be nagging, but you polling the linux-i2c stuff every 3 months or so doesn't make the development all that smooth. Btw. there are other patches (like the speed patch, like the pio/dma patch) which still keep hanging. I'd like to see them in 3.8, since they were submitted nearly three months ago.

I even bumped you about them every so often. Can you go through your mailbox please?

Best regards,
Marek Vasut

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 3 lines

I dont wanna be nagging, but you polling the linux-i2c stuff every 3 months or so doesn't make the development all that smooth.

I surely know that, but I can't help it at the moment. I have reasonable hopes that things will improve in a few weeks.

Quoted 2 lines

(like the speed patch, like the pio/dma patch) which still keep hanging. I'd like to see them in 3.8, since they were submitted nearly three months ago.

As I said, -next branch probably this weekend. I am already at it.

Quoted 2 lines

I even bumped you about them every so often. Can you go through your mailbox please?

I get all the mails, I don't necessarily answer them (costs time) if I only can say "no time currently". If you want to help improving the situation, feel free to review patches.

Regards,

Wolfram

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Dear Wolfram Sang,

Quoted 5 lines
Quoted 2 lines

I dont wanna be nagging, but you polling the linux-i2c stuff every 3 months or so doesn't make the development all that smooth.

I surely know that, but I can't help it at the moment. I have reasonable hopes that things will improve in a few weeks.

Good.

Quoted 5 lines
Quoted 3 lines

(like the speed patch, like the pio/dma patch) which still keep hanging. I'd like to see them in 3.8, since they were submitted nearly three months ago.

As I said, -next branch probably this weekend. I am already at it.

Thanks

Quoted 6 lines
Quoted 2 lines

I even bumped you about them every so often. Can you go through your mailbox please?

I get all the mails, I don't necessarily answer them (costs time) if I only can say "no time currently". If you want to help improving the situation, feel free to review patches.

Certainly, give me two weeks (until 6th), I'll be out of the gutter by then.

Best regards,
Marek Vasut