Lines Matching refs:optstr
28 nvkm_stropt(const char *optstr, const char *opt, int *arglen) in nvkm_stropt() argument
30 while (optstr && *optstr != '\0') { in nvkm_stropt()
31 int len = strcspn(optstr, ",="); in nvkm_stropt()
32 switch (optstr[len]) { in nvkm_stropt()
34 if (!strncasecmpz(optstr, opt, len)) { in nvkm_stropt()
35 optstr += len + 1; in nvkm_stropt()
36 *arglen = strcspn(optstr, ",="); in nvkm_stropt()
37 return *arglen ? optstr : NULL; in nvkm_stropt()
39 optstr++; in nvkm_stropt()
42 optstr++; in nvkm_stropt()
47 optstr += len; in nvkm_stropt()
54 nvkm_boolopt(const char *optstr, const char *opt, bool value) in nvkm_boolopt() argument
58 optstr = nvkm_stropt(optstr, opt, &arglen); in nvkm_boolopt()
59 if (optstr) { in nvkm_boolopt()
60 if (!strncasecmpz(optstr, "0", arglen) || in nvkm_boolopt()
61 !strncasecmpz(optstr, "no", arglen) || in nvkm_boolopt()
62 !strncasecmpz(optstr, "off", arglen) || in nvkm_boolopt()
63 !strncasecmpz(optstr, "false", arglen)) in nvkm_boolopt()
66 if (!strncasecmpz(optstr, "1", arglen) || in nvkm_boolopt()
67 !strncasecmpz(optstr, "yes", arglen) || in nvkm_boolopt()
68 !strncasecmpz(optstr, "on", arglen) || in nvkm_boolopt()
69 !strncasecmpz(optstr, "true", arglen)) in nvkm_boolopt()
77 nvkm_longopt(const char *optstr, const char *opt, long value) in nvkm_longopt() argument
83 optstr = nvkm_stropt(optstr, opt, &arglen); in nvkm_longopt()
84 if (optstr && (s = kstrndup(optstr, arglen, GFP_KERNEL))) { in nvkm_longopt()
95 nvkm_dbgopt(const char *optstr, const char *sub) in nvkm_dbgopt() argument
99 while (optstr) { in nvkm_dbgopt()
100 int len = strcspn(optstr, ",="); in nvkm_dbgopt()
101 switch (optstr[len]) { in nvkm_dbgopt()
103 if (strncasecmpz(optstr, sub, len)) in nvkm_dbgopt()
105 optstr++; in nvkm_dbgopt()
109 if (!strncasecmpz(optstr, "fatal", len)) in nvkm_dbgopt()
111 else if (!strncasecmpz(optstr, "error", len)) in nvkm_dbgopt()
113 else if (!strncasecmpz(optstr, "warn", len)) in nvkm_dbgopt()
115 else if (!strncasecmpz(optstr, "info", len)) in nvkm_dbgopt()
117 else if (!strncasecmpz(optstr, "debug", len)) in nvkm_dbgopt()
119 else if (!strncasecmpz(optstr, "trace", len)) in nvkm_dbgopt()
121 else if (!strncasecmpz(optstr, "paranoia", len)) in nvkm_dbgopt()
123 else if (!strncasecmpz(optstr, "spam", len)) in nvkm_dbgopt()
127 if (optstr[len] != '\0') { in nvkm_dbgopt()
128 optstr++; in nvkm_dbgopt()
135 optstr += len; in nvkm_dbgopt()