From patchwork Thu Oct 29 14:18:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 55778 Delivered-To: patch@linaro.org Received: by 10.202.175.130 with SMTP id y124csp451193oie; Thu, 29 Oct 2015 07:22:44 -0700 (PDT) X-Received: by 10.141.23.82 with SMTP id z79mr2709301qhd.39.1446128563986; Thu, 29 Oct 2015 07:22:43 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q1si1427102qki.20.2015.10.29.07.22.43; Thu, 29 Oct 2015 07:22:43 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 5B32962BC4; Thu, 29 Oct 2015 14:22:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 95BDA6205B; Thu, 29 Oct 2015 14:22:39 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 65A116205D; Thu, 29 Oct 2015 14:22:37 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id 7B1E262059 for ; Thu, 29 Oct 2015 14:22:36 +0000 (UTC) Received: by lfaz124 with SMTP id z124so19570566lfa.1 for ; Thu, 29 Oct 2015 07:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=PfM+hKvAGVNtwPWoR4OaaTJ1tOe8LSmSvCrAUHJ3ULo=; b=TTj36S6ao3HVg+QFyq7/xZ/KZdHUs7OHFQ6n26+glSsXuGE40ENl8Biw9fuCRJEY8Z lujW0aQtuM9Xys1lGM88lwfo5+IG/IPERFjpqdjjmGTKc9KyLYHTU583Yxcpo+J38rnC d7xUgU4oQl4D5JJFVxqPAnK4Dq24OoqoNj7paCPx+oCiSvc9JLd/9FyPvSfpQL8gnVlb t31j54EsKW1nIVgdvKv70AbHOAEMcBTEGd01/sq9IAHf4A6H1DKiQXOnIM8vqaQXlNzs avPkO/3aXNAX8rFTJbmiEQn91b1vROM788Fb7C63gn7DVKf7YpbtKufM/kWWYLRWBF8x 2Y5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PfM+hKvAGVNtwPWoR4OaaTJ1tOe8LSmSvCrAUHJ3ULo=; b=RYp/ha47AL8VEVlJKSh3KePVe0NHD42dzb38LuIIZA2Ly1ERxlUg7Yfj8XV0Q1kSgr 0XLJw7BdBEpbjJIzFZWTv7zccImuaFeSVqkwEOLmBYaiOv2TtDiDwTRaZkF/nkGDoeVg xLDhhHGQgcMUvOngCmPSvXpGK/lhG/QKsEe0aROt2ZTkaE94uxPcAOw3RLQMc6yBP6cP fq4YdJNVHDTkjNdGgXj3l+nNMkm/POMmyQ/SJvLlljau9npH8qwnJQSWOw9gx9t3/mpo PpvKWBddyREEsdIalhRwMpx8c1vKtfVN1pTBa1Nq82sfS9WsCfhXMrLWVHLbPZOT3vsK Xr2g== X-Gm-Message-State: ALoCoQmYArsp28reBJ1u2iVq0IICaxXLIzgS2KRtm2atI5BhTbxZEWrSrLcTLq50d7mTC+f3G8ra X-Received: by 10.25.138.68 with SMTP id m65mr749090lfd.101.1446128554562; Thu, 29 Oct 2015 07:22:34 -0700 (PDT) Received: from localhost (c-893970d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.57.137]) by smtp.gmail.com with ESMTPSA id f8sm375443lbv.6.2015.10.29.07.22.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 07:22:34 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Thu, 29 Oct 2015 15:18:26 +0100 Message-Id: <1446128307-9588-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [PATCH 1/2] linux-generic: odp_cpumask.c: assert on ODP_CPUMASK_SIZE X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The API definition of a CPU mask must not be incompatible with the platform it is implemented on Signed-off-by: Anders Roxell Reviewed-by: Mike Holmes --- platform/linux-generic/odp_cpumask.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c index b31e1ca..5cd6a38 100644 --- a/platform/linux-generic/odp_cpumask.c +++ b/platform/linux-generic/odp_cpumask.c @@ -16,6 +16,10 @@ #include #include +/** @internal Compile time assert */ +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, + "ODP_CPUMASK_SIZE__SIZE_ERROR"); + void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) { cpu_set_t cpuset;