All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Mitchell Blank Jr <mitch@sfgoth.com>
Cc: kaos@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: 2.6.17-rc1 core_sys_select incompatible pointer types
Date: Mon, 3 Apr 2006 02:09:16 -0700	[thread overview]
Message-ID: <20060403020916.57c9eaec.akpm@osdl.org> (raw)
In-Reply-To: <20060403084410.GD3157@gaz.sfgoth.com>

Mitchell Blank Jr <mitch@sfgoth.com> wrote:
>
>  Keith Owens wrote:
>  > 2.6.17-rc1, ia64, gcc 3.3.3
>  > 
>  > fs/select.c: In function `core_sys_select':
>  > fs/select.c:339: warning: assignment from incompatible pointer type
>  > fs/select.c:376: warning: comparison of distinct pointer types lacks a cast
> 
>  I posted a patch to fix this and another problem with the recent select
>  changes a couple days ago.
> 
>  Original version, with description:
>    http://lkml.org/lkml/2006/3/31/308
>  Slightly updated:
>    http://lkml.org/lkml/2006/3/31/316
> 
>  I'm hoping that Andrew picked it up.

Nope.  I queued up the below.  If anything additional is needed, please
resend.


diff -puN fs/select.c~select-warning-fixes fs/select.c
--- devel/fs/select.c~select-warning-fixes	2006-04-01 22:27:14.000000000 -0800
+++ devel-akpm/fs/select.c	2006-04-01 22:28:50.000000000 -0800
@@ -310,7 +310,7 @@ static int core_sys_select(int n, fd_set
 			   fd_set __user *exp, s64 *timeout)
 {
 	fd_set_bits fds;
-	char *bits;
+	void *bits;
 	int ret, size, max_fdset;
 	struct fdtable *fdt;
 	/* Allocate small arguments on the stack to save memory and be faster */
@@ -341,12 +341,12 @@ static int core_sys_select(int n, fd_set
 		bits = kmalloc(6 * size, GFP_KERNEL);
 	if (!bits)
 		goto out_nofds;
-	fds.in      = (unsigned long *)  bits;
-	fds.out     = (unsigned long *) (bits +   size);
-	fds.ex      = (unsigned long *) (bits + 2*size);
-	fds.res_in  = (unsigned long *) (bits + 3*size);
-	fds.res_out = (unsigned long *) (bits + 4*size);
-	fds.res_ex  = (unsigned long *) (bits + 5*size);
+	fds.in      = bits;
+	fds.out     = bits +   size;
+	fds.ex      = bits + 2*size;
+	fds.res_in  = bits + 3*size;
+	fds.res_out = bits + 4*size;
+	fds.res_ex  = bits + 5*size;
 
 	if ((ret = get_fd_set(n, inp, fds.in)) ||
 	    (ret = get_fd_set(n, outp, fds.out)) ||
_


  reply	other threads:[~2006-04-03  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03  8:28 2.6.17-rc1 core_sys_select incompatible pointer types Keith Owens
2006-04-03  8:44 ` Mitchell Blank Jr
2006-04-03  9:09   ` Andrew Morton [this message]
2006-04-03  9:18     ` Keith Owens
2006-04-03  9:27       ` Andrew Morton
2006-04-03  9:55     ` Mitchell Blank Jr

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=20060403020916.57c9eaec.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=kaos@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch@sfgoth.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.