All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table
@ 2016-09-12 19:08 Bhumika Goyal
  2016-09-12 21:18 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2016-09-12 19:08 UTC (permalink / raw)
  To: outreachy-kernel, forest, gregkh; +Cc: Bhumika Goyal

The function vnt_key_init_table is not used anywhere in the kernel.
Therefore, remove the function definition and prototype.
Grepped to find occurences.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/vt6655/key.c | 10 ----------
 drivers/staging/vt6655/key.h |  2 --
 2 files changed, 12 deletions(-)

diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
index ffcaf25..e161d5d 100644
--- a/drivers/staging/vt6655/key.c
+++ b/drivers/staging/vt6655/key.c
@@ -31,16 +31,6 @@
 #include "key.h"
 #include "mac.h"
 
-int vnt_key_init_table(struct vnt_private *priv)
-{
-	u32 i;
-
-	for (i = 0; i < MAX_KEY_TABLE; i++)
-		MACvDisableKeyEntry(priv, i);
-
-	return 0;
-}
-
 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,
 	struct ieee80211_key_conf *key, u32 key_type, u32 mode,
 	bool onfly_latch)
diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h
index 261f818..d7271974 100644
--- a/drivers/staging/vt6655/key.h
+++ b/drivers/staging/vt6655/key.h
@@ -61,8 +61,6 @@
 
 struct vnt_private;
 
-int vnt_key_init_table(struct vnt_private *);
-
 int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
 		 struct ieee80211_vif *vif, struct ieee80211_key_conf *key);
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table
  2016-09-12 19:08 [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table Bhumika Goyal
@ 2016-09-12 21:18 ` Julia Lawall
  2016-09-13  9:56   ` Bhumika Goyal
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2016-09-12 21:18 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel, forest, gregkh



On Tue, 13 Sep 2016, Bhumika Goyal wrote:

> The function vnt_key_init_table is not used anywhere in the kernel.
> Therefore, remove the function definition and prototype.
> Grepped to find occurences.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/vt6655/key.c | 10 ----------
>  drivers/staging/vt6655/key.h |  2 --
>  2 files changed, 12 deletions(-)
>
> diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
> index ffcaf25..e161d5d 100644
> --- a/drivers/staging/vt6655/key.c
> +++ b/drivers/staging/vt6655/key.c
> @@ -31,16 +31,6 @@
>  #include "key.h"
>  #include "mac.h"
>
> -int vnt_key_init_table(struct vnt_private *priv)
> -{
> -	u32 i;
> -
> -	for (i = 0; i < MAX_KEY_TABLE; i++)
> -		MACvDisableKeyEntry(priv, i);

Nice to see things go.  Did you check whether there are other uses of
MAX_KEY_TABLE and MACvDisableKeyEntry?

julia

> -
> -	return 0;
> -}
> -
>  static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,
>  	struct ieee80211_key_conf *key, u32 key_type, u32 mode,
>  	bool onfly_latch)
> diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h
> index 261f818..d7271974 100644
> --- a/drivers/staging/vt6655/key.h
> +++ b/drivers/staging/vt6655/key.h
> @@ -61,8 +61,6 @@
>
>  struct vnt_private;
>
> -int vnt_key_init_table(struct vnt_private *);
> -
>  int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
>  		 struct ieee80211_vif *vif, struct ieee80211_key_conf *key);
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1473707299-29700-1-git-send-email-bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table
  2016-09-12 21:18 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-13  9:56   ` Bhumika Goyal
  2016-09-13  9:59     ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2016-09-13  9:56 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, forest, gregkh

On Tue, Sep 13, 2016 at 2:48 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Tue, 13 Sep 2016, Bhumika Goyal wrote:
>
>> The function vnt_key_init_table is not used anywhere in the kernel.
>> Therefore, remove the function definition and prototype.
>> Grepped to find occurences.
>>
>> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>> ---
>>  drivers/staging/vt6655/key.c | 10 ----------
>>  drivers/staging/vt6655/key.h |  2 --
>>  2 files changed, 12 deletions(-)
>>
>> diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
>> index ffcaf25..e161d5d 100644
>> --- a/drivers/staging/vt6655/key.c
>> +++ b/drivers/staging/vt6655/key.c
>> @@ -31,16 +31,6 @@
>>  #include "key.h"
>>  #include "mac.h"
>>
>> -int vnt_key_init_table(struct vnt_private *priv)
>> -{
>> -     u32 i;
>> -
>> -     for (i = 0; i < MAX_KEY_TABLE; i++)
>> -             MACvDisableKeyEntry(priv, i);
>
> Nice to see things go.  Did you check whether there are other uses of
> MAX_KEY_TABLE and MACvDisableKeyEntry?
>

Yes, both are getting used a couple of times. I will look for other unused ones.

Thanks,
Bhumika

> julia
>
>> -
>> -     return 0;
>> -}
>> -
>>  static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,
>>       struct ieee80211_key_conf *key, u32 key_type, u32 mode,
>>       bool onfly_latch)
>> diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h
>> index 261f818..d7271974 100644
>> --- a/drivers/staging/vt6655/key.h
>> +++ b/drivers/staging/vt6655/key.h
>> @@ -61,8 +61,6 @@
>>
>>  struct vnt_private;
>>
>> -int vnt_key_init_table(struct vnt_private *);
>> -
>>  int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
>>                struct ieee80211_vif *vif, struct ieee80211_key_conf *key);
>>
>> --
>> 1.9.1
>>
>> --
>> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>> To post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1473707299-29700-1-git-send-email-bhumirks%40gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table
  2016-09-13  9:56   ` Bhumika Goyal
