From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: re: drm/nouveau: port all engines to new engine module format Date: Thu, 11 Oct 2012 09:55:53 +0300 Message-ID: <20121011065553.GC31607@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from acsinet14.oracle.com (acsinet14.oracle.com [141.146.126.236]) by gabe.freedesktop.org (Postfix) with ESMTP id A09F39E79D for ; Wed, 10 Oct 2012 23:56:06 -0700 (PDT) Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet14.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9B6u1Zc012177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Oct 2012 06:56:01 GMT Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: bskeggs@redhat.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hello Ben Skeggs, The patch ebb945a94bba: "drm/nouveau: port all engines to new engine module format" from Jul 20, 2012, leads to the following warning: drivers/gpu/drm/nouveau/nouveau_abi16.c:264 nouveau_abi16_ioctl_channel_alloc() warn: should '1 << init->channel' be a 64 bit type 262 INIT_LIST_HEAD(&chan->notifiers); 263 list_add(&chan->head, &abi16->channels); 264 abi16->handles |= (1 << init->channel); ^^^^^^^^^^^^^^^^^^^^ This will only work for the first 30 channels, otherwise it needs to be: abi16->handles |= (u64)1 << init->channel; 265 But I don't couldn't tell how many channels are actually possible and I was confused by this. 132 /* destroy channel object, all children will be killed too */ 133 if (chan->chan) { 134 abi16->handles &= ~(1 << (chan->chan->handle & 0xffff)); Is that bitwise AND in the right place? Oxff would be enough to hold 0-63. 135 nouveau_channel_del(&chan->chan); 136 } regards, dan carpenter