From patchwork Tue Jul 8 16:20:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 33241 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1A79C2070A for ; Tue, 8 Jul 2014 16:20:42 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id dc16sf18030953qab.9 for ; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=AREceteNcgp33XIpxNUvgwmkmgAOBOVaYg20o/h3rEg=; b=Exq+jf5pIQ+CCAUiFHQdyUk2ucbKi6Gdz5JmWqnBJp4ru3oqdRScn0a1/g+vPVNLpq XodHcHxjGYiO8iIHH3YKB37H0397n9s1ak1EQAS5V8b/Jn8XuX1SnrdU7Ti8NCDZ1e2n X01aleXZcltI/5QeX9NvMcVJVPyQzZDRrWVgRADawcHnej1dp/6ASstaEVatp9hqr821 GrjUD8ZLf+MRw+SPVNNzkA4kWZkkaak3SZpVtigBIP+WiuQOaS68dP3Uj5Bc1sgT++7H qOq++rUKGuT3UdIu2/7uDShw18UZMBgV8xlJ0T06Za/szkpdXk7JVm7tR9gR0/BHcs9C vgeg== X-Gm-Message-State: ALoCoQkbOo5HG7peP5s8nc9LRS/Rydn9c5gFRp5qupfjHxYPxRX1LaNZqOHXugMHeVXjlND9CXhV X-Received: by 10.236.124.100 with SMTP id w64mr9061828yhh.57.1404836441944; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.228 with SMTP id j91ls2320821qgf.31.gmail; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) X-Received: by 10.220.182.5 with SMTP id ca5mr1264483vcb.50.1404836441869; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id xb10si20367310vcb.45.2014.07.08.09.20.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 09:20:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so5910018veb.14 for ; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) X-Received: by 10.221.34.13 with SMTP id sq13mr11410276vcb.16.1404836441790; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) 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.221.37.5 with SMTP id tc5csp784427vcb; Tue, 8 Jul 2014 09:20:41 -0700 (PDT) X-Received: by 10.224.137.135 with SMTP id w7mr59858914qat.52.1404836441397; Tue, 08 Jul 2014 09:20:41 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id k1si30410606qcd.34.2014.07.08.09.20.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Jul 2014 09:20:41 -0700 (PDT) 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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X4Y65-0004m1-RS; Tue, 08 Jul 2014 16:18:25 +0000 Received: from mail-qg0-f41.google.com ([209.85.192.41]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X4Y5z-0004lw-UL for lng-odp@lists.linaro.org; Tue, 08 Jul 2014 16:18:19 +0000 Received: by mail-qg0-f41.google.com with SMTP id i50so5363334qgf.14 for ; Tue, 08 Jul 2014 09:20:29 -0700 (PDT) X-Received: by 10.140.50.50 with SMTP id r47mr39859773qga.96.1404836429157; Tue, 08 Jul 2014 09:20:29 -0700 (PDT) Received: from fedora1.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id a3sm81418690qas.13.2014.07.08.09.20.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Jul 2014 09:20:28 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Tue, 8 Jul 2014 12:20:12 -0400 Message-Id: <1404836412-48238-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] use bool for logical test functions 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.128.169 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 Signed-off-by: Mike Holmes --- include/odp_buffer.h | 2 +- include/odp_coremask.h | 2 +- include/odp_ticketlock.h | 2 +- platform/linux-generic/odp_buffer.c | 2 +- platform/linux-generic/odp_coremask.c | 2 +- platform/linux-generic/odp_ticketlock.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/odp_buffer.h b/include/odp_buffer.h index d8577fd..0a308b0 100644 --- a/include/odp_buffer.h +++ b/include/odp_buffer.h @@ -73,7 +73,7 @@ int odp_buffer_type(odp_buffer_t buf); * * @return 1 if valid, otherwise 0 */ -int odp_buffer_is_valid(odp_buffer_t buf); +bool odp_buffer_is_valid(odp_buffer_t buf); /** * Print buffer metadata to STDOUT diff --git a/include/odp_coremask.h b/include/odp_coremask.h index 141cb6a..7eca868 100644 --- a/include/odp_coremask.h +++ b/include/odp_coremask.h @@ -111,7 +111,7 @@ 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); +bool odp_coremask_isset(int core, const odp_coremask_t *mask); /** * Count number of cores in mask diff --git a/include/odp_ticketlock.h b/include/odp_ticketlock.h index 6277a18..4d41fe2 100644 --- a/include/odp_ticketlock.h +++ b/include/odp_ticketlock.h @@ -73,7 +73,7 @@ void odp_ticketlock_unlock(odp_ticketlock_t *ticketlock); * * @return 1 if the lock is locked, otherwise 0. */ -int odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock); +bool odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock); #ifdef __cplusplus diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index 0169eec..41b6a4c 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -36,7 +36,7 @@ int odp_buffer_type(odp_buffer_t buf) } -int odp_buffer_is_valid(odp_buffer_t buf) +bool odp_buffer_is_valid(odp_buffer_t buf) { odp_buffer_bits_t handle; diff --git a/platform/linux-generic/odp_coremask.c b/platform/linux-generic/odp_coremask.c index c55eb72..c98a10a 100644 --- a/platform/linux-generic/odp_coremask.c +++ b/platform/linux-generic/odp_coremask.c @@ -81,7 +81,7 @@ void odp_coremask_clr(int core, odp_coremask_t *mask) } -int odp_coremask_isset(int core, const odp_coremask_t *mask) +bool odp_coremask_isset(int core, const odp_coremask_t *mask) { /* should not be more than 63 * core no. should be from 0..63= 64bit diff --git a/platform/linux-generic/odp_ticketlock.c b/platform/linux-generic/odp_ticketlock.c index be5b885..6cc5285 100644 --- a/platform/linux-generic/odp_ticketlock.c +++ b/platform/linux-generic/odp_ticketlock.c @@ -45,7 +45,7 @@ void odp_ticketlock_unlock(odp_ticketlock_t *ticketlock) } -int odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock) +bool odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock) { return ticketlock->cur_ticket != ticketlock->next_ticket; }