From: Stelian Pop <stelian@popies.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
mchehab@infradead.org, v4l-dvb-maintainer@linuxtv.org
Subject: [PATCH] Fix __ucmpdi2 in v4l2_norm_to_name()
Date: Thu, 04 Jan 2007 12:10:14 +0100 [thread overview]
Message-ID: <1167909014.20853.8.camel@localhost.localdomain> (raw)
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@popies.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) {
- case V4L2_STD_PAL:
- name="PAL"; break;
- case V4L2_STD_PAL_BG:
- name="PAL-BG"; break;
- case V4L2_STD_PAL_DK:
- name="PAL-DK"; break;
- case V4L2_STD_PAL_B:
- name="PAL-B"; break;
- case V4L2_STD_PAL_B1:
- name="PAL-B1"; break;
- case V4L2_STD_PAL_G:
- name="PAL-G"; break;
- case V4L2_STD_PAL_H:
- name="PAL-H"; break;
- case V4L2_STD_PAL_I:
- name="PAL-I"; break;
- case V4L2_STD_PAL_D:
- name="PAL-D"; break;
- case V4L2_STD_PAL_D1:
- name="PAL-D1"; break;
- case V4L2_STD_PAL_K:
- name="PAL-K"; break;
- case V4L2_STD_PAL_M:
- name="PAL-M"; break;
- case V4L2_STD_PAL_N:
- name="PAL-N"; break;
- case V4L2_STD_PAL_Nc:
- name="PAL-Nc"; break;
- case V4L2_STD_PAL_60:
- name="PAL-60"; break;
- case V4L2_STD_NTSC:
- name="NTSC"; break;
- case V4L2_STD_NTSC_M:
- name="NTSC-M"; break;
- case V4L2_STD_NTSC_M_JP:
- name="NTSC-M-JP"; break;
- case V4L2_STD_NTSC_443:
- name="NTSC-443"; break;
- case V4L2_STD_NTSC_M_KR:
- name="NTSC-M-KR"; break;
- case V4L2_STD_SECAM:
- name="SECAM"; break;
- case V4L2_STD_SECAM_DK:
- name="SECAM-DK"; break;
- case V4L2_STD_SECAM_B:
- name="SECAM-B"; break;
- case V4L2_STD_SECAM_D:
- name="SECAM-D"; break;
- case V4L2_STD_SECAM_G:
- name="SECAM-G"; break;
- case V4L2_STD_SECAM_H:
- name="SECAM-H"; break;
- case V4L2_STD_SECAM_K:
- name="SECAM-K"; break;
- case V4L2_STD_SECAM_K1:
- name="SECAM-K1"; break;
- case V4L2_STD_SECAM_L:
- name="SECAM-L"; break;
- case V4L2_STD_SECAM_LC:
- name="SECAM-LC"; break;
- default:
- name="Unknown"; break;
- }
+ if (id == V4L2_STD_PAL)
+ name = "PAL";
+ else if (id == V4L2_STD_PAL_BG)
+ name = "PAL-BG";
+ else if (id == V4L2_STD_PAL_DK)
+ name = "PAL-DK";
+ else if (id == V4L2_STD_PAL_B)
+ name = "PAL-B";
+ else if (id == V4L2_STD_PAL_B1)
+ name = "PAL-B1";
+ else if (id == V4L2_STD_PAL_G)
+ name = "PAL-G";
+ else if (id == V4L2_STD_PAL_H)
+ name = "PAL-H";
+ else if (id == V4L2_STD_PAL_I)
+ name = "PAL-I";
+ else if (id == V4L2_STD_PAL_D)
+ name = "PAL-D";
+ else if (id == V4L2_STD_PAL_D1)
+ name = "PAL-D1";
+ else if (id == V4L2_STD_PAL_K)
+ name = "PAL-K";
+ else if (id == V4L2_STD_PAL_M)
+ name = "PAL-M";
+ else if (id == V4L2_STD_PAL_N)
+ name = "PAL-N";
+ else if (id == V4L2_STD_PAL_Nc)
+ name = "PAL-Nc";
+ else if (id == V4L2_STD_PAL_60)
+ name = "PAL-60";
+ else if (id == V4L2_STD_NTSC)
+ name = "NTSC";
+ else if (id == V4L2_STD_NTSC_M)
+ name = "NTSC-M";
+ else if (id == V4L2_STD_NTSC_M_JP)
+ name = "NTSC-M-JP";
+ else if (id == V4L2_STD_NTSC_443)
+ name = "NTSC-443";
+ else if (id == V4L2_STD_NTSC_M_KR)
+ name = "NTSC-M-KR";
+ else if (id == V4L2_STD_SECAM)
+ name = "SECAM";
+ else if (id == V4L2_STD_SECAM_DK)
+ name = "SECAM-DK";
+ else if (id == V4L2_STD_SECAM_B)
+ name = "SECAM-B";
+ else if (id == V4L2_STD_SECAM_D)
+ name = "SECAM-D";
+ else if (id == V4L2_STD_SECAM_G)
+ name = "SECAM-G";
+ else if (id == V4L2_STD_SECAM_H)
+ name = "SECAM-H";
+ else if (id == V4L2_STD_SECAM_K)
+ name = "SECAM-K";
+ else if (id == V4L2_STD_SECAM_K1)
+ name = "SECAM-K1";
+ else if (id == V4L2_STD_SECAM_L)
+ name = "SECAM-L";
+ else if (id == V4L2_STD_SECAM_LC)
+ name = "SECAM-LC";
+ else
+ name = "Unknown";
return name;
}
--
Stelian Pop <stelian@popies.net>
next reply other threads:[~2007-01-04 11:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 11:10 Stelian Pop [this message]
2007-01-04 12:09 ` [v4l-dvb-maintainer] [PATCH] Fix __ucmpdi2 in v4l2_norm_to_name() Trent Piepho
2007-01-04 12:53 ` Stelian Pop
2007-01-04 22:48 ` Andrew Morton
2007-01-04 22:59 ` Mauro Carvalho Chehab
2007-01-04 23:18 ` Andrew Morton
2007-01-07 11:44 ` Mauro Carvalho Chehab
2007-01-15 9:22 ` Stelian Pop
2007-01-04 23:19 ` Stelian Pop
2007-01-05 14:20 ` Segher Boessenkool
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=1167909014.20853.8.camel@localhost.localdomain \
--to=stelian@popies.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=torvalds@osdl.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
/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.