@ 2016-09-13  9:59     ` Julia Lawall
  2016-09-13 12:24       ` Bhumika Goyal
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2016-09-13  9:59 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel, forest, gregkh



On Tue, 13 Sep 2016, Bhumika Goyal wrote:

> On Tue, Sep 13, 2016 at 2:48 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> > On Tue, 13 Sep 2016, Bhumika Goyal wrote:
> >
> >> The function vnt_key_init_table is not used anywhere in the kernel.
> >> Therefore, remove the function definition and prototype.
> >> Grepped to find occurences.
> >>
> >> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> >> ---
> >>  drivers/staging/vt6655/key.c | 10 ----------
> >>  drivers/staging/vt6655/key.h |  2 --
> >>  2 files changed, 12 deletions(-)
> >>
> >> diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
> >> index ffcaf25..e161d5d 100644
> >> --- a/drivers/staging/vt6655/key.c
> >> +++ b/drivers/staging/vt6655/key.c
> >> @@ -31,16 +31,6 @@
> >>  #include "key.h"
> >>  #include "mac.h"
> >>
> >> -int vnt_key_init_table(struct vnt_private *priv)
> >> -{
> >> -     u32 i;
> >> -
> >> -     for (i = 0; i < MAX_KEY_TABLE; i++)
> >> -             MACvDisableKeyEntry(priv, i);
> >
> > Nice to see things go.  Did you check whether there are other uses of
> > MAX_KEY_TABLE and MACvDisableKeyEntry?
> >
>
> Yes, both are getting used a couple of times. I will look for other unused ones.

OK.  The case of static functions can be done easily with Coccinelle,
because Coccinelle works on one file at a time, and static functions can
only be used in the same file.  You should still check with grep, and then
with a kernel compile, because sometimes static fuctions can be used in
unexpected ways, due to strange #includes or macro calls.

julia


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table
  2016-09-13  9:59     ` Julia Lawall
@ 2016-09-13 12:24       ` Bhumika Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2016-09-13 12:24 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, forest, gregkh

On Tue, Sep 13, 2016 at 3:29 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Tue, 13 Sep 2016, Bhumika Goyal wrote:
>
>> On Tue, Sep 13, 2016 at 2:48 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>> >
>> >
>> > On Tue, 13 Sep 2016, Bhumika Goyal wrote:
>> >
>> >> The function vnt_key_init_table is not used anywhere in the kernel.
>> >> Therefore, remove the function definition and prototype.
>> >> Grepped to find occurences.
>> >>
>> >> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>> >> ---
>> >>  drivers/staging/vt6655/key.c | 10 ----------
>> >>  drivers/staging/vt6655/key.h |  2 --
>> >>  2 files changed, 12 deletions(-)
>> >>
>> >> diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
>> >> index ffcaf25..e161d5d 100644
>> >> --- a/drivers/staging/vt6655/key.c
>> >> +++ b/drivers/staging/vt6655/key.c
>> >> @@ -31,16 +31,6 @@
>> >>  #include "key.h"
>> >>  #include "mac.h"
>> >>
>> >> -int vnt_key_init_table(struct vnt_private *priv)
>> >> -{
>> >> -     u32 i;
>> >> -
>> >> -     for (i = 0; i < MAX_KEY_TABLE; i++)
>> >> -             MACvDisableKeyEntry(priv, i);
>> >
>> > Nice to see things go.  Did you check whether there are other uses of
>> > MAX_KEY_TABLE and MACvDisableKeyEntry?
>> >
>>
>> Yes, both are getting used a couple of times. I will look for other unused ones.
>
> OK.  The case of static functions can be done easily with Coccinelle,
> because Coccinelle works on one file at a time, and static functions can
> only be used in the same file.  You should still check with grep, and then
> with a kernel compile, because sometimes static fuctions can be used in
> unexpected ways, due to strange #includes or macro calls.
>

Ok, I will work on the static ones first keeping in mind your points.
Thanks for the input.

Thanks,
Bhumika

> julia


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-13 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 19:08 [PATCH] Staging: vt6655: Remove unused function vnt_key_init_table Bhumika Goyal
2016-09-12 21:18 ` [Outreachy kernel] " Julia Lawall
2016-09-13  9:56   ` Bhumika Goyal
2016-09-13  9:59     ` Julia Lawall
2016-09-13 12:24       ` Bhumika Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.