Skip to content

Commit

Permalink
usb, gadget: use appropriate warning accessors
Browse files Browse the repository at this point in the history
Use the appropriate WARN() and WARN_ON() accessors to avoid a build error
when CONFIG_BUG=n:

	drivers/usb/gadget/configfs.c: In function 'config_usb_cfg_unlink':
	drivers/usb/gadget/configfs.c:442:2: error: implicit declaration of function '__WARN_printf'
	drivers/usb/gadget/configfs.c: In function 'configfs_do_nothing':
	drivers/usb/gadget/configfs.c:733:2: error: implicit declaration of function '__WARN'

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
David Rientjes authored and Greg Kroah-Hartman committed Apr 8, 2013
1 parent 197c58f commit 75bfe23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static int config_usb_cfg_unlink(
}
}
mutex_unlock(&gi->lock);
__WARN_printf("Unable to locate function to unbind\n");
WARN(1, "Unable to locate function to unbind\n");
return 0;
}

Expand Down Expand Up @@ -730,7 +730,7 @@ USB_CONFIG_STRINGS_LANG(gadget_strings, gadget_info);

static int configfs_do_nothing(struct usb_composite_dev *cdev)
{
__WARN();
WARN_ON(1);
return -EINVAL;
}

Expand Down

0 comments on commit 75bfe23

Please sign in to comment.