aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_abi16.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-02-09 15:51:24 -0500
committerBen Skeggs <bskeggs@redhat.com>2014-03-25 23:59:31 -0400
commit73970c47beb42f3e1ab0b86c537b1c79539f05f4 (patch)
treedb0e30783fe20810e97265d75ff3452db18195f0 /drivers/gpu/drm/nouveau/nouveau_abi16.c
parent0ac4e3a58d58e33b2353b3e187c88b9485f26591 (diff)
drm/nouveau: replace ffsll with __ffs64
The ffsll function is a lot slower than the __ffs64 built-in which compiles to a single instruction on 64-bit. It's also nice to avoid custom versions of standard functions. Note that __ffs == ffs - 1. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_abi16.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 900fae01793e..b70111711be3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -270,8 +270,8 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
270 return nouveau_abi16_put(abi16, -EINVAL); 270 return nouveau_abi16_put(abi16, -EINVAL);
271 271
272 /* allocate "abi16 channel" data and make up a handle for it */ 272 /* allocate "abi16 channel" data and make up a handle for it */
273 init->channel = ffsll(~abi16->handles); 273 init->channel = __ffs64(~abi16->handles);
274 if (!init->channel--) 274 if (~abi16->handles == 0)
275 return nouveau_abi16_put(abi16, -ENOSPC); 275 return nouveau_abi16_put(abi16, -ENOSPC);
276 276
277 chan = kzalloc(sizeof(*chan), GFP_KERNEL); 277 chan = kzalloc(sizeof(*chan), GFP_KERNEL);