From patchwork Mon Jan 12 21:43:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 42975 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D50BE2055F for ; Mon, 12 Jan 2015 21:44:33 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gd6sf14731962lab.0 for ; Mon, 12 Jan 2015 13:44:32 -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=EhbwesslvdMwwLRiPirLOIfJH0JfvZTPH7fWB2cYzUc=; b=FQn7wUPifEN4zIWMl+LtQnt3ttiPgLC8pXXDXru6riMvrYnQFG+vRbTwnji7Jkycfr 9QKlXcR+ssozwWJoE34xat8m2jvmUJkOfHvt5usneeDMjTy5ch0Kk0IvC9HNA9x3S9QP Ztu+5L75ujnx3c0l0LFWMscfn8lfH+7URD1UsFj8KkgfurC5xmHsgtd2BLxMBpOPgOLx cgYaA/a8UAesAlV6FdORPjVfBwKMImtw5GlsVsLfR7KwN8YjvhPMxmgUTYejSdhEPgH1 rKj8K/nJy9shSeshj4WhX2wt2+0WFsC/AWBIgzKPmMM155nQlbuns2mSH1H3iHi+8hVP 4+tQ== X-Gm-Message-State: ALoCoQk4EEYXy+B2x18WRlXLqSbPnEQOdiZV7j5t/EP4k1LIbGacXNUaq7jvVfEdpX5Pw1/vZgG0 X-Received: by 10.180.108.101 with SMTP id hj5mr2414243wib.3.1421099072837; Mon, 12 Jan 2015 13:44:32 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.71 with SMTP id k7ls704647laf.9.gmail; Mon, 12 Jan 2015 13:44:32 -0800 (PST) X-Received: by 10.152.37.168 with SMTP id z8mr39106240laj.63.1421099072664; Mon, 12 Jan 2015 13:44:32 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id oa10si22451054lbb.100.2015.01.12.13.44.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Jan 2015 13:44:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so26440620lab.6 for ; Mon, 12 Jan 2015 13:44:32 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr39189575laz.71.1421099072580; Mon, 12 Jan 2015 13:44:32 -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.9.200 with SMTP id c8csp1200417lbb; Mon, 12 Jan 2015 13:44:31 -0800 (PST) X-Received: by 10.140.94.77 with SMTP id f71mr50322128qge.68.1421099066278; Mon, 12 Jan 2015 13:44:26 -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 a1si24171916qar.108.2015.01.12.13.44.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 12 Jan 2015 13:44:26 -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 1YAmmd-000730-P5; Mon, 12 Jan 2015 21:44:23 +0000 Received: from mail-qg0-f51.google.com ([209.85.192.51]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YAmmQ-00071P-UD for lng-odp@lists.linaro.org; Mon, 12 Jan 2015 21:44:10 +0000 Received: by mail-qg0-f51.google.com with SMTP id i50so19752552qgf.10 for ; Mon, 12 Jan 2015 13:44:05 -0800 (PST) X-Received: by 10.224.26.4 with SMTP id b4mr54654876qac.26.1421099045744; Mon, 12 Jan 2015 13:44:05 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id i49sm15849062qge.48.2015.01.12.13.44.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jan 2015 13:44:05 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 12 Jan 2015 16:43:41 -0500 Message-Id: <1421099021-26007-4-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421099021-26007-1-git-send-email-mike.holmes@linaro.org> References: <1421099021-26007-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] linux-genric: odp_core_mask add ODP_NONNULL 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: mike.holmes@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.47 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 Allow the complier to check for NULL args. Signed-off-by: Mike Holmes --- platform/linux-generic/include/api/odp_coremask.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/platform/linux-generic/include/api/odp_coremask.h b/platform/linux-generic/include/api/odp_coremask.h index c9331fd..b52f977 100644 --- a/platform/linux-generic/include/api/odp_coremask.h +++ b/platform/linux-generic/include/api/odp_coremask.h @@ -21,6 +21,7 @@ extern "C" { #include +#include /** @addtogroup odp_scheduler * Core mask operations. @@ -51,7 +52,8 @@ typedef struct odp_coremask_t { * * @note Supports currently only core indexes upto 63 */ -void odp_coremask_from_str(const char *str, odp_coremask_t *mask); +void odp_coremask_from_str(const char *str, odp_coremask_t *mask) + ODP_NONNULL(1, 2); /** * Write core mask as a string of hexadecimal digits @@ -64,7 +66,8 @@ void odp_coremask_from_str(const char *str, odp_coremask_t *mask); * * @note Supports currently only core indexes upto 63 */ -void odp_coremask_to_str(char *str, int len, const odp_coremask_t *mask); +void odp_coremask_to_str(char *str, int len, const odp_coremask_t *mask) + ODP_NONNULL(1, 3); /** @@ -87,7 +90,8 @@ void odp_coremask_to_str(char *str, int len, const odp_coremask_t *mask); * * @note Supports currently only core indexes upto 63 */ -void odp_coremask_from_u64(const uint64_t *u64, int num, odp_coremask_t *mask); +void odp_coremask_from_u64(const uint64_t *u64, int num, odp_coremask_t *mask) + ODP_NONNULL(1, 3); /** * Clear entire mask @@ -103,14 +107,14 @@ static inline void odp_coremask_zero(odp_coremask_t *mask) * @param core Core number * @param mask add core number in core mask */ -void odp_coremask_set(int core, odp_coremask_t *mask); +void odp_coremask_set(int core, odp_coremask_t *mask) ODP_NONNULL(2); /** * Remove core from mask * @param core Core number * @param mask clear core number from core mask */ -void odp_coremask_clr(int core, odp_coremask_t *mask); +void odp_coremask_clr(int core, odp_coremask_t *mask) ODP_NONNULL(2); /** * Test if core is a member of mask @@ -118,14 +122,14 @@ void odp_coremask_clr(int core, odp_coremask_t *mask); * @param mask Core mask to check if core num set or not * @return non-zero if set otherwise 0 */ -int odp_coremask_isset(int core, const odp_coremask_t *mask); +int odp_coremask_isset(int core, const odp_coremask_t *mask) ODP_NONNULL(2); /** * Count number of cores in mask * @param mask Core mask * @return coremask count */ -int odp_coremask_count(const odp_coremask_t *mask); +int odp_coremask_count(const odp_coremask_t *mask) ODP_NONNULL(1);