Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d337d3ef
Commit
d337d3ef
authored
Jun 09, 2002
by
Martin Dalecki
Committed by
Linus Torvalds
Jun 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill warnings 18/19
Slowly we get there...
parent
90ce6db3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
82 deletions
+69
-82
net/irda/parameters.c
net/irda/parameters.c
+69
-82
No files found.
net/irda/parameters.c
View file @
d337d3ef
...
...
@@ -72,9 +72,6 @@ static PV_HANDLER pv_insert_table[] = {
/*
* 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
,
PV_TYPE
type
,
PI_HANDLER
func
)
...
...
@@ -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)
*
*
*
*/
static
int
irda_insert_integer
(
void
*
self
,
__u8
*
buf
,
int
len
,
__u8
pi
,
PV_TYPE
type
,
PI_HANDLER
func
)
...
...
@@ -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 */
if
(
len
<
(
2
+
p
.
pl
))
{
WARNING
(
__FUNCTION__
"(), buffer to short for insertion!
\n
"
);
WARNING
(
"%s: buffer to short for insertion!
\n
"
,
__FUNCTION__
);
return
-
1
;
}
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,
break
;
default:
WARNING
(
__FUNCTION__
"() length %d not supported
\n
"
,
p
.
pl
);
WARNING
(
"%s: length %d not supported
\n
"
,
__FUNCTION__
,
p
.
pl
);
/* Skip parameter */
return
-
1
;
}
...
...
@@ -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 */
if
(
len
<
(
2
+
p
.
pl
))
{
WARNING
(
__FUNCTION__
"(), buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
p
.
pl
,
len
);
WARNING
(
"%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
__FUNCTION__
,
p
.
pl
,
len
);
return
-
1
;
}
...
...
@@ -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
*/
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
"
,
type
&
PV_MASK
,
p
.
pl
);
__FUNCTION__
,
type
&
PV_MASK
,
p
.
pl
);
/* Skip parameter */
return
p
.
pl
+
2
;
...
...
@@ -251,7 +246,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
le32_to_cpus
(
&
p
.
pv
.
i
);
break
;
default:
WARNING
(
__FUNCTION__
"() length %d not supported
\n
"
,
p
.
pl
);
WARNING
(
"%s: length %d not supported
\n
"
,
__FUNCTION__
,
p
.
pl
);
/* Skip parameter */
return
p
.
pl
+
2
;
...
...
@@ -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)
*
*
*
*/
static
int
irda_extract_string
(
void
*
self
,
__u8
*
buf
,
int
len
,
__u8
pi
,
PV_TYPE
type
,
PI_HANDLER
func
)
...
...
@@ -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 */
if
(
len
<
(
2
+
p
.
pl
))
{
WARNING
(
__FUNCTION__
"(), buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
p
.
pl
,
len
);
WARNING
(
"%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
__FUNCTION__
,
p
.
pl
,
len
);
return
-
1
;
}
...
...
@@ -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)
*
*
*
*/
static
int
irda_extract_octseq
(
void
*
self
,
__u8
*
buf
,
int
len
,
__u8
pi
,
PV_TYPE
type
,
PI_HANDLER
func
)
...
...
@@ -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 */
if
(
len
<
(
2
+
p
.
pl
))
{
WARNING
(
__FUNCTION__
"(), buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
p
.
pl
,
len
);
WARNING
(
"%s: buffer to short for parsing! "
"Need %d bytes, but len is only %d
\n
"
,
__FUNCTION__
,
p
.
pl
,
len
);
return
-
1
;
}
...
...
@@ -380,7 +371,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
va_end
(
args
);
return
-
1
;
}
}
va_end
(
args
);
...
...
@@ -389,9 +379,6 @@ int irda_param_pack(__u8 *buf, char *fmt, ...)
/*
* Function irda_param_unpack (skb, 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,
/* Check if handler has been implemented */
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 */
return
-
1
;
}
...
...
@@ -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 */
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 */
return
2
+
buf
[
n
+
1
];
/* Continue */
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment