From: Antti Palosaari <crope@iki.fi>
To: Gianluca Gennari <gennarone@gmail.com>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com
Subject: Re: [PATCH 3/3] fc2580: use macro for 64 bit division and reminder
Date: Mon, 24 Sep 2012 14:55:52 +0300 [thread overview]
Message-ID: <50604A48.7050900@iki.fi> (raw)
In-Reply-To: <1348486638-31169-4-git-send-email-gennarone@gmail.com>
On 09/24/2012 02:37 PM, Gianluca Gennari wrote:
> Fixes the following warnings on a 32 bit system with GCC 4.4.3 and kernel Ubuntu 2.6.32-43 32 bit:
>
> WARNING: "__udivdi3" [fc2580.ko] undefined!
> WARNING: "__umoddi3" [fc2580.ko] undefined!
>
> Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
> ---
> drivers/media/tuners/fc2580.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
> index 3ad68e9..2e8ebac 100644
> --- a/drivers/media/tuners/fc2580.c
> +++ b/drivers/media/tuners/fc2580.c
> @@ -168,8 +168,7 @@ static int fc2580_set_params(struct dvb_frontend *fe)
> }
>
> f_ref = 2UL * priv->cfg->clock / r_val;
> - n_val = f_vco / f_ref;
> - k_val = f_vco % f_ref;
> + n_val = div_u64_rem(f_vco, f_ref, &k_val);
> k_val_reg = 1UL * k_val * (1 << 20) / f_ref;
>
> ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff));
>
--
http://palosaari.fi/
prev parent reply other threads:[~2012-09-24 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 11:37 [PATCH 0/3] Fix several warnings on new fc2580 tuner driver Gianluca Gennari
2012-09-24 11:37 ` [PATCH 1/3] fc2580: define const as UL to silence a warning Gianluca Gennari
2012-09-24 11:52 ` Antti Palosaari
2012-09-24 11:37 ` [PATCH 2/3] fc2580: silence uninitialized variable warning Gianluca Gennari
2012-09-24 11:55 ` Antti Palosaari
2012-09-24 11:37 ` [PATCH 3/3] fc2580: use macro for 64 bit division and reminder Gianluca Gennari
2012-09-24 11:55 ` Antti Palosaari [this message]
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=50604A48.7050900@iki.fi \
--to=crope@iki.fi \
--cc=gennarone@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/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.