aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/getopt.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-08 19:04:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-08 19:48:52 -0400
commitb41f8b84d01d32ea618dbbe5679bd07ce3444b88 (patch)
treecbede13191e15a0554b8d12ae6ef098a8ce4048b /fs/ncpfs/getopt.c
parentd0057ca4c1fe73c05a9e077cc7691217370b3283 (diff)
ncpfs: Add pr_fmt and convert printks to pr_<level>
Convert to a more current logging style. Add pr_fmt to prefix with "ncpfs: ". Remove the embedded function names and use "%s: ", __func__ Some previously unprefixed messages now have "ncpfs: " Signed-off-by: Joe Perches <joe@perches.com> Cc: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ncpfs/getopt.c')
-rw-r--r--fs/ncpfs/getopt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ncpfs/getopt.c b/fs/ncpfs/getopt.c
index 0af3349de851..03ffde1f44d6 100644
--- a/fs/ncpfs/getopt.c
+++ b/fs/ncpfs/getopt.c
@@ -2,6 +2,8 @@
2 * getopt.c 2 * getopt.c
3 */ 3 */
4 4
5#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
6
5#include <linux/kernel.h> 7#include <linux/kernel.h>
6#include <linux/string.h> 8#include <linux/string.h>
7 9
@@ -46,8 +48,8 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
46 if (opts->has_arg & OPT_NOPARAM) { 48 if (opts->has_arg & OPT_NOPARAM) {
47 return opts->val; 49 return opts->val;
48 } 50 }
49 printk(KERN_INFO "%s: the %s option requires an argument\n", 51 pr_info("%s: the %s option requires an argument\n",
50 caller, token); 52 caller, token);
51 return -EINVAL; 53 return -EINVAL;
52 } 54 }
53 if (opts->has_arg & OPT_INT) { 55 if (opts->has_arg & OPT_INT) {
@@ -57,18 +59,18 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
57 if (!*v) { 59 if (!*v) {
58 return opts->val; 60 return opts->val;
59 } 61 }
60 printk(KERN_INFO "%s: invalid numeric value in %s=%s\n", 62 pr_info("%s: invalid numeric value in %s=%s\n",
61 caller, token, val); 63 caller, token, val);
62 return -EDOM; 64 return -EDOM;
63 } 65 }
64 if (opts->has_arg & OPT_STRING) { 66 if (opts->has_arg & OPT_STRING) {
65 return opts->val; 67 return opts->val;
66 } 68 }
67 printk(KERN_INFO "%s: unexpected argument %s to the %s option\n", 69 pr_info("%s: unexpected argument %s to the %s option\n",
68 caller, val, token); 70 caller, val, token);
69 return -EINVAL; 71 return -EINVAL;
70 } 72 }
71 } 73 }
72 printk(KERN_INFO "%s: Unrecognized mount option %s\n", caller, token); 74 pr_info("%s: Unrecognized mount option %s\n", caller, token);
73 return -EOPNOTSUPP; 75 return -EOPNOTSUPP;
74} 76}