Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp855164pxk; Thu, 17 Sep 2020 19:12:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgjHt4Np9XosLK8ZH8FRm/PYmaX1ywYaTlUYZcrgVTLfKm43GtI2/LWkgcmhcbmeTv5g8l X-Received: by 2002:a17:906:5509:: with SMTP id r9mr11951934ejp.12.1600395150143; Thu, 17 Sep 2020 19:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600395150; cv=none; d=google.com; s=arc-20160816; b=qfLBTSS2h10VUTAXCuOAdaSEeBlEcgS/Al+l1ett42qrczM3AsBa5g2ijdbhHWVGnj mmCdi8iAznrgASZgTijVm0LPpaxhqI0YtlZwS0nMNR60Kjg9LLNOzffRSbWJVWz/3RK1 AVaDTtWHnebolZbEystg7SfKxPXZ7ZPqxjylVbjOCH49D5pKpYg6Ervi0M9VuHh1wDOf odmx4WCKt8OVorJF2JQQmKsmyvRwXxzsgoyAkoNzPRfMZS8AKYCmRC8dJLS/vnaAE6Lj uENYVD0wWg4ggsI1NVOH6GRiIre1vuispVJPDGUfHpqcKepThFcFpbHrYVz3pXfkrtdb XZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ybmie4or0Gg7jUmsSi5JBvST40HNPvNCqn/rwum0zEw=; b=aSWrJhZaKu+JjM8MruD1uDxfWkxYVyreqB45mUYEiRgi4loilv3C5h9gfxWaxs/Djx V5llnT8VEwhqOgLErFcd6j2KfcYQu+uE6BxU1pxLH1JCzZLsOlk6Y6VfzGaVy/JjRSm3 gRxjj1lI0nkepxqI9wym3anUgnckPIE/EZXM6yrenXy/mMREZmVvuxuUg8+N4IlW+5Ok k1lrfk1VLtQ52LlYQAJ9aOXbfHKcYf7NiTqvMFX+Quqy0dQSjtnEwF/gE7EcjQjv+rjX uOLb6TNp2BNqjURYcO0i1/GEzCQuIv7BRXC5LB9YS9eveF0GjhgDWJ/WzYZ+NTTUWKqh bhbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gqbM3W/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si1123951ejf.251.2020.09.17.19.12.07; Thu, 17 Sep 2020 19:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gqbM3W/2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbgIRCIL (ORCPT + 99 others); Thu, 17 Sep 2020 22:08:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:58770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbgIRCH7 (ORCPT ); Thu, 17 Sep 2020 22:07:59 -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 13914238E6; Fri, 18 Sep 2020 02:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394878; bh=4zji7kO56KNjZJWuPPEOjuUOSyq/gsT+aV46e7NqiQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gqbM3W/2A5gQM2WmUO2UNsE54WB+TBMAVf8lckUW7n+vB8bqVQqlc4xWY6rTqzOz5 eyfvvYPOhEiUEwR/vd1DQVN6gMnQq1omeKcCC5qYssuR7wxhvPZQjIwxUfon58V1JL lWFDSe1zLuSnEtt6zK7tCA1O1XnovYjkIZioKvek= 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 5.4 329/330] net: openvswitch: use div_u64() for 64-by-32 divisions Date: Thu, 17 Sep 2020 22:01:09 -0400 Message-Id: <20200918020110.2063155-329-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-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 b10734f18bbd6..541eea74ef7a6 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -252,7 +252,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