Skip to contentSkip to conversation

regulator: Add rdev_crit() macro

PATCH Applied Mark Brown 3 participants 4 messages Jun 9, 2011 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: Add rdev_crit() macro

No actual users but provide the macro so there's less surprise when it's not there.

---
 drivers/regulator/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/regulator/core.c +2 -0
index 47bf85d..f5e4665 100644
@@ -34,6 +34,8 @@
 
 #include "dummy.h"
 
+#define rdev_crit(rdev, fmt, ...)					\
+	pr_crit("%s: " fmt, rdev_get_name(rdev), ##__VA_ARGS__)
 #define rdev_err(rdev, fmt, ...)					\
 	pr_err("%s: " fmt, rdev_get_name(rdev), ##__VA_ARGS__)
 #define rdev_warn(rdev, fmt, ...)					\
Signature · 1 line
1.7.5.3
#2 lore raw
In reply to Mark Brown
Quoted 13 lines · Mark Brown

No actual users but provide the macro so there's less surprise when it's not there.

---
 drivers/regulator/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/regulator/core.c +0 -0
index 47bf85d..f5e4665 100644

drivers/regulator/core.c line 41

Quoted 8 lines
drivers/regulator/core.c +2 -0
@@ -34,6 +34,8 @@
 
 #include "dummy.h"
 
+#define rdev_crit(rdev, fmt, ...)					\
+	pr_crit("%s: " fmt, rdev_get_name(rdev), ##__VA_ARGS__)
 #define rdev_err(rdev, fmt, ...)					\
 	pr_err("%s: " fmt, rdev_get_name(rdev), ##__VA_ARGS__)
 #define rdev_warn(rdev, fmt, ...)					\

If that's really necessary, shouldn't rdev_emerg, rdev_alert and rdev_notice be added as well?

author
#3 lore raw
Quoted 5 lines · Joe Perches

drivers/regulator/core.c line 38

Quoted 2 lines
drivers/regulator/core.c +2 -0
+#define rdev_crit(rdev, fmt, ...)					\
+	pr_crit("%s: " fmt, rdev_get_name(rdev), ##__VA_ARGS__)

If that's really necessary, shouldn't rdev_emerg, rdev_alert and rdev_notice be added as well?

Yes, but I don't habitually use those when adding random trace during debug so don't care myself.