2009-01-21 18:55:39

by Andrey Borzenkov

[permalink] [raw]
Subject: [PATCH] orinoco: trivial cleanup in alloc_orinocodev

Subject: [PATCH] orinoco: trivial cleanup in alloc_orinocodev
From: Andrey Borzenkov <[email protected]>

Remove extra space; remove redundant cast

Signed-off-by: Andrey Borzenkov <[email protected]>

---

This is on top of previous patch for struct net_device_ops.

drivers/net/wireless/orinoco/orinoco.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/drivers/net/wireless/orinoco/orinoco.c
b/drivers/net/wireless/orinoco/orinoco.c
index d1207d0..497f324 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -3603,7 +3603,7 @@ struct net_device
struct orinoco_private *priv;

dev = alloc_etherdev(sizeof(struct orinoco_private) + sizeof_card);
- if (! dev)
+ if (!dev)
return NULL;
priv = netdev_priv(dev);
priv->ndev = dev;
@@ -3618,7 +3618,7 @@ struct net_device
dev->netdev_ops = &orinoco_netdev_ops;
dev->watchdog_timeo = HZ; /* 1 second timeout */
dev->ethtool_ops = &orinoco_ethtool_ops;
- dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def;
+ dev->wireless_handlers = &orinoco_handler_def;
#ifdef WIRELESS_SPY
priv->wireless_data.spy_data = &priv->spy_data;
dev->wireless_data = &priv->wireless_data;


Attachments:
(No filename) (1.20 kB)
signature.asc (197.00 B)
This is a digitally signed message part.
Download all attachments

2009-01-21 20:21:37

by Pavel Roskin

[permalink] [raw]
Subject: Re: [Orinoco-devel] [PATCH] orinoco: trivial cleanup in alloc_orinocodev

On Wed, 2009-01-21 at 21:55 +0300, Andrey Borzenkov wrote:
> Subject: [PATCH] orinoco: trivial cleanup in alloc_orinocodev
> From: Andrey Borzenkov <[email protected]>
>
> Remove extra space; remove redundant cast
>
> Signed-off-by: Andrey Borzenkov <[email protected]>

Signed-off-by: Pavel Roskin <[email protected]>

> - if (! dev)
> + if (!dev)

There are 41 occurrences of "(! " in drivers/net/wireless, all in
drivers/net/wireless/orinoco. Care to fix them all?

By the way, I made a patch that adds all C sources in
drivers/net/wireless/orinoco and ran it through checkpatch.pl. There
were 226 errors and 174 warnings. That includes those spaces, trailing
whitespace, excessively long lines and so on. It would be great if you
fix at least some of that. Actually, long lines are justified in many
cases, so please don't overdo it.

> - dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def;
> + dev->wireless_handlers = &orinoco_handler_def;

That's fine.

--
Regards,
Pavel Roskin

2009-01-22 16:33:20

by Pavel Roskin

[permalink] [raw]
Subject: Re: [Orinoco-devel] [PATCH] orinoco: trivial cleanup in alloc_orinocodev

On Thu, 2009-01-22 at 11:19 +0200, Kalle Valo wrote:
> Pavel Roskin <[email protected]> writes:
>
> > By the way, I made a patch that adds all C sources in
> > drivers/net/wireless/orinoco and ran it through checkpatch.pl.
>
> You can use checkpatch's --file argument directly, no need to create
> patches manually :)

Thanks. Doing it now!

--
Regards,
Pavel Roskin

2009-01-21 20:46:22

by Pavel Roskin

[permalink] [raw]
Subject: Re: [Orinoco-devel] [PATCH] orinoco: trivial cleanup in alloc_orinocodev

On Wed, 2009-01-21 at 20:32 +0000, Dave wrote:

> I've a patch series reorganising the orinoco driver a bit to help with
> future changes. It should fix a good proportion of those warnings. I
> plan to post it soon - so I'd appreciate it if you held off submitting
> further cleanup patches until I get it done (I'll try for the end of
> this week).
>
> I should be able to rebase around this one.

OK, good to know.

--
Regards,
Pavel Roskin

2009-01-21 20:32:27

by Dave Kilroy

[permalink] [raw]
Subject: Re: [Orinoco-devel] [PATCH] orinoco: trivial cleanup in alloc_orinocodev

Pavel Roskin wrote:
> On Wed, 2009-01-21 at 21:55 +0300, Andrey Borzenkov wrote:
>> Subject: [PATCH] orinoco: trivial cleanup in alloc_orinocodev
>> From: Andrey Borzenkov <[email protected]>
>>
>> Remove extra space; remove redundant cast
>>
>> Signed-off-by: Andrey Borzenkov <[email protected]>
>
> Signed-off-by: Pavel Roskin <[email protected]>
>
>> - if (! dev)
>> + if (!dev)
>
> There are 41 occurrences of "(! " in drivers/net/wireless, all in
> drivers/net/wireless/orinoco. Care to fix them all?
>
> By the way, I made a patch that adds all C sources in
> drivers/net/wireless/orinoco and ran it through checkpatch.pl. There
> were 226 errors and 174 warnings. That includes those spaces, trailing
> whitespace, excessively long lines and so on. It would be great if you
> fix at least some of that. Actually, long lines are justified in many
> cases, so please don't overdo it.

I've a patch series reorganising the orinoco driver a bit to help with
future changes. It should fix a good proportion of those warnings. I
plan to post it soon - so I'd appreciate it if you held off submitting
further cleanup patches until I get it done (I'll try for the end of
this week).

I should be able to rebase around this one.


Thanks,

Dave.

2009-01-22 09:19:46

by Kalle Valo

[permalink] [raw]
Subject: Re: [Orinoco-devel] [PATCH] orinoco: trivial cleanup in alloc_orinocodev

Pavel Roskin <[email protected]> writes:

> By the way, I made a patch that adds all C sources in
> drivers/net/wireless/orinoco and ran it through checkpatch.pl.

You can use checkpatch's --file argument directly, no need to create
patches manually :)

--
Kalle Valo