Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761940AbYBZPff (ORCPT ); Tue, 26 Feb 2008 10:35:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756527AbYBZPf0 (ORCPT ); Tue, 26 Feb 2008 10:35:26 -0500 Received: from smtp5.pp.htv.fi ([213.243.153.39]:48406 "EHLO smtp5.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753808AbYBZPfZ (ORCPT ); Tue, 26 Feb 2008 10:35:25 -0500 Date: Tue, 26 Feb 2008 17:34:21 +0200 From: Adrian Bunk To: Martin Michlmayr Cc: linux-kernel@vger.kernel.org, Evgeniy Polyakov , Herbert Xu , Ralf Baechle , linux-crypto@vger.kernel.org Subject: [2.6.25 patch] drivers/crypto/hifn_795x.c: fix 64bit division Message-ID: <20080226153421.GB10717@cs181133002.pp.htv.fi> References: <20080226122100.GB22699@deprecation.cyrius.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080226122100.GB22699@deprecation.cyrius.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1408 Lines: 60 On Tue, Feb 26, 2008 at 01:21:00PM +0100, Martin Michlmayr wrote: > With 2.6.25-rc3 and a config file with > > CONFIG_CRYPTO_DEV_HIFN_795X=m > CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y > > I get the following build error on at least ARM and MIPS: > > Building modules, stage 2. > MODPOST 759 modules > ERROR: "__divdi3" [drivers/crypto/hifn_795x.ko] undefined! Fix below. > Martin Michlmayr cu Adrian <-- snip --> Using ndelay() with a 64bit variable as parameter can result in build errors like the following on some 32bit systems when it results in a 64bit division: <-- snip --> ... MODPOST 759 modules ERROR: "__divdi3" [drivers/crypto/hifn_795x.ko] undefined! <-- snip --> Reported by Martin Michlmayr. Signed-off-by: Adrian Bunk --- 40b45041ddc587c20b872a86a6a36952c28b02c7 diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 3110bf7..b1541c6 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -807,7 +807,7 @@ static int hifn_rng_data_present(struct hwrng *rng, int wait) return 1; if (!wait) return 0; - ndelay(nsec); + ndelay((u32)nsec); return 1; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/