public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dvb: l64781.ko broken with gcc 4.5
@ 2010-02-09 23:16 Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-02-09 23:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Matthias Schwarzott, Douglas Schilling Landgraf,
	Andreas Oberritter, linux-media, linux-kernel,
	Andreas Gruenbacher

From: Richard Guenther <rguenther@suse.de>

I'm trying to fix it on the GCC side (PR43007), but the module is
quite stupid in using ULL constants to operate on u32 values:

static int apply_frontend_param (struct dvb_frontend* fe, struct
dvb_frontend_parameters *param)
{
...
 static const u32 ppm = 8000;
 u32 spi_bias;
...

 spi_bias *= 1000ULL;
 spi_bias /= 1000ULL + ppm/1000;


which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again.

This patch fixes this issue.

Signed-off-by: Richard Guenther <rguenther@suse.de>
Cc: Andreas Gruenbacher <agruen@suse.de>
Cc: stable <stable@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Matthias Schwarzott <zzam@gentoo.org>
Cc: Douglas Schilling Landgraf <dougsland@redhat.com>
Cc: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/dvb/frontends/l64781.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/media/dvb/frontends/l64781.c
+++ b/drivers/media/dvb/frontends/l64781.c
@@ -192,8 +192,8 @@ static int apply_frontend_param (struct
 	spi_bias *= qam_tab[p->constellation];
 	spi_bias /= p->code_rate_HP + 1;
 	spi_bias /= (guard_tab[p->guard_interval] + 32);
-	spi_bias *= 1000ULL;
-	spi_bias /= 1000ULL + ppm/1000;
+	spi_bias *= 1000;
+	spi_bias /= 1000 + ppm/1000;
 	spi_bias *= p->code_rate_HP;
 
 	val0x04 = (p->transmission_mode << 2) | p->guard_interval;

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH] dvb: l64781.ko broken with gcc 4.5
@ 2010-02-09 23:16 Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-02-09 23:16 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Matthias Schwarzott, Douglas Schilling Landgraf,
	Andreas Oberritter, linux-media, linux-kernel,
	Andreas Gruenbacher, Richard Guenther

From: Richard Guenther <rguenther@suse.de>

I'm trying to fix it on the GCC side (PR43007), but the module is
quite stupid in using ULL constants to operate on u32 values:

static int apply_frontend_param (struct dvb_frontend* fe, struct
dvb_frontend_parameters *param)
{
...
 static const u32 ppm = 8000;
 u32 spi_bias;
...

 spi_bias *= 1000ULL;
 spi_bias /= 1000ULL + ppm/1000;


which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again.

This patch fixes this issue.

Signed-off-by: Richard Guenther <rguenther@suse.de>
Cc: Andreas Gruenbacher <agruen@suse.de>
Cc: stable <stable@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Matthias Schwarzott <zzam@gentoo.org>
Cc: Douglas Schilling Landgraf <dougsland@redhat.com>
Cc: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/dvb/frontends/l64781.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/media/dvb/frontends/l64781.c
+++ b/drivers/media/dvb/frontends/l64781.c
@@ -192,8 +192,8 @@ static int apply_frontend_param (struct
 	spi_bias *= qam_tab[p->constellation];
 	spi_bias /= p->code_rate_HP + 1;
 	spi_bias /= (guard_tab[p->guard_interval] + 32);
-	spi_bias *= 1000ULL;
-	spi_bias /= 1000ULL + ppm/1000;
+	spi_bias *= 1000;
+	spi_bias /= 1000 + ppm/1000;
 	spi_bias *= p->code_rate_HP;
 
 	val0x04 = (p->transmission_mode << 2) | p->guard_interval;

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

end of thread, other threads:[~2010-02-09 23:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 23:16 [PATCH] dvb: l64781.ko broken with gcc 4.5 Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2010-02-09 23:16 Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox