Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFDF2C43217 for ; Thu, 1 Dec 2022 20:53:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B87B8526B; Thu, 1 Dec 2022 21:53:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=krinvent.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=krinvent.dk header.i=@krinvent.dk header.b="FDkluRuK"; dkim=permerror (0-bit key) header.d=krinvent.dk header.i=@krinvent.dk header.b="Mp5vK9us"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 213C385425; Thu, 1 Dec 2022 16:30:53 +0100 (CET) Received: from mailrelay2-3.pub.mailoutpod2-cph3.one.com (mailrelay2-3.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:501::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4B8E585427 for ; Thu, 1 Dec 2022 16:30:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=krinvent.dk Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=kasper@krinvent.dk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=krinvent.dk; s=rsa1; h=content-transfer-encoding:mime-version:message-id:date:subject:cc:to:from: from; bh=5Y3iyWsAacwWX9QkO+xd6JP76eMnDeAiqP2WNGi7DjA=; b=FDkluRuKdPDbpm/nr+uRvpa0OXbilpoHt0YnDmn4NulHLOA/SExHlxYGqTMpjcZbNuOsvsUWNduU5 Ib+0IJlQPwRA9ppiMapme4uWPA6lRuKdhyX1WTPlBm9CmtGJJdc+omyMJbO6k8WTYeEnghvPE541Yw 5EOI/6hv+hZAcbh1nNJTUnLqy+FNNqSASXlEzGpucknfd+PHgIZigMe6tWkskci98txAcOZK0OsPHx Vmyo+6dh6AFVjBIXqm/ALFB6a9/IUxb4xhXR/WWQihxUoY7wlHFVAfYhX9NCC1jdIv2hcj0cnxIga+ DYzv4qfZLtMkH+BtmeCsYKW+BeRC20w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=krinvent.dk; s=ed1; h=content-transfer-encoding:mime-version:message-id:date:subject:cc:to:from: from; bh=5Y3iyWsAacwWX9QkO+xd6JP76eMnDeAiqP2WNGi7DjA=; b=Mp5vK9usx2n2R5UJ0vvtW0+ahqSzuBz6Ir+koYHDIV+Tfsqfo5r6mfiGttY2kTac2KZ4OVnxvrPUE HvdBQksAw== X-HalOne-ID: 1ee66df5-718d-11ed-821b-0d21f6ece167 Received: from ubuntu.localdomain (unknown [87.104.84.103]) by mailrelay2 (Halon) with ESMTPSA id 1ee66df5-718d-11ed-821b-0d21f6ece167; Thu, 01 Dec 2022 15:30:44 +0000 (UTC) From: kasper@krinvent.dk To: u-boot@lists.denx.de Cc: sean@geanix.com, Kasper Revsbech Subject: [PATCH] fs/squashfs: use lldiv function for math Date: Thu, 1 Dec 2022 16:30:32 +0100 Message-Id: <20221201153032.566071-1-kasper@krinvent.dk> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 01 Dec 2022 21:53:14 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Kasper Revsbech When compling for x86: u-boot/fs/squashfs/sqfs.c:90: undefined reference to `__udivmoddi4' Signed-off-by: Kasper Revsbech --- fs/squashfs/sqfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index 74ca70c3ff..4226621923 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -87,7 +87,7 @@ static int sqfs_calc_n_blks(__le64 start, __le64 end, u64 *offset) u64 start_, table_size; table_size = le64_to_cpu(end) - le64_to_cpu(start); - start_ = le64_to_cpu(start) / ctxt.cur_dev->blksz; + start_ = lldiv(le64_to_cpu(start), ctxt.cur_dev->blksz); *offset = le64_to_cpu(start) - (start_ * ctxt.cur_dev->blksz); return DIV_ROUND_UP(table_size + *offset, ctxt.cur_dev->blksz); -- 2.34.1