From patchwork Fri Jun 5 18:05:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 6557181 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0DA2FC0020 for ; Fri, 5 Jun 2015 18:05:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F193B20615 for ; Fri, 5 Jun 2015 18:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9C97206D4 for ; Fri, 5 Jun 2015 18:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbFESF2 (ORCPT ); Fri, 5 Jun 2015 14:05:28 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:32842 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbbFESF1 (ORCPT ); Fri, 5 Jun 2015 14:05:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=RDqZQ33wi1ggDXkshKjmJRAWkCvXpk6efJYnZGaN6g0=; b=UXcVcg9PBYkWAv72cGkDJVF6+b5jpNzqz5Xe9TZu57en5CAx8GBefNQwjCgrolyNu/OsrhtvVagsEI7NV50o7IIUbmw9FcFRV0cxO67RlK9mocgh6FWe9PFoB0VnXSzruLSSd9nabpy8BSx3S8d6MQk/O2Q8jVKyEdmMiQAqXtQ=; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:52097 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.85) (envelope-from ) id 1Z0vzg-001rbO-8D; Fri, 05 Jun 2015 18:05:24 +0000 From: Guenter Roeck To: Benjamin Herrenschmidt Cc: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck , Tina Ruchandani Subject: [PATCH -next] fbdev: radeon: Avoid 64 bit divide Date: Fri, 5 Jun 2015 11:05:21 -0700 Message-Id: <1433527521-5384-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.1.0 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 A 64 bit divide causes build failures with 32 bit builds, such as ERROR: "__divdi3" [drivers/video/fbdev/aty/radeonfb.ko] undefined! or drivers/built-in.o: In function `radeon_probe_pll_params': radeon_base.c:(.text+0x16608b): undefined reference to `__divdi3' Fixes: ce8f4069dce8 ("fbdev: radeon: Remove 'struct timeval' usage") Cc: Tina Ruchandani Signed-off-by: Guenter Roeck --- drivers/video/fbdev/aty/radeon_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index b3612e30d74f..374e47532035 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -492,7 +492,7 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo) /* Return -1 if more than 10 seconds have elapsed */ if (delta > (10*1000000)) return -1; - hz = 1000000/delta; + hz = 1000000 / (int)delta; hTotal = ((INREG(CRTC_H_TOTAL_DISP) & 0x1ff) + 1) * 8; vTotal = ((INREG(CRTC_V_TOTAL_DISP) & 0x3ff) + 1);