From patchwork Wed Feb 25 12:58:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 45051 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1D58220502 for ; Wed, 25 Feb 2015 12:59:19 +0000 (UTC) Received: by wesw55 with SMTP id w55sf2771949wes.0 for ; Wed, 25 Feb 2015 04:59:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=2+TPHSUue4q4OPe10ssvhKSZaYAtW3VaiCOenhaH9p8=; b=YlHSPtbNPz/cRv5Xs/AYKAEX6lBFLxPZ89MWiKedGjMGXq8dx/ccME3lBSnE8Ru2Y8 bI3JEiUlShsIUCLlpa6DvP4dKb36NNw0OYEG9siKkKvmHLm8DlHOVtFEoxcrnAHNUSyS e9VQBmLYRzprudrrYVPScFQbUl2KVrHx/RjzqQI++9WFjB/N1yFHp2H8/0jOC1ncaGDo YLA46clAk783ru3Ow+g70U+2k1El+TwPV1O44XvQBZ11nkce89SLgSk7zvxstHQxZdXW YEWEfWRha5QUTXmqRs43rxzxzNCGkdcfph55Ln47O3G1VHiOk9AlfO6/K9+umiUm+6SR 9fHA== X-Gm-Message-State: ALoCoQliydhILDGA4IA+o9uPf6KGDhkUhdY1TklUmrT+Ornk1Xt3UQYmFrtJxw+OiFHiYHi4jPrn X-Received: by 10.112.219.102 with SMTP id pn6mr452947lbc.12.1424869158364; Wed, 25 Feb 2015 04:59:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.9 with SMTP id p9ls745402lag.86.gmail; Wed, 25 Feb 2015 04:59:18 -0800 (PST) X-Received: by 10.152.205.41 with SMTP id ld9mr1866423lac.98.1424869158084; Wed, 25 Feb 2015 04:59:18 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id ao10si30760816lac.42.2015.02.25.04.59.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 04:59:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lamq1 with SMTP id q1so3652189lam.5 for ; Wed, 25 Feb 2015 04:59:18 -0800 (PST) X-Received: by 10.152.116.18 with SMTP id js18mr2682385lab.106.1424869157753; Wed, 25 Feb 2015 04:59:17 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2599905lbj; Wed, 25 Feb 2015 04:59:17 -0800 (PST) X-Received: by 10.140.51.107 with SMTP id t98mr6083968qga.63.1424869156553; Wed, 25 Feb 2015 04:59:16 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id i65si33964955qhc.54.2015.02.25.04.59.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 04:59:16 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQbYU-00088N-Ci; Wed, 25 Feb 2015 12:59:10 +0000 Received: from mail-qa0-f41.google.com ([209.85.216.41]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQbYL-00085l-LE for lng-odp@lists.linaro.org; Wed, 25 Feb 2015 12:59:01 +0000 Received: by mail-qa0-f41.google.com with SMTP id x12so2546186qac.0 for ; Wed, 25 Feb 2015 04:58:56 -0800 (PST) X-Received: by 10.229.78.137 with SMTP id l9mr6844049qck.11.1424869136451; Wed, 25 Feb 2015 04:58:56 -0800 (PST) Received: from mcpro03.emea.nsn-net.net (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id o10sm21934164qag.9.2015.02.25.04.58.53 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Feb 2015 04:58:54 -0800 (PST) From: Petri Savolainen To: lng-odp@lists.linaro.org Date: Wed, 25 Feb 2015 14:58:28 +0200 Message-Id: <1424869109-930-3-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1424869109-930-1-git-send-email-petri.savolainen@linaro.org> References: <1424869109-930-1-git-send-email-petri.savolainen@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 3/4] api: cpumask: replace ssize_t with int32_t X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: petri.savolainen@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 ssize_t is a POSIX type. API definition must be pure C (C99). Signed 32 bits can hold larger values than size_t (64k) and ssize_t(32k) in minimum. Signed-off-by: Petri Savolainen --- include/odp/api/cpumask.h | 3 +-- platform/linux-generic/odp_cpumask.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/odp/api/cpumask.h b/include/odp/api/cpumask.h index 21dfb1b..dbac7b9 100644 --- a/include/odp/api/cpumask.h +++ b/include/odp/api/cpumask.h @@ -18,7 +18,6 @@ extern "C" { #endif -#include #include /** @addtogroup odp_scheduler @@ -50,7 +49,7 @@ void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str); * @return number of characters written (including terminating null char) * @retval <0 on failure (buffer too small) */ -ssize_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, ssize_t size); +int32_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, int32_t size); /** * Clear entire CPU mask diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c index 7abf593..0ca1071 100644 --- a/platform/linux-generic/odp_cpumask.c +++ b/platform/linux-generic/odp_cpumask.c @@ -8,7 +8,6 @@ #define _GNU_SOURCE #endif #include -#include #include #include @@ -61,7 +60,7 @@ void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) memcpy(&mask->set, &cpuset, sizeof(cpuset)); } -ssize_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, ssize_t len) +int32_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, int32_t len) { char *p = str; int cpu = odp_cpumask_last(mask);