Skip to content

Commit

Permalink
[NET] IRDA: Fix whitespace errors.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
yoshfuji authored and David S. Miller committed Feb 11, 2007
1 parent 981c0ff commit 6819bc2
Show file tree
Hide file tree
Showing 40 changed files with 1,441 additions and 1,441 deletions.
12 changes: 6 additions & 6 deletions net/irda/af_irda.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
sk->sk_shutdown |= SEND_SHUTDOWN;

sk->sk_state_change(sk);
sock_orphan(sk);
sock_orphan(sk);
release_sock(sk);

/* Close our TSAP.
Expand All @@ -158,7 +158,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
irttp_close_tsap(self->tsap);
self->tsap = NULL;
}
}
}

/* Note : once we are there, there is not much you want to do
* with the socket anymore, apart from closing it.
Expand Down Expand Up @@ -1211,7 +1211,7 @@ static int irda_release(struct socket *sock)

IRDA_DEBUG(2, "%s()\n", __FUNCTION__);

if (sk == NULL)
if (sk == NULL)
return 0;

lock_sock(sk);
Expand Down Expand Up @@ -1259,7 +1259,7 @@ static int irda_release(struct socket *sock)
* memory leak is now gone... - Jean II
*/

return 0;
return 0;
}

/*
Expand Down Expand Up @@ -1312,7 +1312,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
len = self->max_data_size;
}

skb = sock_alloc_send_skb(sk, len + self->max_header_size + 16,
skb = sock_alloc_send_skb(sk, len + self->max_header_size + 16,
msg->msg_flags & MSG_DONTWAIT, &err);
if (!skb)
return -ENOBUFS;
Expand Down Expand Up @@ -1714,7 +1714,7 @@ static int irda_shutdown(struct socket *sock, int how)
self->daddr = DEV_ADDR_ANY; /* Until we get re-connected */
self->saddr = 0x0; /* so IrLMP assign us any link */

return 0;
return 0;
}

/*
Expand Down
58 changes: 29 additions & 29 deletions net/irda/discovery.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
*
*
* Filename: discovery.c
* Version: 0.1
* Description: Routines for handling discoveries at the IrLMP layer
Expand All @@ -10,24 +10,24 @@
* Modified by: Dag Brattli <dagb@cs.uit.no>
* Modified at: Fri May 28 3:11 CST 1999
* Modified by: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
*
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
********************************************************************/

#include <linux/string.h>
Expand Down Expand Up @@ -65,9 +65,9 @@ void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *new)

spin_lock_irqsave(&cachelog->hb_spinlock, flags);

/*
* Remove all discoveries of devices that has previously been
* discovered on the same link with the same name (info), or the
/*
* Remove all discoveries of devices that has previously been
* discovered on the same link with the same name (info), or the
* same daddr. We do this since some devices (mostly PDAs) change
* their device address between every discovery.
*/
Expand All @@ -79,10 +79,10 @@ void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *new)
discovery = (discovery_t *) hashbin_get_next(cachelog);

if ((node->data.saddr == new->data.saddr) &&
((node->data.daddr == new->data.daddr) ||
((node->data.daddr == new->data.daddr) ||
(strcmp(node->data.info, new->data.info) == 0)))
{
/* This discovery is a previous discovery
/* This discovery is a previous discovery
* from the same device, so just remove it
*/
hashbin_remove_this(cachelog, (irda_queue_t *) node);
Expand Down Expand Up @@ -134,7 +134,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)

discovery = (discovery_t *) hashbin_remove_first(log);
}

/* Delete the now empty log */
hashbin_delete(log, (FREE_FUNC) kfree);
}
Expand Down Expand Up @@ -232,7 +232,7 @@ void irlmp_dump_discoveries(hashbin_t *log)
while (discovery != NULL) {
IRDA_DEBUG(0, "Discovery:\n");
IRDA_DEBUG(0, " daddr=%08x\n", discovery->data.daddr);
IRDA_DEBUG(0, " saddr=%08x\n", discovery->data.saddr);
IRDA_DEBUG(0, " saddr=%08x\n", discovery->data.saddr);
IRDA_DEBUG(0, " nickname=%s\n", discovery->data.info);

discovery = (discovery_t *) hashbin_get_next(log);
Expand Down Expand Up @@ -321,26 +321,26 @@ static inline discovery_t *discovery_seq_idx(loff_t pos)
{
discovery_t *discovery;

for (discovery = (discovery_t *) hashbin_get_first(irlmp->cachelog);
for (discovery = (discovery_t *) hashbin_get_first(irlmp->cachelog);
discovery != NULL;
discovery = (discovery_t *) hashbin_get_next(irlmp->cachelog)) {
if (pos-- == 0)
break;
}

return discovery;
}

static void *discovery_seq_start(struct seq_file *seq, loff_t *pos)
{
spin_lock_irq(&irlmp->cachelog->hb_spinlock);
return *pos ? discovery_seq_idx(*pos - 1) : SEQ_START_TOKEN;
return *pos ? discovery_seq_idx(*pos - 1) : SEQ_START_TOKEN;
}

static void *discovery_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
++*pos;
return (v == SEQ_START_TOKEN)
return (v == SEQ_START_TOKEN)
? (void *) hashbin_get_first(irlmp->cachelog)
: (void *) hashbin_get_next(irlmp->cachelog);
}
Expand All @@ -357,9 +357,9 @@ static int discovery_seq_show(struct seq_file *seq, void *v)
else {
const discovery_t *discovery = v;

seq_printf(seq, "nickname: %s, hint: 0x%02x%02x",
seq_printf(seq, "nickname: %s, hint: 0x%02x%02x",
discovery->data.info,
discovery->data.hints[0],
discovery->data.hints[0],
discovery->data.hints[1]);
#if 0
if ( discovery->data.hints[0] & HINT_PNP)
Expand All @@ -376,20 +376,20 @@ static int discovery_seq_show(struct seq_file *seq, void *v)
seq_puts(seq, "Fax ");
if ( discovery->data.hints[0] & HINT_LAN)
seq_puts(seq, "LAN Access ");

if ( discovery->data.hints[1] & HINT_TELEPHONY)
seq_puts(seq, "Telephony ");
if ( discovery->data.hints[1] & HINT_FILE_SERVER)
seq_puts(seq, "File Server ");
seq_puts(seq, "File Server ");
if ( discovery->data.hints[1] & HINT_COMM)
seq_puts(seq, "IrCOMM ");
if ( discovery->data.hints[1] & HINT_OBEX)
seq_puts(seq, "IrOBEX ");
#endif
#endif
seq_printf(seq,", saddr: 0x%08x, daddr: 0x%08x\n\n",
discovery->data.saddr,
discovery->data.daddr);

seq_putc(seq, '\n');
}
return 0;
Expand Down
Loading

0 comments on commit 6819bc2

Please sign in to comment.