From patchwork Mon Feb 1 14:00:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76074 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 o11E6j3b022047 for ; Mon, 1 Feb 2010 14:06:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192Ab0BAOGp (ORCPT ); Mon, 1 Feb 2010 09:06:45 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:47728 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753149Ab0BAOGo (ORCPT ); Mon, 1 Feb 2010 09:06:44 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 1 Feb 2010 16:06:37 +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 16:01:11 +0200 Message-ID: <4B66DE70.9060400@dev.mellanox.co.il> Date: Mon, 01 Feb 2010 16:00:16 +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] opensm/complib/cl_passivelock.h: some casting issues X-OriginalArrivalTime: 01 Feb 2010 14:01:11.0344 (UTC) FILETIME=[02802B00:01CAA347] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17166.007 X-TM-AS-Result: No--11.495400-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 14:06:46 +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); }