All of lore.kernel.org
 help / color / mirror / Atom feed
* Doubt regarding use of a function
@ 2017-03-10 17:24 sayli karnik
  2017-03-10 17:26 ` [Outreachy kernel] " Julia Lawall
  2017-03-10 21:27 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: sayli karnik @ 2017-03-10 17:24 UTC (permalink / raw)
  To: outreachy-kernel

ieee80211 has the following function which to me does nothing-
void ieee80211_tkip_null(void)
{
     printk("============>%s()\n", __func__);
     return;
}

Before its function call there is this comment-
/* These function were added to load crypte module autoly */
         ieee80211_tkip_null();

Is this function needed in the driver? If not, can I send in a patch
removing it?


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 17:24 Doubt regarding use of a function sayli karnik
@ 2017-03-10 17:26 ` Julia Lawall
  2017-03-10 17:35   ` sayli karnik
  2017-03-10 21:27 ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2017-03-10 17:26 UTC (permalink / raw)
  To: sayli karnik; +Cc: outreachy-kernel



On Fri, 10 Mar 2017, sayli karnik wrote:

> ieee80211 has the following function which to me does nothing-
> void ieee80211_tkip_null(void)
> {
>      printk("============>%s()\n", __func__);
>      return;
> }
>
> Before its function call there is this comment-
> /* These function were added to load crypte module autoly */
>          ieee80211_tkip_null();
>
> Is this function needed in the driver? If not, can I send in a patch
> removing it?

Are there any maintainers associated with the file?  They would know
better.  I can't see that the function is doing anything useful.

julia


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 17:26 ` [Outreachy kernel] " Julia Lawall
@ 2017-03-10 17:35   ` sayli karnik
  2017-03-10 17:50     ` Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: sayli karnik @ 2017-03-10 17:35 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, Greg Kroah-Hartman

On Fri, Mar 10, 2017 at 10:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Fri, 10 Mar 2017, sayli karnik wrote:
>
>> ieee80211 has the following function which to me does nothing-
>> void ieee80211_tkip_null(void)
>> {
>>      printk("============>%s()\n", __func__);

This printk is commented..forgot the '//' before it

>>      return;
>> }
>>
>> Before its function call there is this comment-
>> /* These function were added to load crypte module autoly */
>>          ieee80211_tkip_null();
>>
>> Is this function needed in the driver? If not, can I send in a patch
>> removing it?
>
> Are there any maintainers associated with the file?  They would know
> better.  I can't see that the function is doing anything useful.
>
maintainer.pl just displays Greg.

> julia
>
> --
> 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/alpine.DEB.2.20.1703101826170.3356%40hadrien.
> For more options, visit https://groups.google.com/d/optout.


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 17:35   ` sayli karnik
@ 2017-03-10 17:50     ` Julia Lawall
  2017-03-10 21:28       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2017-03-10 17:50 UTC (permalink / raw)
  To: sayli karnik; +Cc: outreachy-kernel, Greg Kroah-Hartman



On Fri, 10 Mar 2017, sayli karnik wrote:

> On Fri, Mar 10, 2017 at 10:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> > On Fri, 10 Mar 2017, sayli karnik wrote:
> >
> >> ieee80211 has the following function which to me does nothing-
> >> void ieee80211_tkip_null(void)
> >> {
> >>      printk("============>%s()\n", __func__);
>
> This printk is commented..forgot the '//' before it
>
> >>      return;
> >> }
> >>
> >> Before its function call there is this comment-
> >> /* These function were added to load crypte module autoly */
> >>          ieee80211_tkip_null();
> >>
> >> Is this function needed in the driver? If not, can I send in a patch
> >> removing it?
> >
> > Are there any maintainers associated with the file?  They would know
> > better.  I can't see that the function is doing anything useful.
> >
> maintainer.pl just displays Greg.

Greg,

Is there a general policy about:

functions that do nothing
code under comments
boring logging message

Can we assume that the code as it is in staging basically works, and while
these things may have been a useful reminder in the past, now they can go?

Or is that too much to assume for a general rule?

thanks,
julia


>
> > julia
> >
> > --
> > 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/alpine.DEB.2.20.1703101826170.3356%40hadrien.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/CAKG5xWiM9k_5dhtK5_1A%3DJRatEar3%3DFuYCpFf9Q81iPszb0A5w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 17:24 Doubt regarding use of a function sayli karnik
  2017-03-10 17:26 ` [Outreachy kernel] " Julia Lawall
@ 2017-03-10 21:27 ` Greg KH
  2017-03-11  6:44   ` sayli karnik
  1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2017-03-10 21:27 UTC (permalink / raw)
  To: sayli karnik; +Cc: outreachy-kernel

On Fri, Mar 10, 2017 at 10:54:10PM +0530, sayli karnik wrote:
> ieee80211 has the following function which to me does nothing-
> void ieee80211_tkip_null(void)
> {
>      printk("============>%s()\n", __func__);
>      return;
> }

What exactly directory/file is this?

> Before its function call there is this comment-
> /* These function were added to load crypte module autoly */
>          ieee80211_tkip_null();
> 
> Is this function needed in the driver?

Yes, the function says what it is there for.

> If not, can I send in a patch removing it?

If you do, you have to fix the auto-loading of the module properly :)

thanks,

greg k-h


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 17:50     ` Julia Lawall
@ 2017-03-10 21:28       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-03-10 21:28 UTC (permalink / raw)
  To: Julia Lawall; +Cc: sayli karnik, outreachy-kernel

