Commit d337d3ef authored by Martin Dalecki's avatar Martin Dalecki Committed by Linus Torvalds

[PATCH] kill warnings 18/19

Slowly we get there...
parent 90ce6db3
...@@ -72,9 +72,6 @@ static PV_HANDLER pv_insert_table[] = { ...@@ -72,9 +72,6 @@ static PV_HANDLER pv_insert_table[] = {
/* /*
* Function irda_insert_no_value (self, buf, len, pi, type, func) * Function irda_insert_no_value (self, buf, len, pi, type, func)
*
*
*
*/ */
static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi, static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func) PV_TYPE type, PI_HANDLER func)
...@@ -123,9 +120,6 @@ static int irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi, ...@@ -123,9 +120,6 @@ static int irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi,
/* /*
* Function irda_insert_integer (self, buf, len, pi, type, func) * Function irda_insert_integer (self, buf, len, pi, type, func)
*
*
*
*/ */
static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func) PV_TYPE type, PI_HANDLER func)
...@@ -162,7 +156,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -162,7 +156,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
} }
/* Check if buffer is long enough for insertion */ /* Check if buffer is long enough for insertion */
if (len < (2+p.pl)) { if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for insertion!\n"); WARNING("%s: buffer to short for insertion!\n", __FUNCTION__);
return -1; return -1;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d, pi=%d\n", p.pi, p.pl, p.pv.i); IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d, pi=%d\n", p.pi, p.pl, p.pv.i);
...@@ -186,7 +180,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -186,7 +180,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
break; break;
default: default:
WARNING(__FUNCTION__ "() length %d not supported\n", p.pl); WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl);
/* Skip parameter */ /* Skip parameter */
return -1; return -1;
} }
...@@ -213,8 +207,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -213,8 +207,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */ /* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) { if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! " WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len); "Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1; return -1;
} }
...@@ -223,9 +218,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -223,9 +218,9 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
* handler want a 16 bits integer then a 32 bits is not good enough * handler want a 16 bits integer then a 32 bits is not good enough
*/ */
if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
ERROR(__FUNCTION__ "(), invalid parameter length! " ERROR("%s: invalid parameter length! "
"Expected %d bytes, but value had %d bytes!\n", "Expected %d bytes, but value had %d bytes!\n",
type & PV_MASK, p.pl); __FUNCTION__, type & PV_MASK, p.pl);
/* Skip parameter */ /* Skip parameter */
return p.pl+2; return p.pl+2;
...@@ -251,7 +246,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -251,7 +246,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
le32_to_cpus(&p.pv.i); le32_to_cpus(&p.pv.i);
break; break;
default: default:
WARNING(__FUNCTION__ "() length %d not supported\n", p.pl); WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl);
/* Skip parameter */ /* Skip parameter */
return p.pl+2; return p.pl+2;
...@@ -268,9 +263,6 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -268,9 +263,6 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
/* /*
* Function irda_extract_string (self, buf, len, type, func) * Function irda_extract_string (self, buf, len, type, func)
*
*
*
*/ */
static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func) PV_TYPE type, PI_HANDLER func)
...@@ -288,8 +280,9 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, ...@@ -288,8 +280,9 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */ /* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) { if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! " WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len); "Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1; return -1;
} }
...@@ -315,9 +308,6 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, ...@@ -315,9 +308,6 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
/* /*
* Function irda_extract_octseq (self, buf, len, type, func) * Function irda_extract_octseq (self, buf, len, type, func)
*
*
*
*/ */
static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi, static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
PV_TYPE type, PI_HANDLER func) PV_TYPE type, PI_HANDLER func)
...@@ -329,8 +319,9 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi, ...@@ -329,8 +319,9 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
/* Check if buffer is long enough for parsing */ /* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) { if (len < (2+p.pl)) {
WARNING(__FUNCTION__ "(), buffer to short for parsing! " WARNING("%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d\n", p.pl, len); "Need %d bytes, but len is only %d\n",
__FUNCTION__, p.pl, len);
return -1; return -1;
} }
...@@ -380,7 +371,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...) ...@@ -380,7 +371,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
va_end(args); va_end(args);
return -1; return -1;
} }
} }
va_end(args); va_end(args);
...@@ -389,9 +379,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...) ...@@ -389,9 +379,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
/* /*
* Function irda_param_unpack (skb, fmt, ...) * Function irda_param_unpack (skb, fmt, ...)
*
*
*
*/ */
int irda_param_unpack(__u8 *buf, char *fmt, ...) int irda_param_unpack(__u8 *buf, char *fmt, ...)
{ {
...@@ -475,7 +462,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, ...@@ -475,7 +462,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
/* Check if handler has been implemented */ /* Check if handler has been implemented */
if (!pi_minor_info->func) { if (!pi_minor_info->func) {
MESSAGE(__FUNCTION__"(), no handler for pi=%#x\n", pi); MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi);
/* Skip this parameter */ /* Skip this parameter */
return -1; return -1;
} }
...@@ -530,7 +517,7 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info) ...@@ -530,7 +517,7 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info)
/* Check if handler has been implemented */ /* Check if handler has been implemented */
if (!pi_minor_info->func) { if (!pi_minor_info->func) {
MESSAGE(__FUNCTION__"(), no handler for pi=%#x\n", buf[n]); MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, buf[n]);
/* Skip this parameter */ /* Skip this parameter */
return 2 + buf[n + 1]; /* Continue */ return 2 + buf[n + 1]; /* Continue */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment