#define UST_XSTR(d) UST_STR(d)
#define UST_STR(s) #s
+#define USTERR_MAX_LEN 512
+
/* We sometimes print in the tracing path, and tracing can occur in
* signal handlers, so we must use a print method which is signal safe.
*/
#define sigsafe_print_err(fmt, args...) \
{ \
- /* Can't use dynamic allocation. Limit ourselves to 250 chars. */ \
- char ____buf[250]; \
+ /* Can't use dynamic allocation. Limit ourselves to USTERR_MAX_LEN chars. */ \
+ char ____buf[USTERR_MAX_LEN]; \
int ____saved_errno; \
\
/* Save the errno. */ \
#define BUG_ON(condition) \
do { \
- if (unlikely(condition)) \
+ if (caa_unlikely(condition)) \
ERR("condition not respected (BUG) on line %s:%d", __FILE__, __LINE__); \
} while(0)
#define WARN_ON(condition) \
do { \
- if (unlikely(condition)) \
+ if (caa_unlikely(condition)) \
WARN("condition not respected on line %s:%d", __FILE__, __LINE__); \
} while(0)
#define WARN_ON_ONCE(condition) WARN_ON(condition)