All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: bskeggs@redhat.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/nouveau: port all engines to new engine module format
Date: Thu, 11 Oct 2012 09:55:53 +0300	[thread overview]
Message-ID: <20121011065553.GC31607@elgon.mountain> (raw)

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

             reply	other threads:[~2012-10-11  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11  6:55 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-11 10:55 drm/nouveau: port all engines to new engine module format Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121011065553.GC31607@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.