* [KJ] [PATCH] Fix gcc4 error incomplete array element type
@ 2005-05-20 4:50 Jesse Millan
2005-05-20 5:09 ` Greg KH
2005-05-20 5:10 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Jesse Millan @ 2005-05-20 4:50 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
This patch is in regards to fixing the gcc 4 warnings. It actually fixes
a gcc 4 error by changing
struct i2c_msg msg[]
to
struct i2c_msg *msg
which is what gcc4 wants to see from now on.
F.Y.I I applied the kj patch, and this error has not been fixed as of
yet. However, I found that this was changed in Andrew Morton mm4 patch.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1036 bytes --]
Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
--- linux-2.6.11.10/include/linux/i2c.h.orig 2005-05-19 21:14:35.566833035 -0700
+++ linux-2.6.11.10/include/linux/i2c.h 2005-05-19 21:15:28.920114967 -0700
@@ -55,7 +55,7 @@ extern int i2c_master_recv(struct i2c_cl
/* Transfer num messages.
*/
-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
+extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,int num);
/*
* Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
@@ -194,7 +194,7 @@ struct i2c_algorithm {
to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated
using common I2C messages */
- int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
+ int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
int num);
int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH] Fix gcc4 error incomplete array element type
2005-05-20 4:50 [KJ] [PATCH] Fix gcc4 error incomplete array element type Jesse Millan
@ 2005-05-20 5:09 ` Greg KH
2005-05-20 5:10 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2005-05-20 5:09 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Thu, May 19, 2005 at 09:50:12PM -0700, Jesse Millan wrote:
> This patch is in regards to fixing the gcc 4 warnings. It actually fixes
> a gcc 4 error by changing
>
> struct i2c_msg msg[]
>
> to
>
> struct i2c_msg *msg
>
> which is what gcc4 wants to see from now on.
>
> F.Y.I I applied the kj patch, and this error has not been fixed as of
> yet. However, I found that this was changed in Andrew Morton mm4 patch.
This is already fixed in the 2.6.12-rc4 kernel, correct?
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH] Fix gcc4 error incomplete array element type
2005-05-20 4:50 [KJ] [PATCH] Fix gcc4 error incomplete array element type Jesse Millan
2005-05-20 5:09 ` Greg KH
@ 2005-05-20 5:10 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2005-05-20 5:10 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
On Thu, May 19, 2005 at 09:50:12PM -0700, Jesse Millan wrote:
> --- linux-2.6.11.10/include/linux/i2c.h.orig 2005-05-19 21:14:35.566833035 -0700
> +++ linux-2.6.11.10/include/linux/i2c.h 2005-05-19 21:15:28.920114967 -0700
> @@ -55,7 +55,7 @@ extern int i2c_master_recv(struct i2c_cl
>
> /* Transfer num messages.
> */
> -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
> +extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,int num);
Oh, and in the future, if you change a header file, you better change
where the function is defined, otherwise you get a compiler error.
> * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
> @@ -194,7 +194,7 @@ struct i2c_algorithm {
> to NULL. If an adapter algorithm can do SMBus access, set
> smbus_xfer. If set to NULL, the SMBus protocol is simulated
> using common I2C messages */
> - int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
> + int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
> int num);
You would have gotten compiler warnings for not fixing up all of the i2c
drivers that provide a master_xfer() function pointer, right?
See the 2.6.12-rc4 kernel for the real full fix for this.
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-20 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20 4:50 [KJ] [PATCH] Fix gcc4 error incomplete array element type Jesse Millan
2005-05-20 5:09 ` Greg KH
2005-05-20 5:10 ` Greg KH
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).