LinuxTV Patchwork [v4l-utils,v2,3/4] cec-compliance: use warn() in warn_once()

login
register
mail settings
Submitter Philipp Zabel
Date April 9, 2019, 2:49 p.m.
Message ID <20190409144958.31233-4-p.zabel@pengutronix.de>
Download mbox | patch
Permalink /patch/55583/
State New
Delegated to: Hans Verkuil
Headers show

Comments

Philipp Zabel - April 9, 2019, 2:49 p.m.
Use the warn() macro in warn_once() instead of duplicating its contents.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 utils/cec-compliance/cec-compliance.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch

diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 0a890311665e..2ebf2d5d9027 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -230,12 +230,7 @@  struct remote_subtest {
 									\
 		if (!show) {						\
 			show = true;					\
-			warnings++;					\
-			if (show_warnings)				\
-				printf("\t\twarn: %s(%d): " fmt,	\
-					__FILE__, __LINE__, ##args); 	\
-			if (exit_on_warn)				\
-				exit(1);				\
+			warn(fmt, ##args);				\
 		}							\
 	} while (0)
 

Privacy Policy