public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Matthias Schwarzott <zzam@gentoo.org>,
	Douglas Schilling Landgraf <dougsland@redhat.com>,
	Andreas Oberritter <obi@linuxtv.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andreas Gruenbacher <agruen@suse.de>
Subject: [PATCH] dvb: l64781.ko broken with gcc 4.5
Date: Tue, 9 Feb 2010 15:16:03 -0800	[thread overview]
Message-ID: <20100209231603.GA22588@kroah.com> (raw)

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;

             reply	other threads:[~2010-02-09 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 23:16 Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-09 23:16 [PATCH] dvb: l64781.ko broken with gcc 4.5 Greg KH

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=20100209231603.GA22588@kroah.com \
    --to=gregkh@suse.de \
    --cc=agruen@suse.de \
    --cc=dougsland@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=obi@linuxtv.org \
    --cc=zzam@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox