From patchwork Mon Feb 1 16:01:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76106 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o11G3wxH011846 for ; Mon, 1 Feb 2010 16:04:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754991Ab0BAQD7 (ORCPT ); Mon, 1 Feb 2010 11:03:59 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:47282 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753157Ab0BAQD7 (ORCPT ); Mon, 1 Feb 2010 11:03:59 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 1 Feb 2010 18:03:52 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 18:01:37 +0200 Message-ID: <4B66FAD2.3010808@dev.mellanox.co.il> Date: Mon, 01 Feb 2010 18:01:22 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: [PATCH v2] opensm/complib/cl_passivelock.h: some casting issues X-OriginalArrivalTime: 01 Feb 2010 16:01:37.0553 (UTC) FILETIME=[D5A82810:01CAA357] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17168.000 X-TM-AS-Result: No--10.518100-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Feb 2010 16:04:00 +0000 (UTC) diff --git a/opensm/include/complib/cl_passivelock.h b/opensm/include/complib/cl_passivelock.h index bafd339..aba4e64 100644 --- a/opensm/include/complib/cl_passivelock.h +++ b/opensm/include/complib/cl_passivelock.h @@ -196,7 +196,7 @@ static inline cl_status_t cl_plock_init(IN cl_plock_t * const p_lock) cl_status_t status; CL_ASSERT(p_lock); - status = (cl_status_t) pthread_rwlock_init(&p_lock->lock, NULL); + status = (unsigned) pthread_rwlock_init(&p_lock->lock, NULL); if (status) return CL_ERROR; p_lock->state = CL_INITIALIZED; @@ -238,7 +238,7 @@ static inline void cl_plock_acquire(IN cl_plock_t * const p_lock) CL_ASSERT(p_lock); CL_ASSERT(p_lock->state == CL_INITIALIZED); - status = (cl_status_t) pthread_rwlock_rdlock(&p_lock->lock); + status = (unsigned) pthread_rwlock_rdlock(&p_lock->lock); CL_ASSERT(status == 0); } @@ -271,7 +271,7 @@ static inline void cl_plock_excl_acquire(IN cl_plock_t * const p_lock) CL_ASSERT(p_lock); CL_ASSERT(p_lock->state == CL_INITIALIZED); - status = (cl_status_t) pthread_rwlock_wrlock(&p_lock->lock); + status = (unsigned) pthread_rwlock_wrlock(&p_lock->lock); CL_ASSERT(status == 0); } @@ -303,7 +303,7 @@ static inline void cl_plock_release(IN cl_plock_t * const p_lock) CL_ASSERT(p_lock); CL_ASSERT(p_lock->state == CL_INITIALIZED); - status = (cl_status_t) pthread_rwlock_unlock(&p_lock->lock); + status = (unsigned) pthread_rwlock_unlock(&p_lock->lock); CL_ASSERT(status == 0); }