提交 75bfe23a 编写于 作者: D David Rientjes 提交者: Greg Kroah-Hartman

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: NRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: NDavid Rientjes <rientjes@google.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 197c58f6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册