Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030256AbXADXMX (ORCPT ); Thu, 4 Jan 2007 18:12:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030260AbXADXMX (ORCPT ); Thu, 4 Jan 2007 18:12:23 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:55635 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030256AbXADXMW (ORCPT ); Thu, 4 Jan 2007 18:12:22 -0500 Subject: Re: [PATCH] Fix __ucmpdi2 in v4l2_norm_to_name() From: Mauro Carvalho Chehab To: Andrew Morton Cc: Stelian Pop , Linux Kernel Mailing List , Linus Torvalds , v4l-dvb-maintainer@linuxtv.org In-Reply-To: <20070104144825.68fec948.akpm@osdl.org> References: <1167909014.20853.8.camel@localhost.localdomain> <20070104144825.68fec948.akpm@osdl.org> Content-Type: text/plain; charset=ISO-8859-1 Date: Thu, 04 Jan 2007 20:59:08 -0200 Message-Id: <1167951548.12012.55.camel@praia> Mime-Version: 1.0 X-Mailer: Evolution 2.8.0-1mdv2007.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1706 Lines: 52 Em Qui, 2007-01-04 ?s 14:48 -0800, Andrew Morton escreveu: > On Thu, 04 Jan 2007 12:10:14 +0100 > Stelian Pop 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 > > > > --- > > > > 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? Too late to change it to 32 bits. It is at V4L2 userspace API since kernel 2.6.0. We can, however use this approach as a workaround, with the proper documentation. I'll handle it after I return from vacations next week. > Cheers, Mauro. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/