LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [-mm] new warning in ipc/msg.c
@ 2008-01-09 15:42 Pierre Peiffer
  2008-01-09 23:13 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Peiffer @ 2008-01-09 15:42 UTC (permalink / raw)
  To: ricknu-0; +Cc: Derbey Nadia, Andrew Morton, LKML

Hi,

This very small patch:
    ipc-convert-handmade-min-to-min.patch
introduces a new warning when compiling the -mm kernel:

.../linux-2.6.24-rc6-mm1/ipc/msg.c: In function `do_msgrcv':
.../linux-2.6.24-rc6-mm1/ipc/msg.c:939: warning: comparison of distinct pointer
types lacks a cast

I don't know if doing in include/linux/msg.h

struct msg_msg {
	struct list_head m_list;
	long  m_type;
-	int m_ts;           /* message text size */
+	size_t m_ts;           /* message text size */
	struct msg_msgseg* next;
	void *security;
	/* the actual message follows immediately */
};

is acceptable ?

Otherwise, either a cast can be added or this patch can be dropped...

Thanks,

-- 
Pierre Peiffer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [-mm] new warning in ipc/msg.c
  2008-01-09 15:42 [-mm] new warning in ipc/msg.c Pierre Peiffer
@ 2008-01-09 23:13 ` Andrew Morton
  2008-01-10  8:30   ` Pierre Peiffer
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-01-09 23:13 UTC (permalink / raw)
  To: Pierre Peiffer; +Cc: ricknu-0, nadia.derbey, linux-kernel

On Wed, 09 Jan 2008 16:42:34 +0100
Pierre Peiffer <pierre.peiffer@bull.net> wrote:

> Hi,
> 
> This very small patch:
>     ipc-convert-handmade-min-to-min.patch
> introduces a new warning when compiling the -mm kernel:
> 
> .../linux-2.6.24-rc6-mm1/ipc/msg.c: In function `do_msgrcv':
> .../linux-2.6.24-rc6-mm1/ipc/msg.c:939: warning: comparison of distinct pointer
> types lacks a cast
> 
> I don't know if doing in include/linux/msg.h
> 
> struct msg_msg {
> 	struct list_head m_list;
> 	long  m_type;
> -	int m_ts;           /* message text size */
> +	size_t m_ts;           /* message text size */
> 	struct msg_msgseg* next;
> 	void *security;
> 	/* the actual message follows immediately */
> };
> 
> is acceptable ?
> 
> Otherwise, either a cast can be added or this patch can be dropped...
> 

Thanks.  I think I'll drop the original patch.  The mix of ints, size_t's,
etc in that code is pretty random and would be best addressed by somene
sitting down and working out from scratch what types we _should_ be using
in there and then making all the code use the right types in an organised
fashion.

Doing this in a piecemeal through-a-pinhole fashion won't work very well
and is a bit risky.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [-mm] new warning in ipc/msg.c
  2008-01-09 23:13 ` Andrew Morton
@ 2008-01-10  8:30   ` Pierre Peiffer
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Peiffer @ 2008-01-10  8:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ricknu-0, nadia.derbey, linux-kernel

Andrew Morton wrote:

> Doing this in a piecemeal through-a-pinhole fashion won't work very well
> and is a bit risky.

Yes, agree, that's also my feeling.

-- 
Pierre Peiffer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-10  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-09 15:42 [-mm] new warning in ipc/msg.c Pierre Peiffer
2008-01-09 23:13 ` Andrew Morton
2008-01-10  8:30   ` Pierre Peiffer

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).