aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/udfdecl.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-10-10 04:08:05 -0400
committerJan Kara <jack@suse.cz>2011-10-31 18:43:52 -0400
commit78ace70c4186c0d18314eb001637aa97d1585e65 (patch)
tree34227a6d50b93eb66df22ba130bea8ed932a5896 /fs/udf/udfdecl.h
parenta40ecd7b3ccf520ff02da93e8d1ba6cd55c2e359 (diff)
udf: Convert printks to pr_<level>
Use the current logging styles. Convert a few printks that should have been udf_warn and udf_err. Coalesce formats. Add #define pr_fmt. Move an #include "udfdecls.h" above other includes in udftime.c so pr_fmt works correctly. Strip prefixes from conversions as appropriate. Reorder logging definitions in udfdecl.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r--fs/udf/udfdecl.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 85e15edc080f..f3d449867301 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -1,6 +1,8 @@
1#ifndef __UDF_DECL_H 1#ifndef __UDF_DECL_H
2#define __UDF_DECL_H 2#define __UDF_DECL_H
3 3
4#define pr_fmt(fmt) "UDF-fs: " fmt
5
4#include "ecma_167.h" 6#include "ecma_167.h"
5#include "osta_udf.h" 7#include "osta_udf.h"
6 8
@@ -16,18 +18,11 @@
16#define UDF_PREALLOCATE 18#define UDF_PREALLOCATE
17#define UDF_DEFAULT_PREALLOC_BLOCKS 8 19#define UDF_DEFAULT_PREALLOC_BLOCKS 8
18 20
19#undef UDFFS_DEBUG 21__attribute__((format(printf, 3, 4)))
20 22extern void _udf_err(struct super_block *sb, const char *function,
21#ifdef UDFFS_DEBUG 23 const char *fmt, ...);
22#define udf_debug(f, a...) \ 24#define udf_err(sb, fmt, ...) \
23do { \ 25 _udf_err(sb, __func__, fmt, ##__VA_ARGS__)
24 printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
25 __FILE__, __LINE__, __func__); \
26 printk(f, ##a); \
27} while (0)
28#else
29#define udf_debug(f, a...) /**/
30#endif
31 26
32__attribute__((format(printf, 3, 4))) 27__attribute__((format(printf, 3, 4)))
33extern void _udf_warn(struct super_block *sb, const char *function, 28extern void _udf_warn(struct super_block *sb, const char *function,
@@ -35,14 +30,19 @@ extern void _udf_warn(struct super_block *sb, const char *function,
35#define udf_warn(sb, fmt, ...) \ 30#define udf_warn(sb, fmt, ...) \
36 _udf_warn(sb, __func__, fmt, ##__VA_ARGS__) 31 _udf_warn(sb, __func__, fmt, ##__VA_ARGS__)
37 32
38__attribute__((format(printf, 3, 4))) 33#define udf_info(fmt, ...) \
39extern void _udf_err(struct super_block *sb, const char *function, 34 pr_info("INFO " fmt, ##__VA_ARGS__)
40 const char *fmt, ...);
41#define udf_err(sb, fmt, ...) \
42 _udf_err(sb, __func__, fmt, ##__VA_ARGS__)
43 35
44#define udf_info(f, a...) \ 36#undef UDFFS_DEBUG
45 printk(KERN_INFO "UDF-fs INFO " f, ##a); 37
38#ifdef UDFFS_DEBUG
39#define udf_debug(fmt, ...) \
40 printk(KERN_DEBUG pr_fmt("%s:%d:%s: " fmt), \
41 __FILE__, __LINE__, __func__, ##__VA_ARGS__)
42#else
43#define udf_debug(fmt, ...) \
44 no_printk(fmt, ##__VA_ARGS__)
45#endif
46 46
47#define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) ) 47#define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
48#define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) ) 48#define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )