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
nexedi
linux
Commits
1299bdaa
Commit
1299bdaa
authored
Jan 27, 2011
by
Sven Eckelmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
batman-adv: Remove unused variables
Signed-off-by:
Sven Eckelmann
<
sven@narfation.org
>
parent
fb86d764
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
net/batman-adv/bat_debugfs.c
net/batman-adv/bat_debugfs.c
+1
-3
net/batman-adv/routing.c
net/batman-adv/routing.c
+0
-7
No files found.
net/batman-adv/bat_debugfs.c
View file @
1299bdaa
...
@@ -52,7 +52,6 @@ static void emit_log_char(struct debug_log *debug_log, char c)
...
@@ -52,7 +52,6 @@ static void emit_log_char(struct debug_log *debug_log, char c)
static
int
fdebug_log
(
struct
debug_log
*
debug_log
,
char
*
fmt
,
...)
static
int
fdebug_log
(
struct
debug_log
*
debug_log
,
char
*
fmt
,
...)
{
{
int
printed_len
;
va_list
args
;
va_list
args
;
static
char
debug_log_buf
[
256
];
static
char
debug_log_buf
[
256
];
char
*
p
;
char
*
p
;
...
@@ -62,8 +61,7 @@ static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
...
@@ -62,8 +61,7 @@ static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
spin_lock_bh
(
&
debug_log
->
lock
);
spin_lock_bh
(
&
debug_log
->
lock
);
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
printed_len
=
vscnprintf
(
debug_log_buf
,
sizeof
(
debug_log_buf
),
vscnprintf
(
debug_log_buf
,
sizeof
(
debug_log_buf
),
fmt
,
args
);
fmt
,
args
);
va_end
(
args
);
va_end
(
args
);
for
(
p
=
debug_log_buf
;
*
p
!=
0
;
p
++
)
for
(
p
=
debug_log_buf
;
*
p
!=
0
;
p
++
)
...
...
net/batman-adv/routing.c
View file @
1299bdaa
...
@@ -807,13 +807,11 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
...
@@ -807,13 +807,11 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
{
{
struct
orig_node
*
orig_node
;
struct
orig_node
*
orig_node
;
struct
icmp_packet_rr
*
icmp_packet
;
struct
icmp_packet_rr
*
icmp_packet
;
struct
ethhdr
*
ethhdr
;
struct
batman_if
*
batman_if
;
struct
batman_if
*
batman_if
;
int
ret
;
int
ret
;
uint8_t
dstaddr
[
ETH_ALEN
];
uint8_t
dstaddr
[
ETH_ALEN
];
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
ethhdr
=
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
/* add data to device queue */
/* add data to device queue */
if
(
icmp_packet
->
msg_type
!=
ECHO_REQUEST
)
{
if
(
icmp_packet
->
msg_type
!=
ECHO_REQUEST
)
{
...
@@ -845,7 +843,6 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
...
@@ -845,7 +843,6 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
return
NET_RX_DROP
;
return
NET_RX_DROP
;
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
ethhdr
=
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
memcpy
(
icmp_packet
->
dst
,
icmp_packet
->
orig
,
ETH_ALEN
);
memcpy
(
icmp_packet
->
dst
,
icmp_packet
->
orig
,
ETH_ALEN
);
memcpy
(
icmp_packet
->
orig
,
memcpy
(
icmp_packet
->
orig
,
...
@@ -867,13 +864,11 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
...
@@ -867,13 +864,11 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
{
{
struct
orig_node
*
orig_node
;
struct
orig_node
*
orig_node
;
struct
icmp_packet
*
icmp_packet
;
struct
icmp_packet
*
icmp_packet
;
struct
ethhdr
*
ethhdr
;
struct
batman_if
*
batman_if
;
struct
batman_if
*
batman_if
;
int
ret
;
int
ret
;
uint8_t
dstaddr
[
ETH_ALEN
];
uint8_t
dstaddr
[
ETH_ALEN
];
icmp_packet
=
(
struct
icmp_packet
*
)
skb
->
data
;
icmp_packet
=
(
struct
icmp_packet
*
)
skb
->
data
;
ethhdr
=
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
/* send TTL exceeded if packet is an echo request (traceroute) */
/* send TTL exceeded if packet is an echo request (traceroute) */
if
(
icmp_packet
->
msg_type
!=
ECHO_REQUEST
)
{
if
(
icmp_packet
->
msg_type
!=
ECHO_REQUEST
)
{
...
@@ -906,7 +901,6 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
...
@@ -906,7 +901,6 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
return
NET_RX_DROP
;
return
NET_RX_DROP
;
icmp_packet
=
(
struct
icmp_packet
*
)
skb
->
data
;
icmp_packet
=
(
struct
icmp_packet
*
)
skb
->
data
;
ethhdr
=
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
memcpy
(
icmp_packet
->
dst
,
icmp_packet
->
orig
,
ETH_ALEN
);
memcpy
(
icmp_packet
->
dst
,
icmp_packet
->
orig
,
ETH_ALEN
);
memcpy
(
icmp_packet
->
orig
,
memcpy
(
icmp_packet
->
orig
,
...
@@ -998,7 +992,6 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
...
@@ -998,7 +992,6 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
return
NET_RX_DROP
;
return
NET_RX_DROP
;
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
icmp_packet
=
(
struct
icmp_packet_rr
*
)
skb
->
data
;
ethhdr
=
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
/* decrement ttl */
/* decrement ttl */
icmp_packet
->
ttl
--
;
icmp_packet
->
ttl
--
;
...
...
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