Skip to content

Commit

Permalink
IB: find_first_zero_bit() takes unsigned pointer
Browse files Browse the repository at this point in the history
Fix sparse warning

    drivers/infiniband/core/device.c:142:6: warning: incorrect type in argument 1 (different signedness)
    drivers/infiniband/core/device.c:142:6:    expected unsigned long const *addr
    drivers/infiniband/core/device.c:142:6:    got long *[assigned] inuse

by making the local variable inuse unsigned.  Does not affect generated
code at all.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Oct 10, 2007
1 parent ce423ef commit 65d470b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ static struct ib_device *__ib_device_get_by_name(const char *name)

static int alloc_name(char *name)
{
long *inuse;
unsigned long *inuse;
char buf[IB_DEVICE_NAME_MAX];
struct ib_device *device;
int i;

inuse = (long *) get_zeroed_page(GFP_KERNEL);
inuse = (unsigned long *) get_zeroed_page(GFP_KERNEL);
if (!inuse)
return -ENOMEM;

Expand Down

0 comments on commit 65d470b

Please sign in to comment.