From patchwork Tue Feb 2 13:24:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76374 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 o12DR56n028466 for ; Tue, 2 Feb 2010 13:27:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755893Ab0BBN1H (ORCPT ); Tue, 2 Feb 2010 08:27:07 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:59089 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755792Ab0BBN1G (ORCPT ); Tue, 2 Feb 2010 08:27:06 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 2 Feb 2010 15:27:00 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Feb 2010 15:24:17 +0200 Message-ID: <4B682772.2070304@dev.mellanox.co.il> Date: Tue, 02 Feb 2010 15:24:02 +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 CC: Linux RDMA Subject: [PATCH v3] opensm/complib/cl_passivelock.h: some casting issues X-OriginalArrivalTime: 02 Feb 2010 13:24:17.0713 (UTC) FILETIME=[057CA210:01CAA40B] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17168.007 X-TM-AS-Result: No--10.365900-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]); Tue, 02 Feb 2010 13:27:08 +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 = (cl_status_t)(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 = (cl_status_t)(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 = (cl_status_t)(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 = (cl_status_t)(unsigned) pthread_rwlock_unlock(&p_lock->lock); CL_ASSERT(status == 0); }