From patchwork Fri May 21 17:49:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Smith, Stan" X-Patchwork-Id: 101534 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 o4LHnUWk009831 for ; Fri, 21 May 2010 17:49:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754231Ab0EURta (ORCPT ); Fri, 21 May 2010 13:49:30 -0400 Received: from mga11.intel.com ([192.55.52.93]:2226 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154Ab0EURt3 convert rfc822-to-8bit (ORCPT ); Fri, 21 May 2010 13:49:29 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 21 May 2010 10:46:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,279,1272870000"; d="scan'208";a="569432565" Received: from orsmsx604.amr.corp.intel.com ([10.22.226.87]) by fmsmga002.fm.intel.com with ESMTP; 21 May 2010 10:48:32 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.226.213) by orsmsx604.amr.corp.intel.com (10.22.226.87) with Microsoft SMTP Server (TLS) id 8.2.176.0; Fri, 21 May 2010 10:49:28 -0700 Received: from orsmsx501.amr.corp.intel.com ([10.22.226.209]) by orsmsx601.amr.corp.intel.com ([10.22.226.213]) with mapi; Fri, 21 May 2010 10:49:28 -0700 From: "Smith, Stan" To: Sasha Khapyorsky CC: "linux-rdma@vger.kernel.org" Date: Fri, 21 May 2010 10:49:27 -0700 Subject: [PATCH] ib_types.h add debug assert Thread-Topic: [PATCH] ib_types.h add debug assert Thread-Index: Acr5DfVJgSzzv0gPQsm3ffMCJA46eg== Message-ID: <3F6F638B8D880340AB536D29CD4C1E192562EBBC01@orsmsx501.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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]); Fri, 21 May 2010 17:49:31 +0000 (UTC) diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h index e1bc102..203c319 100644 --- a/opensm/include/iba/ib_types.h +++ b/opensm/include/iba/ib_types.h @@ -4395,6 +4395,7 @@ static inline uint32_t OSM_API ib_get_attr_size(IN const ib_net16_t attr_offset) static inline ib_net16_t OSM_API ib_get_attr_offset(IN const uint32_t attr_size) { + CL_ASSERT((attr_size & 0x07) == 0); return (cl_hton16((uint16_t) (attr_size >> 3))); }