]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ncpfs/getopt.c
Merge tag 'trace-3.15-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[karo-tx-linux.git] / fs / ncpfs / getopt.c
index 335b003dddf9b220dbf10b50a845f71be21acf9f..03ffde1f44d699764ad7e956c8cbe60fc8428dd2 100644 (file)
@@ -2,6 +2,8 @@
  * getopt.c
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/string.h>
 
@@ -16,7 +18,6 @@
  *     @opts: an array of &struct option entries controlling parser operations
  *     @optopt: output; will contain the current option
  *     @optarg: output; will contain the value (if one exists)
- *     @flag: output; may be NULL; should point to a long for or'ing flags
  *     @value: output; may be NULL; will be overwritten with the integer value
  *             of the current argument.
  *
@@ -47,8 +48,8 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
                                if (opts->has_arg & OPT_NOPARAM) {
                                        return opts->val;
                                }
-                               printk(KERN_INFO "%s: the %s option requires an argument\n",
-                                      caller, token);
+                               pr_info("%s: the %s option requires an argument\n",
+                                       caller, token);
                                return -EINVAL;
                        }
                        if (opts->has_arg & OPT_INT) {
@@ -58,18 +59,18 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
                                if (!*v) {
                                        return opts->val;
                                }
-                               printk(KERN_INFO "%s: invalid numeric value in %s=%s\n",
+                               pr_info("%s: invalid numeric value in %s=%s\n",
                                        caller, token, val);
                                return -EDOM;
                        }
                        if (opts->has_arg & OPT_STRING) {
                                return opts->val;
                        }
-                       printk(KERN_INFO "%s: unexpected argument %s to the %s option\n",
+                       pr_info("%s: unexpected argument %s to the %s option\n",
                                caller, val, token);
                        return -EINVAL;
                }
        }
-       printk(KERN_INFO "%s: Unrecognized mount option %s\n", caller, token);
+       pr_info("%s: Unrecognized mount option %s\n", caller, token);
        return -EOPNOTSUPP;
 }