From 75158ebbe259f0bd8bf435e8f4827a43ec89c877 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 16 Mar 2015 08:57:47 +0100 Subject: qerror: Eliminate QERR_DEVICE_NOT_FOUND Error classes other than ERROR_CLASS_GENERIC_ERROR should not be used in new code. Hiding them in QERR_ macros makes new uses hard to spot. Fortunately, there's just one such macro left. Eliminate it with this coccinelle semantic patch: @@ expression EP, E; @@ -error_set(EP, QERR_DEVICE_NOT_FOUND, E) +error_set(EP, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found", E) Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Reviewed-by: Luiz Capitulino --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/qapi') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 6468e40..2841344 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -55,9 +55,6 @@ void qerror_report_err(Error *err); #define QERR_DEVICE_NO_HOTPLUG \ ERROR_CLASS_GENERIC_ERROR, "Device '%s' does not support hotplugging" -#define QERR_DEVICE_NOT_FOUND \ - ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found" - #define QERR_FD_NOT_FOUND \ ERROR_CLASS_GENERIC_ERROR, "File descriptor named '%s' not found" -- cgit v1.1