lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 4 Jan 2007 14:48:25 -0800
From:	Andrew Morton <akpm@...l.org>
To:	Stelian Pop <stelian@...ies.net>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...l.org>, mchehab@...radead.org,
	v4l-dvb-maintainer@...uxtv.org
Subject: Re: [PATCH] Fix __ucmpdi2 in v4l2_norm_to_name()

On Thu, 04 Jan 2007 12:10:14 +0100
Stelian Pop <stelian@...ies.net> wrote:

> Hi,
> 
> This patch replaces a switch statement using 64 bit values with the
> if/else equivalent in order to prevent a call __ucmpdi2 generated by
> some versions of gcc (verified with gcc-4.1.2 20060928):
> 
> 	drivers/built-in.o: In function `v4l2_norm_to_name':
> 	(.text+0x71100): undefined reference to `__ucmpdi2'
> 
> Signed-off-by: Stelian Pop <stelian@...ies.net>
> 
> ---
> 
>  drivers/media/video/v4l2-common.c |  126 ++++++++++++++++++-------------------
>  1 files changed, 62 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
> index 752c82c..0c3c2f6 100644
> --- a/drivers/media/video/v4l2-common.c
> +++ b/drivers/media/video/v4l2-common.c
> @@ -91,70 +91,68 @@ char *v4l2_norm_to_name(v4l2_std_id id)
>  {
>  	char *name;
>  
> -	switch (id) {

It'd be simpler to just do

	switch ((unsigned int)id) {

here (with a suitable comment).

The largest value we use here is 0x02000000.  Perhaps v4l2_std_id shouldn't
be 64-bit?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