From patchwork Tue Jun 25 14:11:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 167726 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5607070ilk; Tue, 25 Jun 2019 07:11:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgRind+1V0VY53++zVGRNPGM+bnEB0hPoPw6HWJZslnZrlzz5P8xVOKb+2XFSiphjZkn+v X-Received: by 2002:a63:4104:: with SMTP id o4mr40392580pga.345.1561471911458; Tue, 25 Jun 2019 07:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561471911; cv=none; d=google.com; s=arc-20160816; b=IS3raMDUmbSfLM+S1LthlNXvh2/UTN8jFOnTOyAWn62RWVC7YU0FGiCp8HwYRa0DqA jTXrAJ3c2Q+C1t8GJ32YoOEvU/znOXG9GSP2XSfDhKrQyPMQ9p1+BmVBTY7imyHyjvGb 2XLMDv8raCR2jMjUCON5+W9F2KlTqIh07X7Y+yr58lIBfbaxyXSavcemVSFwa2sk7bwC WnQIoXcqxc+KyZPMeQa3oo40X0IZVL0q6xOH0vbchz4doQ6MGNN6+VmUIooz2Fn2Sja/ 7GGivFZLPuLna9NC0Fz7HLlYI1Kyax8am4yWS0AC/vgXZ0ro3v25vdW67g4ddUC/nTVJ B03A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=gYuJuPOZBk4Y/I55Xfw4nMllA34HbJMTlhwO9fs6sKE=; b=D5G+6D2ATsmblSkpXZON6jozca8WXz4TwQ9KR3ktHaHdh+M2W86dGVA2x/cM/NwHic jMfm/v6kJxAKhuyxIzXmQAd6imt3qi27HsyoDhIj37ah/XN/7ngHCbEkCy1QR5DddvRW +xfcgDMbTgH9eHkPZ1zwKwkmxxtW1Dx70bKuzApvy2FXFZXhBLT4YhbfRG1A7IuZOev0 GxcHWqvW6jBep0yTftMCO2dWBBC22tBt18evd05RM+wXTbqSHghY400u0d0Zjc182Toc zrtAp/D6gE7tb62zBC7Gx/8p0wfTSSN/gl8E6eP0diux1kvTdZkeQHVYIdQPV6RGUWW0 Yy/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RrGdRYr/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si2730833pjt.87.2019.06.25.07.11.50; Tue, 25 Jun 2019 07:11:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="RrGdRYr/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729905AbfFYOLt (ORCPT + 30 others); Tue, 25 Jun 2019 10:11:49 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44100 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbfFYOLt (ORCPT ); Tue, 25 Jun 2019 10:11:49 -0400 Received: by mail-lf1-f67.google.com with SMTP id r15so12712418lfm.11 for ; Tue, 25 Jun 2019 07:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=gYuJuPOZBk4Y/I55Xfw4nMllA34HbJMTlhwO9fs6sKE=; b=RrGdRYr/3/VMp2ftn6ZpAtSc6E+i+LepBHyiDnqE/7RSQxXYyCk/+3N4RfHuaFPwBu tIT+EtcczTiCbyoETK9FM7l3NGlIumcG6DYtRf3yuUjQSV7eqRrigrh+UhqQXjwI/r3U bjZLIwU1ZHKJRXRetaNlUJOVk7rWnS43NZ62J+z3IbLnaZBQBMXcMAJ4C+ju6cBs/aTM I9q/W4hvLc3xIQrLRpTUM7BNPSTU6K6BwCmHP3JfUAuE48Etj+TfO8o6DoYAAdGyw3v9 ZsUT2Xxnmc7jwRXmX6+6VY8PJcUE9q5Qg696QWBZkYlRbffGARZ+SgiXI8ceAwTc78bc Ouzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gYuJuPOZBk4Y/I55Xfw4nMllA34HbJMTlhwO9fs6sKE=; b=eoYz3BygyUmG68L6uJUp7LAz/d1njED/6Qf38QGSzNTLdcqpX3k5cVJFlPbQRAqiG0 26j3CexrS2WPxwmfFICgxl9pwW02O3F0MS2N7Y3xwDOyXxrkwC56d7OxBhkAIiC3X6nc skALwCUxHRV53WHVth4BdDgw9Xa4VT6QUE/CIXu0Ur6DU2GckGOwW5izrPv4CMLqCI8D fd1s8MtkQ/yg+ftp2E02qFU70Sekk15BTbHeigTaHD1PQZfYm0PaxtKhJiDRlwRfO6U8 qazgLrABeEHBsHLT9sDa/kPioY8gWbOOd236uU37XbSdblQknBn2aj2nLP9RDk5l7eCb 4k/A== X-Gm-Message-State: APjAAAV+90RxtncUpr70L8vI/o0a9pnOYOFRG3QbJ6dRoTbv1Jq7ha3S ZNzpJ293G63Esw2nxUAPmcsaLA== X-Received: by 2002:ac2:4901:: with SMTP id n1mr2442751lfi.153.1561471906859; Tue, 25 Jun 2019 07:11:46 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id z12sm1971522lfg.67.2019.06.25.07.11.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 25 Jun 2019 07:11:46 -0700 (PDT) From: Ivan Khoronzhuk To: ast@kernel.org, netdev@vger.kernel.org Cc: daniel@iogearbox.net, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] tools: lib: bpf: libbpf: fix max() type mistmatch for 32bit Date: Tue, 25 Jun 2019 17:11:42 +0300 Message-Id: <20190625141142.2378-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It fixes build error for 32bit coused by type mistmatch size_t/unsigned long. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 4259c9f0cfe7..d03016a559e2 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -778,7 +778,7 @@ static struct bpf_map *bpf_object__add_map(struct bpf_object *obj) if (obj->nr_maps < obj->maps_cap) return &obj->maps[obj->nr_maps++]; - new_cap = max(4ul, obj->maps_cap * 3 / 2); + new_cap = max((size_t)4, obj->maps_cap * 3 / 2); new_maps = realloc(obj->maps, new_cap * sizeof(*obj->maps)); if (!new_maps) { pr_warning("alloc maps for object failed\n");