linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] procfs: Fix sparse warnings
  2005-02-15 12:55 [PATCH] procfs: Fix sparse warnings Alexey Dobriyan
@ 2005-02-15 11:59 ` Al Viro
  2005-02-15 13:12   ` Alexey Dobriyan
  0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2005-02-15 11:59 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Andrew Morton, linux-kernel

On Tue, Feb 15, 2005 at 02:55:55PM +0200, Alexey Dobriyan wrote:

[snip]

Let's hold this kind of stuff until 2.6.11, OK?

	Al, sitting on more than a megabyte of such patches...

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

* [PATCH] procfs: Fix sparse warnings
@ 2005-02-15 12:55 Alexey Dobriyan
  2005-02-15 11:59 ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Dobriyan @ 2005-02-15 12:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>

Index: linux-warnings/fs/proc/base.c
===================================================================
--- linux-warnings/fs/proc/base.c	(revision 25)
+++ linux-warnings/fs/proc/base.c	(revision 29)
@@ -689,7 +689,7 @@
 	.open		= mem_open,
 };
 
-static ssize_t oom_adjust_read(struct file *file, char *buf,
+static ssize_t oom_adjust_read(struct file *file, char __user *buf,
 				size_t count, loff_t *ppos)
 {
 	struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -709,7 +709,7 @@
 	return count;
 }
 
-static ssize_t oom_adjust_write(struct file *file, const char *buf,
+static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
 				size_t count, loff_t *ppos)
 {
 	struct task_struct *task = proc_task(file->f_dentry->d_inode);
@@ -735,8 +735,8 @@
 }
 
 static struct file_operations proc_oom_adjust_operations = {
-	read:		oom_adjust_read,
-	write:		oom_adjust_write,
+	.read		= oom_adjust_read,
+	.write		= oom_adjust_write,
 };
 
 static struct inode_operations proc_mem_inode_operations = {

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

* Re: [PATCH] procfs: Fix sparse warnings
  2005-02-15 11:59 ` Al Viro
@ 2005-02-15 13:12   ` Alexey Dobriyan
  2005-02-15 19:26     ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Dobriyan @ 2005-02-15 13:12 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-kernel

On Tuesday 15 February 2005 13:59, Al Viro wrote:
> On Tue, Feb 15, 2005 at 02:55:55PM +0200, Alexey Dobriyan wrote:
> 
> Let's hold this kind of stuff until 2.6.11, OK?
> 
> 	Al, sitting on more than a megabyte of such patches...

Could you send diffstat or something? I did "make allyesconfig" with
-Wbitwise and digging slowly from the beginning. Now at fs/qnx4.

	Alexey

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

* Re: [PATCH] procfs: Fix sparse warnings
  2005-02-15 13:12   ` Alexey Dobriyan
@ 2005-02-15 19:26     ` Al Viro
  2005-02-16  8:35       ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2005-02-15 19:26 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-kernel

On Tue, Feb 15, 2005 at 03:12:37PM +0200, Alexey Dobriyan wrote:
> On Tuesday 15 February 2005 13:59, Al Viro wrote:
> > On Tue, Feb 15, 2005 at 02:55:55PM +0200, Alexey Dobriyan wrote:
> > 
> > Let's hold this kind of stuff until 2.6.11, OK?
> > 
> > 	Al, sitting on more than a megabyte of such patches...
> 
> Could you send diffstat or something? I did "make allyesconfig" with
> -Wbitwise and digging slowly from the beginning. Now at fs/qnx4.

Umm...  Let's do it that way: I'll get carving the sucker up to relatively
sane point and post it again (-bird, that is).  Give me until tomorrow
morning and then feel free to send stuff my way - I'll merge it and feed
upstream when 2.6.11 opens (credited, obviously).

Keep in mind that for endianness patches you *really* need to check on
at least some big-endian targets and both on 32 and 64bit ones.  I've
got a decent cross-build environment (tracking 14 targets now); if you need 
help with setting up something similar, I can help.

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

* Re: [PATCH] procfs: Fix sparse warnings
  2005-02-15 19:26     ` Al Viro
@ 2005-02-16  8:35       ` Al Viro
  2005-02-16 10:28         ` "__be32 s_addr" ? (was Re: [PATCH] procfs: Fix sparse warnings) Alexey Dobriyan
  0 siblings, 1 reply; 6+ messages in thread
From: Al Viro @ 2005-02-16  8:35 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: linux-kernel

On Tue, Feb 15, 2005 at 07:26:18PM +0000, Al Viro wrote:
> Umm...  Let's do it that way: I'll get carving the sucker up to relatively
> sane point and post it again (-bird, that is).  Give me until tomorrow
> morning and then feel free to send stuff my way - I'll merge it and feed
> upstream when 2.6.11 opens (credited, obviously).

Gaack...  My apologies - I've seriously underestimated the amount of RL
crap, so no, it won't be ready today.  I'll try to do that ASAP, but I can't
make a good estimate of how much I'll be able to do during the next week.
Crap...

OK, let's do it that way - send the stuff my way, I'll port it if needed
and if there are duplicates, your patches win.  FWIW, stuff in fs/* is
	* a bunch of patches in fs/reiserfs/* (carved up, see R[0-4]-* on
ftp.linux.org.uk/pub/people/viro)
	* nfs, nfsd, lockd and net/sunrpc along with them (not carved up
into sane form and that will be needed to even start talking about merge)
	* compat_ioctl.c (part of i2c annotations)
	* fs/hostfs/* (part of UML patches, so that'll a part of further split
once the things stabilize a bit)
	* couple of trivial ones - procfs (duplicate of your patch) and
ncpfs (ncp_request_reply.sign made be32[6])
	* include-ectomy in a lot of places, but that's not likely to clash
with your stuff.

Most of the mess is in drivers/*, arch/* and (for endianness patches) net/*...

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

* "__be32 s_addr" ? (was Re: [PATCH] procfs: Fix sparse warnings)
  2005-02-16  8:35       ` Al Viro
@ 2005-02-16 10:28         ` Alexey Dobriyan
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Dobriyan @ 2005-02-16 10:28 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-kernel

On Wednesday 16 February 2005 10:35, Al Viro wrote:

> Most of the mess is in drivers/*, arch/* and (for endianness patches) net/*...

Yes, net/*. Many do X.s_addr = htonl(blah). Is this correct?

--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -51,7 +51,7 @@ enum {
 
 /* Internet address. */
 struct in_addr {
-	__u32	s_addr;
+	__be32	s_addr;
 };
 
 #define IP_TOS		1

It gives approximately "486 insertions(+), 183 deletions(-)" between two
logs without and with this change (adds more then removes as is).

	Alexey

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

end of thread, other threads:[~2005-02-16  9:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-15 12:55 [PATCH] procfs: Fix sparse warnings Alexey Dobriyan
2005-02-15 11:59 ` Al Viro
2005-02-15 13:12   ` Alexey Dobriyan
2005-02-15 19:26     ` Al Viro
2005-02-16  8:35       ` Al Viro
2005-02-16 10:28         ` "__be32 s_addr" ? (was Re: [PATCH] procfs: Fix sparse warnings) Alexey Dobriyan

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