On Fri, Mar 10, 2017 at 06:50:22PM +0100, Julia Lawall wrote:
> 
> 
> On Fri, 10 Mar 2017, sayli karnik wrote:
> 
> > On Fri, Mar 10, 2017 at 10:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> > >
> > >
> > > On Fri, 10 Mar 2017, sayli karnik wrote:
> > >
> > >> ieee80211 has the following function which to me does nothing-
> > >> void ieee80211_tkip_null(void)
> > >> {
> > >>      printk("============>%s()\n", __func__);
> >
> > This printk is commented..forgot the '//' before it
> >
> > >>      return;
> > >> }
> > >>
> > >> Before its function call there is this comment-
> > >> /* These function were added to load crypte module autoly */
> > >>          ieee80211_tkip_null();
> > >>
> > >> Is this function needed in the driver? If not, can I send in a patch
> > >> removing it?
> > >
> > > Are there any maintainers associated with the file?  They would know
> > > better.  I can't see that the function is doing anything useful.
> > >
> > maintainer.pl just displays Greg.
> 
> Greg,
> 
> Is there a general policy about:
> 
> functions that do nothing
> code under comments
> boring logging message
> 
> Can we assume that the code as it is in staging basically works, and while
> these things may have been a useful reminder in the past, now they can go?

Yes.

> Or is that too much to assume for a general rule?

Nope, delete away!

But note, this code does do something, so that functionality needs to be
preserved.

thanks,

greg k-h


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-10 21:27 ` Greg KH
@ 2017-03-11  6:44   ` sayli karnik
  2017-03-11  7:02     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: sayli karnik @ 2017-03-11  6:44 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

On Sat, Mar 11, 2017 at 2:57 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Fri, Mar 10, 2017 at 10:54:10PM +0530, sayli karnik wrote:
>> ieee80211 has the following function which to me does nothing-
>> void ieee80211_tkip_null(void)
>> {
>>      printk("============>%s()\n", __func__);
>>      return;
>> }
>
> What exactly directory/file is this?
>
staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c: function definition
staging/rtl8192u/ieee80211/ieee80211_module.c: function call

>> Before its function call there is this comment-
>> /* These function were added to load crypte module autoly */
>>          ieee80211_tkip_null();
>>
>> Is this function needed in the driver?
>
> Yes, the function says what it is there for.
>
>> If not, can I send in a patch removing it?
>
> If you do, you have to fix the auto-loading of the module properly :)
>
Is there a way to do that apart from the one currently used?
> thanks,
>
> greg k-h


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

* Re: [Outreachy kernel] Doubt regarding use of a function
  2017-03-11  6:44   ` sayli karnik
@ 2017-03-11  7:02     ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2017-03-11  7:02 UTC (permalink / raw)
  To: sayli karnik; +Cc: outreachy-kernel

On Sat, Mar 11, 2017 at 12:14:47PM +0530, sayli karnik wrote:
> On Sat, Mar 11, 2017 at 2:57 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Fri, Mar 10, 2017 at 10:54:10PM +0530, sayli karnik wrote:
> >> ieee80211 has the following function which to me does nothing-
> >> void ieee80211_tkip_null(void)
> >> {
> >>      printk("============>%s()\n", __func__);
> >>      return;
> >> }
> >
> > What exactly directory/file is this?
> >
> staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c: function definition
> staging/rtl8192u/ieee80211/ieee80211_module.c: function call

Ah, that trainwreck :(

> >> Before its function call there is this comment-
> >> /* These function were added to load crypte module autoly */
> >>          ieee80211_tkip_null();
> >>
> >> Is this function needed in the driver?
> >
> > Yes, the function says what it is there for.
> >
> >> If not, can I send in a patch removing it?
> >
> > If you do, you have to fix the auto-loading of the module properly :)
> >
> Is there a way to do that apart from the one currently used?

First determine if the comment is really correct or not.  Then you can
answer this question.  Maybe I was originally wrong in my statement,
I'll leave it up to you to do the research and figure it out :)

thanks,

greg k-h


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

end of thread, other threads:[~2017-03-11  7:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 17:24 Doubt regarding use of a function sayli karnik
2017-03-10 17:26 ` [Outreachy kernel] " Julia Lawall
2017-03-10 17:35   ` sayli karnik
2017-03-10 17:50     ` Julia Lawall
2017-03-10 21:28       ` Greg Kroah-Hartman
2017-03-10 21:27 ` Greg KH
2017-03-11  6:44   ` sayli karnik
2017-03-11  7:02     ` Greg KH

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.