From patchwork Wed Oct 18 22:47:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Costa Gomes X-Patchwork-Id: 827840 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yHRys4nL1z9t6N for ; Thu, 19 Oct 2017 09:47:33 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751048AbdJRWrb (ORCPT ); Wed, 18 Oct 2017 18:47:31 -0400 Received: from mga02.intel.com ([134.134.136.20]:40554 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbdJRWrb (ORCPT ); Wed, 18 Oct 2017 18:47:31 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2017 15:47:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,398,1503385200"; d="scan'208";a="1232405669" Received: from ellie.jf.intel.com (HELO localhost.localdomain) ([10.24.13.71]) by fmsmga002.fm.intel.com with ESMTP; 18 Oct 2017 15:47:29 -0700 From: Vinicius Costa Gomes To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Cc: Vinicius Costa Gomes , jeffrey.t.kirsher@intel.com, jesus.sanchez-palencia@intel.com Subject: [next-queue PATCH] net/sched/sch_cbs: Fix compilation on 32bit architectures Date: Wed, 18 Oct 2017 15:47:03 -0700 Message-Id: <20171018224703.15454-1-vinicius.gomes@intel.com> X-Mailer: git-send-email 2.14.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There was still a couple of divisions of 64bit quantities happening, which can fail to compile if there aren't instructions to handle that kind of division. It will fail with a message like this: ERROR: "__aeabi_ldivmod" [net/sched/sch_cbs.ko] undefined! Signed-off-by: Vinicius Costa Gomes --- net/sched/sch_cbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c index cae021c642e5..bdb533b7fb8c 100644 --- a/net/sched/sch_cbs.c +++ b/net/sched/sch_cbs.c @@ -331,8 +331,8 @@ static int cbs_dump(struct Qdisc *sch, struct sk_buff *skb) opt.hicredit = q->hicredit; opt.locredit = q->locredit; - opt.sendslope = q->sendslope / BYTES_PER_KBIT; - opt.idleslope = q->idleslope / BYTES_PER_KBIT; + opt.sendslope = div64_s64(q->sendslope, BYTES_PER_KBIT); + opt.idleslope = div64_s64(q->idleslope, BYTES_PER_KBIT); opt.offload = q->offload; if (nla_put(skb, TCA_CBS_PARMS, sizeof(opt), &opt))