All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* rtl2830: __udivdi3 undefined
@ 2012-02-29 21:30 Geert Uytterhoeven
  2012-03-04 22:19 ` Gianluca Gennari
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2012-02-29 21:30 UTC (permalink / raw
  To: Antti Palosaari, Mauro Carvalho Chehab; +Cc: linux-media, Linux-Next

http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/
ERROR: "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!

I didn't look too deeply into it, but I think it's caused by the "num
/= priv->cfg.xtal"
in rtl2830_init() (with num being u64).

Can't it use do_div() instead?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: rtl2830: __udivdi3 undefined
  2012-02-29 21:30 rtl2830: __udivdi3 undefined Geert Uytterhoeven
@ 2012-03-04 22:19 ` Gianluca Gennari
  2012-03-06 18:02   ` Geert Uytterhoeven
  2012-03-12 19:58   ` Antti Palosaari
  0 siblings, 2 replies; 4+ messages in thread
From: Gianluca Gennari @ 2012-03-04 22:19 UTC (permalink / raw
  To: Geert Uytterhoeven, linux-media
  Cc: Antti Palosaari, Mauro Carvalho Chehab, Linux-Next

Il 29/02/2012 22:30, Geert Uytterhoeven ha scritto:
> http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/ ERROR:
> "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!
> 
> I didn't look too deeply into it, but I think it's caused by the
> "num /= priv->cfg.xtal" in rtl2830_init() (with num being u64).
> 
> Can't it use do_div() instead?
> 
> Gr{oetje,eeting}s,
> 
> Geert
> 
> -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
> geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a
> hacker. But when I'm talking to journalists I just say "programmer"
> or something like that. -- Linus Torvalds -- To unsubscribe from this
> list: send the line "unsubscribe linux-media" in the body of a
> message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> 

Probably the best solution is to use div_u64.
The following patch fixed the warning on my 32 bit system.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 drivers/media/dvb/frontends/rtl2830.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/rtl2830.c
b/drivers/media/dvb/frontends/rtl2830.c
index f971d94..45196c5 100644
--- a/drivers/media/dvb/frontends/rtl2830.c
+++ b/drivers/media/dvb/frontends/rtl2830.c
@@ -244,7 +244,7 @@ static int rtl2830_init(struct dvb_frontend *fe)

 	num = priv->cfg.if_dvbt % priv->cfg.xtal;
 	num *= 0x400000;
-	num /= priv->cfg.xtal;
+	num = div_u64(num, priv->cfg.xtal);
 	num = -num;
 	if_ctl = num & 0x3fffff;
 	dbg("%s: if_ctl=%08x", __func__, if_ctl);
-- 
1.7.0.4

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

* Re: rtl2830: __udivdi3 undefined
  2012-03-04 22:19 ` Gianluca Gennari
@ 2012-03-06 18:02   ` Geert Uytterhoeven
  2012-03-12 19:58   ` Antti Palosaari
  1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2012-03-06 18:02 UTC (permalink / raw
  To: gennarone; +Cc: linux-media, Antti Palosaari, Mauro Carvalho Chehab, Linux-Next

On Sun, Mar 4, 2012 at 23:19, Gianluca Gennari <gennarone@gmail.com> wrote:
> Probably the best solution is to use div_u64.
> The following patch fixed the warning on my 32 bit system.
>
> Signed-off-by: Gianluca Gennari <gennarone@gmail.com>

Thanks, that fixes it (div_u64() is do_div() on 32-bit).

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

> ---
>  drivers/media/dvb/frontends/rtl2830.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/rtl2830.c
> b/drivers/media/dvb/frontends/rtl2830.c
> index f971d94..45196c5 100644
> --- a/drivers/media/dvb/frontends/rtl2830.c
> +++ b/drivers/media/dvb/frontends/rtl2830.c
> @@ -244,7 +244,7 @@ static int rtl2830_init(struct dvb_frontend *fe)
>
>        num = priv->cfg.if_dvbt % priv->cfg.xtal;
>        num *= 0x400000;
> -       num /= priv->cfg.xtal;
> +       num = div_u64(num, priv->cfg.xtal);
>        num = -num;
>        if_ctl = num & 0x3fffff;
>        dbg("%s: if_ctl=%08x", __func__, if_ctl);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: rtl2830: __udivdi3 undefined
  2012-03-04 22:19 ` Gianluca Gennari
  2012-03-06 18:02   ` Geert Uytterhoeven
@ 2012-03-12 19:58   ` Antti Palosaari
  1 sibling, 0 replies; 4+ messages in thread
From: Antti Palosaari @ 2012-03-12 19:58 UTC (permalink / raw
  To: gennarone
  Cc: Geert Uytterhoeven, linux-media, Mauro Carvalho Chehab,
	Linux-Next

On 05.03.2012 00:19, Gianluca Gennari wrote:
> Il 29/02/2012 22:30, Geert Uytterhoeven ha scritto:
>> http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/ ERROR:
>> "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!
>>
>> I didn't look too deeply into it, but I think it's caused by the
>> "num /= priv->cfg.xtal" in rtl2830_init() (with num being u64).
>>
>> Can't it use do_div() instead?
>>
>> Gr{oetje,eeting}s,
>>
>> Geert
>>
>> -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
>> geert@linux-m68k.org
>>
>> In personal conversations with technical people, I call myself a
>> hacker. But when I'm talking to journalists I just say "programmer"
>> or something like that. -- Linus Torvalds -- To unsubscribe from this
>> list: send the line "unsubscribe linux-media" in the body of a
>> message to majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>>
>
> Probably the best solution is to use div_u64.
> The following patch fixed the warning on my 32 bit system.
>
> Signed-off-by: Gianluca Gennari<gennarone@gmail.com>
> ---
>   drivers/media/dvb/frontends/rtl2830.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/rtl2830.c
> b/drivers/media/dvb/frontends/rtl2830.c
> index f971d94..45196c5 100644
> --- a/drivers/media/dvb/frontends/rtl2830.c
> +++ b/drivers/media/dvb/frontends/rtl2830.c
> @@ -244,7 +244,7 @@ static int rtl2830_init(struct dvb_frontend *fe)
>
>   	num = priv->cfg.if_dvbt % priv->cfg.xtal;
>   	num *= 0x400000;
> -	num /= priv->cfg.xtal;
> +	num = div_u64(num, priv->cfg.xtal);
>   	num = -num;
>   	if_ctl = num&  0x3fffff;
>   	dbg("%s: if_ctl=%08x", __func__, if_ctl);

Acked-by: Antti Palosaari <crope@iki.fi>

I have been two weeks on skiing trip and since didn't acked that earlier.


regards
Antti

-- 
http://palosaari.fi/

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

end of thread, other threads:[~2012-03-12 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 21:30 rtl2830: __udivdi3 undefined Geert Uytterhoeven
2012-03-04 22:19 ` Gianluca Gennari
2012-03-06 18:02   ` Geert Uytterhoeven
2012-03-12 19:58   ` Antti Palosaari

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.