All of lore.kernel.org
 help / color / mirror / Atom feed
From: Madhumthia Prabakaran <madhumithabiw@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions
Date: Thu, 14 Mar 2019 11:03:39 -0500	[thread overview]
Message-ID: <20190314160338.GA14192@madhuleo> (raw)
In-Reply-To: <alpine.DEB.2.21.1903140708190.2814@hadrien>

On Thu, Mar 14, 2019 at 07:15:45AM +0100, Julia Lawall wrote:
> > The change need to be made in two files -  drivers/staging/rtl8723bs/core/rtw_cmd.c
> > 1) drivers/staging/rtl8723bs/core/rtw_cmd.c
> > 2) drivers/staging/rtl8723bs/include/cmd_osdep.h (to remove extern from function prototypes)
> 
> If you change the .c file in the first patch and the .h file in the second
> patch, then the first patch will break the build.  On the other hand, if
> you change the .h file in the first patch that will not change anything,
> because no one cares about the declaration.
> 
> Still I think it would make sense to do the whole thing at once, in a
> single patch.  A function definition and its prototype go together, so if
> you change both it would make the most sense to do the whole thing at once.

Will fix as a patch. 
> 
> > So that's reason why I asked whether it has to be send as patch series or I can submit it as individual patches.
> 
> Not individual patches.  Either a series with the .h file first and then the
> change in the .c file, or a single patch.
> 
> 
> > In rtw_cmd.c, along with the change already made, I will change the
> > return expression. i.e.
> 
> Your message got broken off here, But you don't want the change already
> made.  There is no point to have a function that has the only statement to
> call another function.The two functions that you changed should just be
> dropped completely.

I will drop the patch. But the function is calling same function with
different return type. I never encountered this type of function in C. 
This is function overloading in C++. Based on Brian and Dennis, only
change I can make on that function I can edit the return type with 
return (u32) _rtw_init_cmd_priv(pcmdpriv).
Am I thinking straight for fixing it? Need for suggestions?

> 
> Again, please put your replies inline after the text that you are
> replying to and not at the very end of the message, after the list
> management information.
> 
> 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.21.1903140708190.2814%40hadrien.
> For more options, visit https://groups.google.com/d/optout.


  reply	other threads:[~2019-03-14 16:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 15:54 [PATCH] Staging: rtl872bs: Remove local variables in functions Madhumitha Prabakaran
2019-03-13 19:48 ` [Outreachy kernel] " Julia Lawall
2019-03-13 21:49   ` Madhumthia Prabakaran
2019-03-13 22:06     ` Julia Lawall
2019-03-13 22:36       ` Madhumthia Prabakaran
2019-03-14  6:15         ` Julia Lawall
2019-03-14 16:03           ` Madhumthia Prabakaran [this message]
2019-03-14 19:52             ` Julia Lawall
2019-03-14 22:14               ` Madhumthia Prabakaran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190314160338.GA14192@madhuleo \
    --to=madhumithabiw@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.