From patchwork Fri Dec 20 10:14:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3388441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C6C369F314 for ; Fri, 20 Dec 2013 13:17:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B63EA206F2 for ; Fri, 20 Dec 2013 13:17:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BD0320656 for ; Fri, 20 Dec 2013 13:17:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433Ab3LTNRV (ORCPT ); Fri, 20 Dec 2013 08:17:21 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:54459 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932321Ab3LTNRV (ORCPT ); Fri, 20 Dec 2013 08:17:21 -0500 Received: from [177.143.133.66] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtzx8-00015O-JP; Fri, 20 Dec 2013 13:17:18 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1Vtx5x-0006b9-Sa; Fri, 20 Dec 2013 08:14:13 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH] [media] dib8000: fix compilation error Date: Fri, 20 Dec 2013 08:14:06 -0200 Message-Id: <1387534446-25329-1-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.3.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As reported by kbuild test robot : with a random config: drivers/built-in.o: In function `dib8000_get_time_us.isra.16': >> dib8000.c:(.text+0x3075aa): undefined reference to `__udivdi3' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/dib8000.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index 7539d7af2cf7..481ee49e6a37 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -3951,7 +3951,7 @@ static u32 dib8000_get_time_us(struct dvb_frontend *fe, int layer) struct dib8000_state *state = fe->demodulator_priv; struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache; int ini_layer, end_layer, i; - u64 time_us; + u64 time_us, tmp64; u32 tmp, denom; int guard, rate_num, rate_denum, bits_per_symbol, nsegs; int interleaving, fft_div; @@ -4048,7 +4048,9 @@ static u32 dib8000_get_time_us(struct dvb_frontend *fe, int layer) /* Estimate the period for the total bit rate */ time_us = rate_denum * (1008 * 1562500L); - time_us = time_us + time_us / guard; + tmp64 = time_us; + do_div(tmp64, guard); + time_us = time_us + tmp64; time_us += denom / 2; do_div(time_us, denom);