From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 285FEC43464 for ; Fri, 18 Sep 2020 02:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD98E23730 for ; Fri, 18 Sep 2020 02:38:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600396706; bh=Suje01sTHXjtr2Mbt1BEurSgvN9caH/Qk6Ts4WpiS1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gIG592SIGBRE6fGDWRUznnncV1L1OguP9h2yfaY6AfPSD59sRElKJPLUA2FzVtvqd G05Y4RUvis31Udb4QGWzNYC0hGoCUQeL0q8CXxBWUypzHnjaK+ulvNEtxwLI3BmMI4 d3kzW6iRuhgk6AeuMeZVMUrnBYljbNK1nM3nOvlw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730127AbgIRCi0 (ORCPT ); Thu, 17 Sep 2020 22:38:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:38818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728764AbgIRCMZ (ORCPT ); Thu, 17 Sep 2020 22:12:25 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFB7323447; Fri, 18 Sep 2020 02:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600395136; bh=Suje01sTHXjtr2Mbt1BEurSgvN9caH/Qk6Ts4WpiS1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=COCpVlj37we7JfVVyEhvZQoRlrD3Q9EDBPizLn5l+bewEAbGaJhOpjPd6qeBWvyBV tjeNEHRP3S0veJL/x5wYePE3ee9GOEiWBntYZGRuKerVwRKw4V1bRbZ5iW/Z6EjRlf Mfhe4KYRlbmsuUBNoB6IM+CYIfiPtWfdRkcHxFy8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tonghao Zhang , kbuild test robot , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, dev@openvswitch.org Subject: [PATCH AUTOSEL 4.19 205/206] net: openvswitch: use div_u64() for 64-by-32 divisions Date: Thu, 17 Sep 2020 22:08:01 -0400 Message-Id: <20200918020802.2065198-205-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020802.2065198-1-sashal@kernel.org> References: <20200918020802.2065198-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tonghao Zhang [ Upstream commit 659d4587fe7233bfdff303744b20d6f41ad04362 ] Compile the kernel for arm 32 platform, the build warning found. To fix that, should use div_u64() for divisions. | net/openvswitch/meter.c:396: undefined reference to `__udivdi3' [add more commit msg, change reported tag, and use div_u64 instead of do_div by Tonghao] Fixes: e57358873bb5d6ca ("net: openvswitch: use u64 for meter bucket") Reported-by: kbuild test robot Signed-off-by: Tonghao Zhang Tested-by: Tonghao Zhang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/openvswitch/meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index 6f5131d1074b0..5ea2471ffc03f 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -256,7 +256,7 @@ static struct dp_meter *dp_meter_create(struct nlattr **a) * Start with a full bucket. */ band->bucket = (band->burst_size + band->rate) * 1000ULL; - band_max_delta_t = band->bucket / band->rate; + band_max_delta_t = div_u64(band->bucket, band->rate); if (band_max_delta_t > meter->max_delta_t) meter->max_delta_t = band_max_delta_t; band++; -- 2.25.1