Commit 34364495 authored by Jon Grimm's avatar Jon Grimm

[SCTP] Fix warning and unused (sfr@canb.auug.org.au)

Patch submitted by Stephen Rothwell to change 'flags' to
unsigned long and remove 'unused' attribute. 
parent 89f0091e
...@@ -356,7 +356,7 @@ for (pos = (head)->next;\ ...@@ -356,7 +356,7 @@ for (pos = (head)->next;\
static inline void sctp_skb_list_tail(struct sk_buff_head *list, static inline void sctp_skb_list_tail(struct sk_buff_head *list,
struct sk_buff_head *head) struct sk_buff_head *head)
{ {
int flags __attribute__ ((unused)); unsigned long flags;
sctp_spin_lock_irqsave(&head->lock, flags); sctp_spin_lock_irqsave(&head->lock, flags);
sctp_spin_lock(&list->lock); sctp_spin_lock(&list->lock);
......
...@@ -170,7 +170,7 @@ static void __sctp_get_local_addr_list(struct sctp_protocol *proto) ...@@ -170,7 +170,7 @@ static void __sctp_get_local_addr_list(struct sctp_protocol *proto)
static void sctp_get_local_addr_list(struct sctp_protocol *proto) static void sctp_get_local_addr_list(struct sctp_protocol *proto)
{ {
long flags __attribute__ ((unused)); unsigned long flags;
sctp_spin_lock_irqsave(&sctp_proto.local_addr_lock, flags); sctp_spin_lock_irqsave(&sctp_proto.local_addr_lock, flags);
__sctp_get_local_addr_list(&sctp_proto); __sctp_get_local_addr_list(&sctp_proto);
...@@ -193,7 +193,7 @@ static void __sctp_free_local_addr_list(struct sctp_protocol *proto) ...@@ -193,7 +193,7 @@ static void __sctp_free_local_addr_list(struct sctp_protocol *proto)
/* Free the existing local addresses. */ /* Free the existing local addresses. */
static void sctp_free_local_addr_list(struct sctp_protocol *proto) static void sctp_free_local_addr_list(struct sctp_protocol *proto)
{ {
long flags __attribute__ ((unused)); unsigned long flags;
sctp_spin_lock_irqsave(&proto->local_addr_lock, flags); sctp_spin_lock_irqsave(&proto->local_addr_lock, flags);
__sctp_free_local_addr_list(proto); __sctp_free_local_addr_list(proto);
...@@ -208,7 +208,7 @@ int sctp_copy_local_addr_list(struct sctp_protocol *proto, ...@@ -208,7 +208,7 @@ int sctp_copy_local_addr_list(struct sctp_protocol *proto,
struct sockaddr_storage_list *addr; struct sockaddr_storage_list *addr;
int error = 0; int error = 0;
struct list_head *pos; struct list_head *pos;
long flags __attribute__ ((unused)); unsigned long flags;
sctp_spin_lock_irqsave(&proto->local_addr_lock, flags); sctp_spin_lock_irqsave(&proto->local_addr_lock, flags);
list_for_each(pos, &proto->local_addr_list) { list_for_each(pos, &proto->local_addr_list) {
...@@ -543,10 +543,10 @@ struct sock *sctp_v4_create_accept_sk(struct sock *sk, ...@@ -543,10 +543,10 @@ struct sock *sctp_v4_create_accept_sk(struct sock *sk,
/* Event handler for inet address addition/deletion events. /* Event handler for inet address addition/deletion events.
* Basically, whenever there is an event, we re-build our local address list. * Basically, whenever there is an event, we re-build our local address list.
*/ */
static int sctp_inetaddr_event(struct notifier_block *this, unsigned long event, static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
void *ptr) void *ptr)
{ {
long flags __attribute__ ((unused)); unsigned long flags;
sctp_spin_lock_irqsave(&sctp_proto.local_addr_lock, flags); sctp_spin_lock_irqsave(&sctp_proto.local_addr_lock, flags);
__sctp_free_local_addr_list(&sctp_proto); __sctp_free_local_addr_list(&sctp_proto);
......
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