From: David Rientjes Date: Sun, 7 Apr 2013 21:11:47 +0000 (-0700) Subject: usb, gadget: use appropriate warning accessors X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=75bfe23a36fc47dd95c5216b48caaf1fa9c55a65;p=linux-beck.git usb, gadget: use appropriate warning accessors 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 Signed-off-by: David Rientjes Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index a34633a898a1..3d5cfc9c2c78 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -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; } @@ -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; }