* [PATCH] Coding style correction on some drivers that use Generic HDLC
@ 2009-12-09 14:35 Rudy Matela
2009-12-09 14:55 ` Jan Yenya Kasprzak
2009-12-09 16:41 ` Krzysztof Halasa
0 siblings, 2 replies; 9+ messages in thread
From: Rudy Matela @ 2009-12-09 14:35 UTC (permalink / raw)
To: Jan Yenya Kasprzak, Krzysztof Halasa, trivial
Cc: linux-kernel, kernel-janitors
Added a space separating some if/switch/while keywords from the following
parenthesis to conform to the CodingStyle.
Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
---
drivers/net/wan/cosa.c | 10 +++++-----
drivers/net/wan/hdlc_cisco.c | 8 ++++----
drivers/net/wan/hdlc_x25.c | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index b36bf96..f0bd70f 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -811,7 +811,7 @@ static ssize_t cosa_read(struct file *file,
cosa_enable_rx(chan);
spin_lock_irqsave(&cosa->lock, flags);
add_wait_queue(&chan->rxwaitq, &wait);
- while(!chan->rx_status) {
+ while (!chan->rx_status) {
current->state = TASK_INTERRUPTIBLE;
spin_unlock_irqrestore(&cosa->lock, flags);
schedule();
@@ -896,7 +896,7 @@ static ssize_t cosa_write(struct file *file,
spin_lock_irqsave(&cosa->lock, flags);
add_wait_queue(&chan->txwaitq, &wait);
- while(!chan->tx_status) {
+ while (!chan->tx_status) {
current->state = TASK_INTERRUPTIBLE;
spin_unlock_irqrestore(&cosa->lock, flags);
schedule();
@@ -1153,7 +1153,7 @@ static int cosa_ioctl_common(struct cosa_data *cosa,
struct channel_data *channel, unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
- switch(cmd) {
+ switch (cmd) {
case COSAIORSET: /* Reset the device */
if (!capable(CAP_NET_ADMIN))
return -EACCES;
@@ -1704,7 +1704,7 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
spin_unlock_irqrestore(&cosa->lock, flags);
return;
}
- while(1) {
+ while (1) {
cosa->txchan++;
i++;
if (cosa->txchan >= cosa->nchannels)
@@ -2010,7 +2010,7 @@ again:
static void debug_status_in(struct cosa_data *cosa, int status)
{
char *s;
- switch(status & SR_CMD_FROM_SRP_MASK) {
+ switch (status & SR_CMD_FROM_SRP_MASK) {
case SR_UP_REQUEST:
s = "RX_REQ";
break;
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
index f1bff98..1ceccf1 100644
--- a/drivers/net/wan/hdlc_cisco.c
+++ b/drivers/net/wan/hdlc_cisco.c
@@ -141,7 +141,7 @@ static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev)
data->address != CISCO_UNICAST)
return cpu_to_be16(ETH_P_HDLC);
- switch(data->protocol) {
+ switch (data->protocol) {
case cpu_to_be16(ETH_P_IP):
case cpu_to_be16(ETH_P_IPX):
case cpu_to_be16(ETH_P_IPV6):
@@ -190,7 +190,7 @@ static int cisco_rx(struct sk_buff *skb)
cisco_data = (struct cisco_packet*)(skb->data + sizeof
(struct hdlc_header));
- switch(ntohl (cisco_data->type)) {
+ switch (ntohl (cisco_data->type)) {
case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */
in_dev = dev->ip_ptr;
addr = 0;
@@ -245,8 +245,8 @@ static int cisco_rx(struct sk_buff *skb)
dev_kfree_skb_any(skb);
return NET_RX_SUCCESS;
- } /* switch(keepalive type) */
- } /* switch(protocol) */
+ } /* switch (keepalive type) */
+ } /* switch (protocol) */
printk(KERN_INFO "%s: Unsupported protocol %x\n", dev->name,
ntohs(data->protocol));
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index aa9248f..6e1ca25 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -202,10 +202,10 @@ static int x25_ioctl(struct net_device *dev, struct ifreq *ifr)
return 0; /* return protocol only, no settable parameters */
case IF_PROTO_X25:
- if(!capable(CAP_NET_ADMIN))
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
- if(dev->flags & IFF_UP)
+ if (dev->flags & IFF_UP)
return -EBUSY;
result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT);
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 14:35 [PATCH] Coding style correction on some drivers that use Generic HDLC Rudy Matela
@ 2009-12-09 14:55 ` Jan Yenya Kasprzak
2009-12-09 15:43 ` walter harms
2009-12-09 16:41 ` Krzysztof Halasa
1 sibling, 1 reply; 9+ messages in thread
From: Jan Yenya Kasprzak @ 2009-12-09 14:55 UTC (permalink / raw)
To: Rudy Matela; +Cc: Krzysztof Halasa, trivial, linux-kernel, kernel-janitors
Rudy Matela wrote:
: Added a space separating some if/switch/while keywords from the following
: parenthesis to conform to the CodingStyle.
Hello,
I am not sure whether it is necessary to fix formating mistakes in
a driver which is in deep freeze and the hardware is not produced anymore,
but whatever.
Acked-By: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
-Yenya
: Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
: ---
:
: drivers/net/wan/cosa.c | 10 +++++-----
: drivers/net/wan/hdlc_cisco.c | 8 ++++----
: drivers/net/wan/hdlc_x25.c | 4 ++--
: 3 files changed, 11 insertions(+), 11 deletions(-)
:
: diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
: index b36bf96..f0bd70f 100644
--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list. --Alan Cox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 14:55 ` Jan Yenya Kasprzak
@ 2009-12-09 15:43 ` walter harms
2009-12-09 21:09 ` Rudy Matela
0 siblings, 1 reply; 9+ messages in thread
From: walter harms @ 2009-12-09 15:43 UTC (permalink / raw)
To: Jan Yenya Kasprzak
Cc: Rudy Matela, Krzysztof Halasa, trivial, linux-kernel,
kernel-janitors
Jan Yenya Kasprzak schrieb:
> Rudy Matela wrote:
> : Added a space separating some if/switch/while keywords from the following
> : parenthesis to conform to the CodingStyle.
>
> Hello,
>
> I am not sure whether it is necessary to fix formating mistakes in
> a driver which is in deep freeze and the hardware is not produced anymore,
> but whatever.
>
> Acked-By: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
>
> -Yenya
>
> : Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
> : ---
> :
> : drivers/net/wan/cosa.c | 10 +++++-----
> : drivers/net/wan/hdlc_cisco.c | 8 ++++----
> : drivers/net/wan/hdlc_x25.c | 4 ++--
> : 3 files changed, 11 insertions(+), 11 deletions(-)
> :
> : diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
> : index b36bf96..f0bd70f 100644
>
It is ok until the driver is removed, if this "issue" is not fixed it will
trigger any check-coding-style and generate new patches. Since it involves
no code changes it is harmless.
re,
wh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 14:35 [PATCH] Coding style correction on some drivers that use Generic HDLC Rudy Matela
2009-12-09 14:55 ` Jan Yenya Kasprzak
@ 2009-12-09 16:41 ` Krzysztof Halasa
2009-12-09 23:24 ` Jiri Kosina
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Halasa @ 2009-12-09 16:41 UTC (permalink / raw)
To: Rudy Matela; +Cc: Jan Yenya Kasprzak, trivial, linux-kernel, kernel-janitors
Rudy Matela <rudy.matela@gmail.com> writes:
> Added a space separating some if/switch/while keywords from the following
> parenthesis to conform to the CodingStyle.
>
> Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
> ---
>
> drivers/net/wan/cosa.c | 10 +++++-----
> drivers/net/wan/hdlc_cisco.c | 8 ++++----
> drivers/net/wan/hdlc_x25.c | 4 ++--
Ack from me, though a subset may already be in David Miller's tree.
Git merge can handle it without problems I guess.
Who is to commit this?
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 15:43 ` walter harms
@ 2009-12-09 21:09 ` Rudy Matela
2009-12-09 23:26 ` Jiri Kosina
0 siblings, 1 reply; 9+ messages in thread
From: Rudy Matela @ 2009-12-09 21:09 UTC (permalink / raw)
To: wharms
Cc: Jan Yenya Kasprzak, Krzysztof Halasa, trivial, linux-kernel,
kernel-janitors
On Wed, Dec 9, 2009 at 12:43, walter harms <wharms@bfs.de> wrote:
>
>
> Jan Yenya Kasprzak schrieb:
>> Rudy Matela wrote:
>> : Added a space separating some if/switch/while keywords from the following
>> : parenthesis to conform to the CodingStyle.
>>
>> Hello,
>>
>> I am not sure whether it is necessary to fix formating mistakes in
>> a driver which is in deep freeze and the hardware is not produced anymore,
>> but whatever.
>>
>
> It is ok until the driver is removed, if this "issue" is not fixed it will
> trigger any check-coding-style and generate new patches. Since it involves
> no code changes it is harmless.
>
> re,
> wh
>
>
Hello to all,
Sould I keep sending coding style corrections to the Linux Kernel?
I'm trying to help, but if i'm just being annoying, please tell me and
I can try to contribute in a better way. :-)
Regards,
Rudy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 16:41 ` Krzysztof Halasa
@ 2009-12-09 23:24 ` Jiri Kosina
2009-12-10 17:41 ` Krzysztof Halasa
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2009-12-09 23:24 UTC (permalink / raw)
To: Krzysztof Halasa
Cc: Rudy Matela, Jan Yenya Kasprzak, linux-kernel, kernel-janitors
On Wed, 9 Dec 2009, Krzysztof Halasa wrote:
> > Added a space separating some if/switch/while keywords from the following
> > parenthesis to conform to the CodingStyle.
> >
> > Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
> > ---
> >
> > drivers/net/wan/cosa.c | 10 +++++-----
> > drivers/net/wan/hdlc_cisco.c | 8 ++++----
> > drivers/net/wan/hdlc_x25.c | 4 ++--
>
> Ack from me, though a subset may already be in David Miller's tree.
> Git merge can handle it without problems I guess.
>
> Who is to commit this?
I will take care of it once the currently undergoing merging is done.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 21:09 ` Rudy Matela
@ 2009-12-09 23:26 ` Jiri Kosina
2009-12-10 0:40 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2009-12-09 23:26 UTC (permalink / raw)
To: Rudy Matela
Cc: wharms, Jan Yenya Kasprzak, Krzysztof Halasa, linux-kernel,
kernel-janitors
On Wed, 9 Dec 2009, Rudy Matela wrote:
> > It is ok until the driver is removed, if this "issue" is not fixed it
> > will trigger any check-coding-style and generate new patches. Since it
> > involves no code changes it is harmless.
> Sould I keep sending coding style corrections to the Linux Kernel?
> I'm trying to help, but if i'm just being annoying, please tell me and
> I can try to contribute in a better way. :-)
Coding style corrections (if they really improve readability of the code),
comment fixes (if they really make grepping for things better or make the
whole text more understandable) are welcome and I will happily merge them.
What I usually don't merge are purely whitespace "fixes", which don't
really fix anything in fact.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 23:26 ` Jiri Kosina
@ 2009-12-10 0:40 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-12-10 0:40 UTC (permalink / raw)
To: jkosina; +Cc: rudy.matela, wharms, kas, khc, linux-kernel, kernel-janitors
From: Jiri Kosina <jkosina@suse.cz>
Date: Thu, 10 Dec 2009 00:26:57 +0100 (CET)
> On Wed, 9 Dec 2009, Rudy Matela wrote:
>
>> > It is ok until the driver is removed, if this "issue" is not fixed it
>> > will trigger any check-coding-style and generate new patches. Since it
>> > involves no code changes it is harmless.
>> Sould I keep sending coding style corrections to the Linux Kernel?
>> I'm trying to help, but if i'm just being annoying, please tell me and
>> I can try to contribute in a better way. :-)
>
> Coding style corrections (if they really improve readability of the code),
> comment fixes (if they really make grepping for things better or make the
> whole text more understandable) are welcome and I will happily merge them.
>
> What I usually don't merge are purely whitespace "fixes", which don't
> really fix anything in fact.
I think the whitespace ones here are extremely valuable, the code is
amazingly annoying to read as it is.
It boils down to this:
foo() is a C function call
foo () is a C operation like 'if', 'while' etc.
and people's brains are wired to this association.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Coding style correction on some drivers that use Generic HDLC
2009-12-09 23:24 ` Jiri Kosina
@ 2009-12-10 17:41 ` Krzysztof Halasa
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Halasa @ 2009-12-10 17:41 UTC (permalink / raw)
To: Jiri Kosina
Cc: Rudy Matela, Jan Yenya Kasprzak, linux-kernel, kernel-janitors
Jiri Kosina <jkosina@suse.cz> writes:
>> > drivers/net/wan/cosa.c | 10 +++++-----
>> > drivers/net/wan/hdlc_cisco.c | 8 ++++----
>> > drivers/net/wan/hdlc_x25.c | 4 ++--
> I will take care of it once the currently undergoing merging is done.
Thanks.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-12-10 17:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 14:35 [PATCH] Coding style correction on some drivers that use Generic HDLC Rudy Matela
2009-12-09 14:55 ` Jan Yenya Kasprzak
2009-12-09 15:43 ` walter harms
2009-12-09 21:09 ` Rudy Matela
2009-12-09 23:26 ` Jiri Kosina
2009-12-10 0:40 ` David Miller
2009-12-09 16:41 ` Krzysztof Halasa
2009-12-09 23:24 ` Jiri Kosina
2009-12-10 17:41 ` Krzysztof Halasa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox