* [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
@ 2011-07-19 7:58 Matvejchikov Ilya
2011-07-19 15:27 ` Oliver Hartkopp
2011-07-19 23:56 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Matvejchikov Ilya @ 2011-07-19 7:58 UTC (permalink / raw)
To: netdev
Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
---
drivers/net/can/slcan.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 1b49df6..805ee29 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -95,10 +95,6 @@ struct slcan {
unsigned long flags; /* Flag values/ mode etc */
#define SLF_INUSE 0 /* Channel in use */
#define SLF_ERROR 1 /* Parity, etc. error */
-
- unsigned char leased;
- dev_t line;
- pid_t pid;
};
static struct net_device **slcan_devs;
@@ -462,7 +458,7 @@ static void slc_sync(void)
break;
sl = netdev_priv(dev);
- if (sl->tty || sl->leased)
+ if (sl->tty)
continue;
if (dev->flags & IFF_UP)
dev_close(dev);
@@ -565,8 +561,6 @@ static int slcan_open(struct tty_struct *tty)
sl->tty = tty;
tty->disc_data = sl;
- sl->line = tty_devnum(tty);
- sl->pid = current->pid;
if (!test_bit(SLF_INUSE, &sl->flags)) {
/* Perform the low-level SLCAN initialization. */
@@ -617,8 +611,6 @@ static void slcan_close(struct tty_struct *tty)
tty->disc_data = NULL;
sl->tty = NULL;
- if (!sl->leased)
- sl->line = 0;
/* Flush network side */
unregister_netdev(sl->dev);
--
1.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
2011-07-19 7:58 [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure Matvejchikov Ilya
@ 2011-07-19 15:27 ` Oliver Hartkopp
2011-07-19 17:18 ` Matvejchikov Ilya
2011-07-19 23:56 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2011-07-19 15:27 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
On 19.07.2011 09:58, Matvejchikov Ilya wrote:
> Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
> ---
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Thanks Ilya!
Your cleanup is obviously fixing some fallout from this patch
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
which emerged in 2.6.32 for slip.c .
Best regards,
Oliver
> drivers/net/can/slcan.c | 10 +---------
> 1 files changed, 1 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
> index 1b49df6..805ee29 100644
> --- a/drivers/net/can/slcan.c
> +++ b/drivers/net/can/slcan.c
> @@ -95,10 +95,6 @@ struct slcan {
> unsigned long flags; /* Flag values/ mode etc */
> #define SLF_INUSE 0 /* Channel in use */
> #define SLF_ERROR 1 /* Parity, etc. error */
> -
> - unsigned char leased;
> - dev_t line;
> - pid_t pid;
> };
>
> static struct net_device **slcan_devs;
> @@ -462,7 +458,7 @@ static void slc_sync(void)
> break;
>
> sl = netdev_priv(dev);
> - if (sl->tty || sl->leased)
> + if (sl->tty)
> continue;
> if (dev->flags & IFF_UP)
> dev_close(dev);
> @@ -565,8 +561,6 @@ static int slcan_open(struct tty_struct *tty)
>
> sl->tty = tty;
> tty->disc_data = sl;
> - sl->line = tty_devnum(tty);
> - sl->pid = current->pid;
>
> if (!test_bit(SLF_INUSE, &sl->flags)) {
> /* Perform the low-level SLCAN initialization. */
> @@ -617,8 +611,6 @@ static void slcan_close(struct tty_struct *tty)
>
> tty->disc_data = NULL;
> sl->tty = NULL;
> - if (!sl->leased)
> - sl->line = 0;
>
> /* Flush network side */
> unregister_netdev(sl->dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
2011-07-19 15:27 ` Oliver Hartkopp
@ 2011-07-19 17:18 ` Matvejchikov Ilya
0 siblings, 0 replies; 4+ messages in thread
From: Matvejchikov Ilya @ 2011-07-19 17:18 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: netdev
Well, it seems that it is.
2011/7/19 Oliver Hartkopp <socketcan@hartkopp.net>:
> On 19.07.2011 09:58, Matvejchikov Ilya wrote:
>> Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
>> ---
>
> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
>
> Thanks Ilya!
>
> Your cleanup is obviously fixing some fallout from this patch
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
>
> which emerged in 2.6.32 for slip.c .
>
> Best regards,
> Oliver
>
>
>> drivers/net/can/slcan.c | 10 +---------
>> 1 files changed, 1 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
>> index 1b49df6..805ee29 100644
>> --- a/drivers/net/can/slcan.c
>> +++ b/drivers/net/can/slcan.c
>> @@ -95,10 +95,6 @@ struct slcan {
>> unsigned long flags; /* Flag values/ mode etc */
>> #define SLF_INUSE 0 /* Channel in use */
>> #define SLF_ERROR 1 /* Parity, etc. error */
>> -
>> - unsigned char leased;
>> - dev_t line;
>> - pid_t pid;
>> };
>>
>> static struct net_device **slcan_devs;
>> @@ -462,7 +458,7 @@ static void slc_sync(void)
>> break;
>>
>> sl = netdev_priv(dev);
>> - if (sl->tty || sl->leased)
>> + if (sl->tty)
>> continue;
>> if (dev->flags & IFF_UP)
>> dev_close(dev);
>> @@ -565,8 +561,6 @@ static int slcan_open(struct tty_struct *tty)
>>
>> sl->tty = tty;
>> tty->disc_data = sl;
>> - sl->line = tty_devnum(tty);
>> - sl->pid = current->pid;
>>
>> if (!test_bit(SLF_INUSE, &sl->flags)) {
>> /* Perform the low-level SLCAN initialization. */
>> @@ -617,8 +611,6 @@ static void slcan_close(struct tty_struct *tty)
>>
>> tty->disc_data = NULL;
>> sl->tty = NULL;
>> - if (!sl->leased)
>> - sl->line = 0;
>>
>> /* Flush network side */
>> unregister_netdev(sl->dev);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure
2011-07-19 7:58 [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure Matvejchikov Ilya
2011-07-19 15:27 ` Oliver Hartkopp
@ 2011-07-19 23:56 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-07-19 23:56 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Tue, 19 Jul 2011 11:58:48 +0400
> Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-19 23:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 7:58 [PATCH] slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure Matvejchikov Ilya
2011-07-19 15:27 ` Oliver Hartkopp
2011-07-19 17:18 ` Matvejchikov Ilya
2011-07-19 23:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).