From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-am1on0091.outbound.protection.outlook.com ([157.56.112.91]:39072 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161308AbcFBOU3 (ORCPT ); Thu, 2 Jun 2016 10:20:29 -0400 Subject: Re: [PATCH] IB/core: Fix bit curruption in ib_device_cap_flags structure To: Christoph Hellwig References: <1464859685-18666-1-git-send-email-maxg@mellanox.com> <20160602113353.GA18494@infradead.org> CC: , , , , , From: Max Gurtovoy Message-ID: <57501D0C.9020607@mellanox.com> Date: Thu, 2 Jun 2016 14:48:28 +0300 MIME-Version: 1.0 In-Reply-To: <20160602113353.GA18494@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 6/2/2016 2:33 PM, Christoph Hellwig wrote: >> IB_DEVICE_CROSS_CHANNEL = (1 << 27), >> IB_DEVICE_MANAGED_FLOW_STEERING = (1 << 29), >> IB_DEVICE_SIGNATURE_HANDOVER = (1 << 30), >> - IB_DEVICE_ON_DEMAND_PAGING = (1 << 31), >> + IB_DEVICE_ON_DEMAND_PAGING = (1ULL << 31), >> IB_DEVICE_SG_GAPS_REG = (1ULL << 32), >> IB_DEVICE_VIRTUAL_FUNCTION = ((u64)1 << 33), >> IB_DEVICE_RAW_SCATTER_FCS = ((u64)1 << 34), > > So now we've got three different styles to define the constants. My next patch will align casting of IB_DEVICE_VIRTUAL_FUNCTION and IB_DEVICE_RAW_SCATTER_FCS to ULL. > > I'd really prefer to move all of them over to the 1ULL << offset style. me too :) >