All of lore.kernel.org
 help / color / mirror / Atom feed
* abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
@ 2010-11-18  6:40 ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2010-11-18  6:40 UTC (permalink / raw)
  To: michalj, Rolf Eike Beer, Andrew Morton
  Cc: linux-kernel, Linux Fbdev development list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 6070 bytes --]

[Don't use the obsolete linux-fbdev-devel address]

On Thu, Nov 18, 2010 at 00:08, Michal Januszewski <michalj@gmail.com> wrote:
> In the framebuffer subsystem the abs() macro is often used as a part of
> the calculation of a Manhattan metric, which in turn is used as a measure
> of similarity between video modes.  The arguments of abs() are sometimes
> unsigned numbers.  This worked fine until commit a49c59c0, which changed
> the definition of abs() to prevent truncation.  As a result of this
> change, in the following piece of code:
>
>  u32 a = 0, b = 1;
>  u32 c = abs(a - b);

Indeed, the difference of 2 numbers is unsigned, as per C.

> 'c' will end up with a value of 0xffffffff instead of the expected 0x1.

This happens on 64-bit only, right?

Anyway, I think commit a49c59c0 is wrong: abs() operates on signed
(32-bit) numbers. For larger (64-bit signed) numbers, we have abs64().

> A problem caused by this change and visible by the end user is that
> framebuffer drivers relying on functions from modedb.c will fail to
> find high resolution video modes similar to that explicitly requested
> by the user if an exact match cannot be found (see e.g.
> https://bugs.gentoo.org/show_bug.cgi?id=296539).
>
> Fix this problem by casting all arguments of abs() to an int prior
> to the macro evaluation in modedb.c and uvesafb.c.
>
> Signed-off-by: Michal Januszewski <michalj@gmail.com>
> ---
> diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
> index 0a4dbdc..878bea1 100644
> --- a/drivers/video/modedb.c
> +++ b/drivers/video/modedb.c
> @@ -636,8 +636,10 @@ done:
>                        if (refresh_specified && db[i].refresh == refresh) {
>                                return 1;
>                        } else {
> -                               if (abs(db[i].refresh - refresh) < diff) {
> -                                       diff = abs(db[i].refresh - refresh);
> +                               if (abs((int)(db[i].refresh - refresh)) <
> +                                   diff) {
> +                                       diff = abs((int)(db[i].refresh -
> +                                               refresh));
>                                        best = i;
>                                }
>                        }
> @@ -654,8 +656,8 @@ done:
>        for (i = 0; i < dbsize; i++) {
>                DPRINTK("Trying %ix%i\n", db[i].xres, db[i].yres);
>                if (!fb_try_mode(var, info, &db[i], bpp)) {
> -                       tdiff = abs(db[i].xres - xres) +
> -                               abs(db[i].yres - yres);
> +                       tdiff = abs((int)(db[i].xres - xres)) +
> +                               abs((int)(db[i].yres - yres));
>
>                        /*
>                         * Penalize modes with resolutions smaller
> @@ -851,13 +853,13 @@ const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
>                modelist = list_entry(pos, struct fb_modelist, list);
>                cmode = &modelist->mode;
>
> -               d = abs(cmode->xres - mode->xres) +
> -                       abs(cmode->yres - mode->yres);
> +               d = abs((int)(cmode->xres - mode->xres)) +
> +                       abs((int)(cmode->yres - mode->yres));
>                if (diff > d) {
>                        diff = d;
>                        best = cmode;
>                } else if (diff == d) {
> -                       d = abs(cmode->refresh - mode->refresh);
> +                       d = abs((int)(cmode->refresh - mode->refresh));
>                        if (diff_refresh > d) {
>                                diff_refresh = d;
>                                best = cmode;
> diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
> index 7b8839e..6621427 100644
> --- a/drivers/video/uvesafb.c
> +++ b/drivers/video/uvesafb.c
> @@ -320,9 +320,9 @@ static int uvesafb_vbe_find_mode(struct uvesafb_par *par,
>        int i, match = -1, h = 0, d = 0x7fffffff;
>
>        for (i = 0; i < par->vbe_modes_cnt; i++) {
> -               h = abs(par->vbe_modes[i].x_res - xres) +
> -                   abs(par->vbe_modes[i].y_res - yres) +
> -                   abs(depth - par->vbe_modes[i].depth);
> +               h = abs((int)(par->vbe_modes[i].x_res - xres)) +
> +                   abs((int)(par->vbe_modes[i].y_res - yres)) +
> +                   abs((int)(depth - par->vbe_modes[i].depth));
>
>                /*
>                 * We have an exact match in terms of resolution
> @@ -1375,7 +1375,7 @@ static int uvesafb_check_var(struct fb_var_screeninfo *var,
>         * which is theoretically incorrect, but which we'll try to handle
>         * here.
>         */
> -       if (depth == 0 || abs(depth - var->bits_per_pixel) >= 8)
> +       if (depth == 0 || abs((int)(depth - var->bits_per_pixel)) >= 8)
>                depth = var->bits_per_pixel;
>
>        match = uvesafb_vbe_find_mode(par, var->xres, var->yres, depth,

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
@ 2010-11-18  6:40 ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2010-11-18  6:40 UTC (permalink / raw)
  To: michalj, Rolf Eike Beer, Andrew Morton
  Cc: linux-kernel, Linux Fbdev development list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1253", Size: 6031 bytes --]

[Don't use the obsolete linux-fbdev-devel address]

On Thu, Nov 18, 2010 at 00:08, Michal Januszewski <michalj@gmail.com> wrote:
> In the framebuffer subsystem the abs() macro is often used as a part of
> the calculation of a Manhattan metric, which in turn is used as a measure
> of similarity between video modes.  The arguments of abs() are sometimes
> unsigned numbers.  This worked fine until commit a49c59c0, which changed
> the definition of abs() to prevent truncation.  As a result of this
> change, in the following piece of code:
>
>  u32 a = 0, b = 1;
>  u32 c = abs(a - b);

Indeed, the difference of 2 numbers is unsigned, as per C.

> 'c' will end up with a value of 0xffffffff instead of the expected 0x1.

This happens on 64-bit only, right?

Anyway, I think commit a49c59c0 is wrong: abs() operates on signed
(32-bit) numbers. For larger (64-bit signed) numbers, we have abs64().

> A problem caused by this change and visible by the end user is that
> framebuffer drivers relying on functions from modedb.c will fail to
> find high resolution video modes similar to that explicitly requested
> by the user if an exact match cannot be found (see e.g.
> https://bugs.gentoo.org/show_bug.cgi?id)6539).
>
> Fix this problem by casting all arguments of abs() to an int prior
> to the macro evaluation in modedb.c and uvesafb.c.
>
> Signed-off-by: Michal Januszewski <michalj@gmail.com>
> ---
> diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
> index 0a4dbdc..878bea1 100644
> --- a/drivers/video/modedb.c
> +++ b/drivers/video/modedb.c
> @@ -636,8 +636,10 @@ done:
>                        if (refresh_specified && db[i].refresh = refresh) {
>                                return 1;
>                        } else {
> -                               if (abs(db[i].refresh - refresh) < diff) {
> -                                       diff = abs(db[i].refresh - refresh);
> +                               if (abs((int)(db[i].refresh - refresh)) <
> +                                   diff) {
> +                                       diff = abs((int)(db[i].refresh -
> +                                               refresh));
>                                        best = i;
>                                }
>                        }
> @@ -654,8 +656,8 @@ done:
>        for (i = 0; i < dbsize; i++) {
>                DPRINTK("Trying %ix%i\n", db[i].xres, db[i].yres);
>                if (!fb_try_mode(var, info, &db[i], bpp)) {
> -                       tdiff = abs(db[i].xres - xres) +
> -                               abs(db[i].yres - yres);
> +                       tdiff = abs((int)(db[i].xres - xres)) +
> +                               abs((int)(db[i].yres - yres));
>
>                        /*
>                         * Penalize modes with resolutions smaller
> @@ -851,13 +853,13 @@ const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
>                modelist = list_entry(pos, struct fb_modelist, list);
>                cmode = &modelist->mode;
>
> -               d = abs(cmode->xres - mode->xres) +
> -                       abs(cmode->yres - mode->yres);
> +               d = abs((int)(cmode->xres - mode->xres)) +
> +                       abs((int)(cmode->yres - mode->yres));
>                if (diff > d) {
>                        diff = d;
>                        best = cmode;
>                } else if (diff = d) {
> -                       d = abs(cmode->refresh - mode->refresh);
> +                       d = abs((int)(cmode->refresh - mode->refresh));
>                        if (diff_refresh > d) {
>                                diff_refresh = d;
>                                best = cmode;
> diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
> index 7b8839e..6621427 100644
> --- a/drivers/video/uvesafb.c
> +++ b/drivers/video/uvesafb.c
> @@ -320,9 +320,9 @@ static int uvesafb_vbe_find_mode(struct uvesafb_par *par,
>        int i, match = -1, h = 0, d = 0x7fffffff;
>
>        for (i = 0; i < par->vbe_modes_cnt; i++) {
> -               h = abs(par->vbe_modes[i].x_res - xres) +
> -                   abs(par->vbe_modes[i].y_res - yres) +
> -                   abs(depth - par->vbe_modes[i].depth);
> +               h = abs((int)(par->vbe_modes[i].x_res - xres)) +
> +                   abs((int)(par->vbe_modes[i].y_res - yres)) +
> +                   abs((int)(depth - par->vbe_modes[i].depth));
>
>                /*
>                 * We have an exact match in terms of resolution
> @@ -1375,7 +1375,7 @@ static int uvesafb_check_var(struct fb_var_screeninfo *var,
>         * which is theoretically incorrect, but which we'll try to handle
>         * here.
>         */
> -       if (depth = 0 || abs(depth - var->bits_per_pixel) >= 8)
> +       if (depth = 0 || abs((int)(depth - var->bits_per_pixel)) >= 8)
>                depth = var->bits_per_pixel;
>
>        match = uvesafb_vbe_find_mode(par, var->xres, var->yres, depth,

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±ýöÝzÿâžØ^n‡r¡ö¦zË\x1aëh™¨è­Ú&£ûàz¿äz¹Þ—ú+€Ê+zf£¢·hšˆ§~†­†Ûiÿÿïêÿ‘êçz_è®\x0fæj:+v‰¨þ)ߣøm

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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
  2010-11-18  6:40 ` Geert Uytterhoeven
@ 2010-11-19 22:07   ` Andrew Morton
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 22:07 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: michalj, Rolf Eike Beer, linux-kernel, Linux Fbdev development list

On Thu, 18 Nov 2010 07:40:19 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> [Don't use the obsolete linux-fbdev-devel address]
> 
> On Thu, Nov 18, 2010 at 00:08, Michal Januszewski <michalj@gmail.com> wrote:
> > In the framebuffer subsystem the abs() macro is often used as a part of
> > the calculation of a Manhattan metric, which in turn is used as a measure
> > of similarity between video modes. __The arguments of abs() are sometimes
> > unsigned numbers. __This worked fine until commit a49c59c0, which changed
> > the definition of abs() to prevent truncation. __As a result of this
> > change, in the following piece of code:
> >
> > __u32 a = 0, b = 1;
> > __u32 c = abs(a - b);
> 
> Indeed, the difference of 2 numbers is unsigned, as per C.
> 
> > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> 
> This happens on 64-bit only, right?
> 
> Anyway, I think commit a49c59c0 is wrong: abs() operates on signed
> (32-bit) numbers. For larger (64-bit signed) numbers, we have abs64().
> 
> > A problem caused by this change and visible by the end user is that
> > framebuffer drivers relying on functions from modedb.c will fail to
> > find high resolution video modes similar to that explicitly requested
> > by the user if an exact match cannot be found (see e.g.
> > https://bugs.gentoo.org/show_bug.cgi?id=296539).

How does this look?


From: Andrew Morton <akpm@linux-foundation.org>

Michal reports:

In the framebuffer subsystem the abs() macro is often used as a part of
the calculation of a Manhattan metric, which in turn is used as a measure
of similarity between video modes.  The arguments of abs() are sometimes
unsigned numbers.  This worked fine until commit a49c59c0 ("Make sure the
value in abs() does not get truncated if it is greater than 2^32:) , which
changed the definition of abs() to prevent truncation.  As a result of
this change, in the following piece of code:

u32 a = 0, b = 1;
u32 c = abs(a - b);

'c' will end up with a value of 0xffffffff instead of the expected 0x1.

A problem caused by this change and visible by the end user is that
framebuffer drivers relying on functions from modedb.c will fail to find
high resolution video modes similar to that explicitly requested by the
user if an exact match cannot be found (see e.g.

Fix this by special-casing `long' types within abs().  

This patch reduces x86_64 code size a bit - drivers/video/uvesafb.o shrunk
by 15 bytes, presumably because it is doing abs() on 4-byte quantities,
and expanding those to 8-byte longs adds code.

testcase:

#define oldabs(x) ({				\
		long __x = (x);			\
		(__x < 0) ? -__x : __x;		\
	})

#define newabs(x) ({						\
		long ret;					\
		if (sizeof(x) == sizeof(long)) {		\
			long __x = (x);				\
			ret = (__x < 0) ? -__x : __x;		\
		} else {					\
			int __x = (x);				\
			ret = (__x < 0) ? -__x : __x;		\
		}						\
		ret;						\
	})

typedef unsigned int u32;

main()
{
	u32 a = 0;
	u32 b = 1;
	u32 oldc = oldabs(a - b);
	u32 newc = newabs(a - b);

	printf("%u %u\n", oldc, newc);
}

akpm:/home/akpm> gcc t.c
akpm:/home/akpm> ./a.out
4294967295 1

Reported-by: Michal Januszewski <michalj@gmail.com>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/kernel.h |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
+++ a/include/linux/kernel.h
@@ -143,9 +143,16 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
-#define abs(x) ({				\
-		long __x = (x);			\
-		(__x < 0) ? -__x : __x;		\
+#define abs(x) ({						\
+		long ret;					\
+		if (sizeof(x) == sizeof(long)) {		\
+			long __x = (x);				\
+			ret = (__x < 0) ? -__x : __x;		\
+		} else {					\
+			int __x = (x);				\
+			ret = (__x < 0) ? -__x : __x;		\
+		}						\
+		ret;						\
 	})
 
 #define abs64(x) ({				\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode
@ 2010-11-19 22:07   ` Andrew Morton
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 22:07 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: michalj, Rolf Eike Beer, linux-kernel, Linux Fbdev development list

On Thu, 18 Nov 2010 07:40:19 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> [Don't use the obsolete linux-fbdev-devel address]
> 
> On Thu, Nov 18, 2010 at 00:08, Michal Januszewski <michalj@gmail.com> wrote:
> > In the framebuffer subsystem the abs() macro is often used as a part of
> > the calculation of a Manhattan metric, which in turn is used as a measure
> > of similarity between video modes. __The arguments of abs() are sometimes
> > unsigned numbers. __This worked fine until commit a49c59c0, which changed
> > the definition of abs() to prevent truncation. __As a result of this
> > change, in the following piece of code:
> >
> > __u32 a = 0, b = 1;
> > __u32 c = abs(a - b);
> 
> Indeed, the difference of 2 numbers is unsigned, as per C.
> 
> > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> 
> This happens on 64-bit only, right?
> 
> Anyway, I think commit a49c59c0 is wrong: abs() operates on signed
> (32-bit) numbers. For larger (64-bit signed) numbers, we have abs64().
> 
> > A problem caused by this change and visible by the end user is that
> > framebuffer drivers relying on functions from modedb.c will fail to
> > find high resolution video modes similar to that explicitly requested
> > by the user if an exact match cannot be found (see e.g.
> > https://bugs.gentoo.org/show_bug.cgi?id)6539).

How does this look?


From: Andrew Morton <akpm@linux-foundation.org>

Michal reports:

In the framebuffer subsystem the abs() macro is often used as a part of
the calculation of a Manhattan metric, which in turn is used as a measure
of similarity between video modes.  The arguments of abs() are sometimes
unsigned numbers.  This worked fine until commit a49c59c0 ("Make sure the
value in abs() does not get truncated if it is greater than 2^32:) , which
changed the definition of abs() to prevent truncation.  As a result of
this change, in the following piece of code:

u32 a = 0, b = 1;
u32 c = abs(a - b);

'c' will end up with a value of 0xffffffff instead of the expected 0x1.

A problem caused by this change and visible by the end user is that
framebuffer drivers relying on functions from modedb.c will fail to find
high resolution video modes similar to that explicitly requested by the
user if an exact match cannot be found (see e.g.

Fix this by special-casing `long' types within abs().  

This patch reduces x86_64 code size a bit - drivers/video/uvesafb.o shrunk
by 15 bytes, presumably because it is doing abs() on 4-byte quantities,
and expanding those to 8-byte longs adds code.

testcase:

#define oldabs(x) ({				\
		long __x = (x);			\
		(__x < 0) ? -__x : __x;		\
	})

#define newabs(x) ({						\
		long ret;					\
		if (sizeof(x) = sizeof(long)) {		\
			long __x = (x);				\
			ret = (__x < 0) ? -__x : __x;		\
		} else {					\
			int __x = (x);				\
			ret = (__x < 0) ? -__x : __x;		\
		}						\
		ret;						\
	})

typedef unsigned int u32;

main()
{
	u32 a = 0;
	u32 b = 1;
	u32 oldc = oldabs(a - b);
	u32 newc = newabs(a - b);

	printf("%u %u\n", oldc, newc);
}

akpm:/home/akpm> gcc t.c
akpm:/home/akpm> ./a.out
4294967295 1

Reported-by: Michal Januszewski <michalj@gmail.com>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/kernel.h |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
+++ a/include/linux/kernel.h
@@ -143,9 +143,16 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
-#define abs(x) ({				\
-		long __x = (x);			\
-		(__x < 0) ? -__x : __x;		\
+#define abs(x) ({						\
+		long ret;					\
+		if (sizeof(x) = sizeof(long)) {		\
+			long __x = (x);				\
+			ret = (__x < 0) ? -__x : __x;		\
+		} else {					\
+			int __x = (x);				\
+			ret = (__x < 0) ? -__x : __x;		\
+		}						\
+		ret;						\
 	})
 
 #define abs64(x) ({				\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
  2010-11-19 22:07   ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
@ 2010-11-19 22:28     ` Michal Januszewski
  -1 siblings, 0 replies; 12+ messages in thread
From: Michal Januszewski @ 2010-11-19 22:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, Nov 19, 2010 at 02:07:21PM -0800, Andrew Morton wrote:
> On Thu, 18 Nov 2010 07:40:19 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> > 
> > This happens on 64-bit only, right?

Absolutely, I should have mentioned it in the patch description.

> How does this look?
>
> [..]
> 
> Reported-by: Michal Januszewski <michalj@gmail.com>
> Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/linux/kernel.h |   13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
> +++ a/include/linux/kernel.h
> @@ -143,9 +143,16 @@ extern int _cond_resched(void);
>  
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>  
> -#define abs(x) ({				\
> -		long __x = (x);			\
> -		(__x < 0) ? -__x : __x;		\
> +#define abs(x) ({						\
> +		long ret;					\
> +		if (sizeof(x) == sizeof(long)) {		\
> +			long __x = (x);				\
> +			ret = (__x < 0) ? -__x : __x;		\
> +		} else {					\
> +			int __x = (x);				\
> +			ret = (__x < 0) ? -__x : __x;		\
> +		}						\
> +		ret;						\
>  	})
>  
>  #define abs64(x) ({				\
> _

Looks good to me.  I posted essentially the same thing some 3 months ago
(http://marc.info/?l=linux-kernel&m=128033094822201&w=2) but it then
failed to get any traction.  At any rate, I like your version better as
it seems more readable.

Michal

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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode
@ 2010-11-19 22:28     ` Michal Januszewski
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Januszewski @ 2010-11-19 22:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, Nov 19, 2010 at 02:07:21PM -0800, Andrew Morton wrote:
> On Thu, 18 Nov 2010 07:40:19 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> > 
> > This happens on 64-bit only, right?

Absolutely, I should have mentioned it in the patch description.

> How does this look?
>
> [..]
> 
> Reported-by: Michal Januszewski <michalj@gmail.com>
> Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/linux/kernel.h |   13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
> +++ a/include/linux/kernel.h
> @@ -143,9 +143,16 @@ extern int _cond_resched(void);
>  
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>  
> -#define abs(x) ({				\
> -		long __x = (x);			\
> -		(__x < 0) ? -__x : __x;		\
> +#define abs(x) ({						\
> +		long ret;					\
> +		if (sizeof(x) = sizeof(long)) {		\
> +			long __x = (x);				\
> +			ret = (__x < 0) ? -__x : __x;		\
> +		} else {					\
> +			int __x = (x);				\
> +			ret = (__x < 0) ? -__x : __x;		\
> +		}						\
> +		ret;						\
>  	})
>  
>  #define abs64(x) ({				\
> _

Looks good to me.  I posted essentially the same thing some 3 months ago
(http://marc.info/?l=linux-kernel&m\x128033094822201&w=2) but it then
failed to get any traction.  At any rate, I like your version better as
it seems more readable.

Michal

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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
  2010-11-19 22:28     ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Michal Januszewski
@ 2010-11-19 23:04       ` Andrew Morton
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 23:04 UTC (permalink / raw)
  To: michalj
  Cc: Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, 19 Nov 2010 23:28:23 +0100
Michal Januszewski <michalj@gmail.com> wrote:

> On Fri, Nov 19, 2010 at 02:07:21PM -0800, Andrew Morton wrote:
> > On Thu, 18 Nov 2010 07:40:19 +0100
> > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > > > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> > > 
> > > This happens on 64-bit only, right?
> 
> Absolutely, I should have mentioned it in the patch description.
> 
> > How does this look?
> >
> > [..]
> > 
> > Reported-by: Michal Januszewski <michalj@gmail.com>
> > Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
> > Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  include/linux/kernel.h |   13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
> > --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
> > +++ a/include/linux/kernel.h
> > @@ -143,9 +143,16 @@ extern int _cond_resched(void);
> >  
> >  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
> >  
> > -#define abs(x) ({				\
> > -		long __x = (x);			\
> > -		(__x < 0) ? -__x : __x;		\
> > +#define abs(x) ({						\
> > +		long ret;					\
> > +		if (sizeof(x) == sizeof(long)) {		\
> > +			long __x = (x);				\
> > +			ret = (__x < 0) ? -__x : __x;		\
> > +		} else {					\
> > +			int __x = (x);				\
> > +			ret = (__x < 0) ? -__x : __x;		\
> > +		}						\
> > +		ret;						\
> >  	})
> >  
> >  #define abs64(x) ({				\
> > _
> 
> Looks good to me.  I posted essentially the same thing some 3 months ago
> (http://marc.info/?l=linux-kernel&m=128033094822201&w=2) but it then
> failed to get any traction.  At any rate, I like your version better as
> it seems more readable.
> 

I spose we should document it.   Does this look complete and accurate?

--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
+++ a/include/linux/kernel.h
@@ -143,6 +143,13 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
+/*
+ * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
+ * types it returns a signed long.  For int, short and char types it returns a
+ * signed int.
+ * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
+ * for those.
+ */
 #define abs(x) ({						\
 		long ret;					\
 		if (sizeof(x) == sizeof(long)) {		\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode
@ 2010-11-19 23:04       ` Andrew Morton
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 23:04 UTC (permalink / raw)
  To: michalj
  Cc: Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, 19 Nov 2010 23:28:23 +0100
Michal Januszewski <michalj@gmail.com> wrote:

> On Fri, Nov 19, 2010 at 02:07:21PM -0800, Andrew Morton wrote:
> > On Thu, 18 Nov 2010 07:40:19 +0100
> > Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > > > 'c' will end up with a value of 0xffffffff instead of the expected 0x1.
> > > 
> > > This happens on 64-bit only, right?
> 
> Absolutely, I should have mentioned it in the patch description.
> 
> > How does this look?
> >
> > [..]
> > 
> > Reported-by: Michal Januszewski <michalj@gmail.com>
> > Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
> > Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  include/linux/kernel.h |   13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff -puN include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit include/linux/kernel.h
> > --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit
> > +++ a/include/linux/kernel.h
> > @@ -143,9 +143,16 @@ extern int _cond_resched(void);
> >  
> >  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
> >  
> > -#define abs(x) ({				\
> > -		long __x = (x);			\
> > -		(__x < 0) ? -__x : __x;		\
> > +#define abs(x) ({						\
> > +		long ret;					\
> > +		if (sizeof(x) = sizeof(long)) {		\
> > +			long __x = (x);				\
> > +			ret = (__x < 0) ? -__x : __x;		\
> > +		} else {					\
> > +			int __x = (x);				\
> > +			ret = (__x < 0) ? -__x : __x;		\
> > +		}						\
> > +		ret;						\
> >  	})
> >  
> >  #define abs64(x) ({				\
> > _
> 
> Looks good to me.  I posted essentially the same thing some 3 months ago
> (http://marc.info/?l=linux-kernel&m\x128033094822201&w=2) but it then
> failed to get any traction.  At any rate, I like your version better as
> it seems more readable.
> 

I spose we should document it.   Does this look complete and accurate?

--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
+++ a/include/linux/kernel.h
@@ -143,6 +143,13 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
+/*
+ * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
+ * types it returns a signed long.  For int, short and char types it returns a
+ * signed int.
+ * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
+ * for those.
+ */
 #define abs(x) ({						\
 		long ret;					\
 		if (sizeof(x) = sizeof(long)) {		\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
  2010-11-19 23:04       ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
@ 2010-11-19 23:19         ` Andrew Morton
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 23:19 UTC (permalink / raw)
  To: michalj, Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, 19 Nov 2010 15:04:11 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:

> > Looks good to me.  I posted essentially the same thing some 3 months ago
> > (http://marc.info/?l=linux-kernel&m=128033094822201&w=2) but it then
> > failed to get any traction.  At any rate, I like your version better as
> > it seems more readable.
> > 
> 
> I spose we should document it.   Does this look complete and accurate?
> 
> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
> +++ a/include/linux/kernel.h
> @@ -143,6 +143,13 @@ extern int _cond_resched(void);
>  
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>  
> +/*
> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
> + * types it returns a signed long.  For int, short and char types it returns a
> + * signed int.
> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
> + * for those.
> + */
>  #define abs(x) ({						\
>  		long ret;					\
>  		if (sizeof(x) == sizeof(long)) {		\

Well that was a load of bollocks.  2nd attempt:

--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
+++ a/include/linux/kernel.h
@@ -143,6 +143,12 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
+/*
+ * abs() handles unsigned and signed longs, ints, shorts and chars.  For all
+ * input types abs() returns a signed long.
+ * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
+ * for those.
+ */
 #define abs(x) ({						\
 		long ret;					\
 		if (sizeof(x) == sizeof(long)) {		\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode
@ 2010-11-19 23:19         ` Andrew Morton
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Morton @ 2010-11-19 23:19 UTC (permalink / raw)
  To: michalj, Geert Uytterhoeven, Rolf Eike Beer, linux-kernel,
	Linux Fbdev development list

On Fri, 19 Nov 2010 15:04:11 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:

> > Looks good to me.  I posted essentially the same thing some 3 months ago
> > (http://marc.info/?l=linux-kernel&m\x128033094822201&w=2) but it then
> > failed to get any traction.  At any rate, I like your version better as
> > it seems more readable.
> > 
> 
> I spose we should document it.   Does this look complete and accurate?
> 
> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
> +++ a/include/linux/kernel.h
> @@ -143,6 +143,13 @@ extern int _cond_resched(void);
>  
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>  
> +/*
> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
> + * types it returns a signed long.  For int, short and char types it returns a
> + * signed int.
> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
> + * for those.
> + */
>  #define abs(x) ({						\
>  		long ret;					\
>  		if (sizeof(x) = sizeof(long)) {		\

Well that was a load of bollocks.  2nd attempt:

--- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
+++ a/include/linux/kernel.h
@@ -143,6 +143,12 @@ extern int _cond_resched(void);
 
 #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
 
+/*
+ * abs() handles unsigned and signed longs, ints, shorts and chars.  For all
+ * input types abs() returns a signed long.
+ * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
+ * for those.
+ */
 #define abs(x) ({						\
 		long ret;					\
 		if (sizeof(x) = sizeof(long)) {		\
_


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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
  2010-11-19 23:19         ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
@ 2010-11-20  8:56           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2010-11-20  8:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: michalj, Rolf Eike Beer, linux-kernel, Linux Fbdev development list

On Sat, Nov 20, 2010 at 00:19, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 19 Nov 2010 15:04:11 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> > Looks good to me.  I posted essentially the same thing some 3 months ago
>> > (http://marc.info/?l=linux-kernel&m=128033094822201&w=2) but it then
>> > failed to get any traction.  At any rate, I like your version better as
>> > it seems more readable.
>> >
>>
>> I spose we should document it.   Does this look complete and accurate?
>>
>> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
>> +++ a/include/linux/kernel.h
>> @@ -143,6 +143,13 @@ extern int _cond_resched(void);
>>
>>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>>
>> +/*
>> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
>> + * types it returns a signed long.  For int, short and char types it returns a
>> + * signed int.
>> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
>> + * for those.
>> + */
>>  #define abs(x) ({                                            \
>>               long ret;                                       \
>>               if (sizeof(x) == sizeof(long)) {                \
>
> Well that was a load of bollocks.  2nd attempt:

Yeah, I was just gonna complain "but long _is_ 64-bit on 64-bit platforms"...

> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
> +++ a/include/linux/kernel.h
> @@ -143,6 +143,12 @@ extern int _cond_resched(void);
>
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>
> +/*
> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For all
> + * input types abs() returns a signed long.
> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
> + * for those.
> + */
>  #define abs(x) ({                                              \
>                long ret;                                       \
>                if (sizeof(x) == sizeof(long)) {                \

After some second thinking, I think this is OK...

In the first patch:
> of similarity between video modes.  The arguments of abs() are sometimes
> unsigned numbers.  This worked fine until commit a49c59c0 ("Make sure the

The "sometimes" is when the parameter is the difference of 2 numbers, which is a
highly likely use case. Unlike most people's intuitive mathematical
feelings, a difference
is always unsigned in C (that was incorrect in the comment of Michal's
first version).
So I think it's worth mentioning that explicitly.

... and please llet me do the third thinking during the rest of the day ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search)
@ 2010-11-20  8:56           ` Geert Uytterhoeven
  0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2010-11-20  8:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: michalj, Rolf Eike Beer, linux-kernel, Linux Fbdev development list

On Sat, Nov 20, 2010 at 00:19, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 19 Nov 2010 15:04:11 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> > Looks good to me.  I posted essentially the same thing some 3 months ago
>> > (http://marc.info/?l=linux-kernel&m\x128033094822201&w=2) but it then
>> > failed to get any traction.  At any rate, I like your version better as
>> > it seems more readable.
>> >
>>
>> I spose we should document it.   Does this look complete and accurate?
>>
>> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
>> +++ a/include/linux/kernel.h
>> @@ -143,6 +143,13 @@ extern int _cond_resched(void);
>>
>>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>>
>> +/*
>> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For long
>> + * types it returns a signed long.  For int, short and char types it returns a
>> + * signed int.
>> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
>> + * for those.
>> + */
>>  #define abs(x) ({                                            \
>>               long ret;                                       \
>>               if (sizeof(x) = sizeof(long)) {                \
>
> Well that was a load of bollocks.  2nd attempt:

Yeah, I was just gonna complain "but long _is_ 64-bit on 64-bit platforms"...

> --- a/include/linux/kernel.h~include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix
> +++ a/include/linux/kernel.h
> @@ -143,6 +143,12 @@ extern int _cond_resched(void);
>
>  #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
>
> +/*
> + * abs() handles unsigned and signed longs, ints, shorts and chars.  For all
> + * input types abs() returns a signed long.
> + * abs() should not be used for 64-bit types (s64, u64, long long) - use abs64()
> + * for those.
> + */
>  #define abs(x) ({                                              \
>                long ret;                                       \
>                if (sizeof(x) = sizeof(long)) {                \

After some second thinking, I think this is OK...

In the first patch:
> of similarity between video modes.  The arguments of abs() are sometimes
> unsigned numbers.  This worked fine until commit a49c59c0 ("Make sure the

The "sometimes" is when the parameter is the difference of 2 numbers, which is a
highly likely use case. Unlike most people's intuitive mathematical
feelings, a difference
is always unsigned in C (that was incorrect in the comment of Michal's
first version).
So I think it's worth mentioning that explicitly.

... and please llet me do the third thinking during the rest of the day ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2010-11-20  8:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18  6:40 abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search) Geert Uytterhoeven
2010-11-18  6:40 ` Geert Uytterhoeven
2010-11-19 22:07 ` Andrew Morton
2010-11-19 22:07   ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
2010-11-19 22:28   ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search) Michal Januszewski
2010-11-19 22:28     ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Michal Januszewski
2010-11-19 23:04     ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search) Andrew Morton
2010-11-19 23:04       ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
2010-11-19 23:19       ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search) Andrew Morton
2010-11-19 23:19         ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode Andrew Morton
2010-11-20  8:56         ` abs() vs. abs64() (was: Re: [PATCH] fbdev: fix nearest mode search) Geert Uytterhoeven
2010-11-20  8:56           ` Geert Uytterhoeven

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.