* [PATCH] Staging: rtl872bs: Remove local variables in functions @ 2019-03-13 15:54 Madhumitha Prabakaran 2019-03-13 19:48 ` [Outreachy kernel] " Julia Lawall 0 siblings, 1 reply; 9+ messages in thread From: Madhumitha Prabakaran @ 2019-03-13 15:54 UTC (permalink / raw) To: gregkh, outreachy-kernel; +Cc: Madhumitha Prabakaran Remove declarations of local variables in functions rtw_init_cmd_priv and rtw_init_evt_priv. Issue suggested by Coccinelle using ret.cocci. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 91520ca3bbad..814a4b7677a9 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { - u32 res; - - res = _rtw_init_cmd_priv(pcmdpriv); - return res; + return _rtw_init_cmd_priv(pcmdpriv); } u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) { - int res; - - res = _rtw_init_evt_priv(pevtpriv); - return res; + return _rtw_init_evt_priv(pevtpriv); } void rtw_free_evt_priv(struct evt_priv *pevtpriv) -- 2.17.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-13 15:54 [PATCH] Staging: rtl872bs: Remove local variables in functions Madhumitha Prabakaran @ 2019-03-13 19:48 ` Julia Lawall 2019-03-13 21:49 ` Madhumthia Prabakaran 0 siblings, 1 reply; 9+ messages in thread From: Julia Lawall @ 2019-03-13 19:48 UTC (permalink / raw) To: Madhumitha Prabakaran; +Cc: gregkh, outreachy-kernel On Wed, 13 Mar 2019, Madhumitha Prabakaran wrote: > Remove declarations of local variables in functions rtw_init_cmd_priv > and rtw_init_evt_priv. > Issue suggested by Coccinelle using ret.cocci. > > Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> > --- > drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c > index 91520ca3bbad..814a4b7677a9 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c > @@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) > > u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) > { > - u32 res; > - > - res = _rtw_init_cmd_priv(pcmdpriv); > - return res; > + return _rtw_init_cmd_priv(pcmdpriv); > } > > u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) > { > - int res; > - > - res = _rtw_init_evt_priv(pevtpriv); > - return res; > + return _rtw_init_evt_priv(pevtpriv); > } I wonder if there is something more drastic that you could do here. The functions that these functions call (the ones with the _s) are called only once. They have a different return type (sint) than these functions (u32). They are declared as extern, but they are only used in the file in which they are defined. It looks like things could be greatly simplified. julia > > void rtw_free_evt_priv(struct evt_priv *pevtpriv) > -- > 2.17.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/20190313155425.5548-1-madhumithabiw%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-13 19:48 ` [Outreachy kernel] " Julia Lawall @ 2019-03-13 21:49 ` Madhumthia Prabakaran 2019-03-13 22:06 ` Julia Lawall 0 siblings, 1 reply; 9+ messages in thread From: Madhumthia Prabakaran @ 2019-03-13 21:49 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel On Wed, Mar 13, 2019 at 08:48:09PM +0100, Julia Lawall wrote: > > > On Wed, 13 Mar 2019, Madhumitha Prabakaran wrote: > > > Remove declarations of local variables in functions rtw_init_cmd_priv > > and rtw_init_evt_priv. > > Issue suggested by Coccinelle using ret.cocci. > > > > Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> > > --- > > drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > index 91520ca3bbad..814a4b7677a9 100644 > > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c > > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > @@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) > > > > u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) > > { > > - u32 res; > > - > > - res = _rtw_init_cmd_priv(pcmdpriv); > > - return res; > > + return _rtw_init_cmd_priv(pcmdpriv); > > } > > > > u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) > > { > > - int res; > > - > > - res = _rtw_init_evt_priv(pevtpriv); > > - return res; > > + return _rtw_init_evt_priv(pevtpriv); > > } > > I wonder if there is something more drastic that you could do here. The > functions that these functions call (the ones with the _s) are called only > once. They have a different return type (sint) than these functions > (u32). They are declared as extern, but they are only used in the file in > which they are defined. It looks like things could be greatly simplified. > > julia > > > > > > void rtw_free_evt_priv(struct evt_priv *pevtpriv) > > -- > > 2.17.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/20190313155425.5548-1-madhumithabiw%40gmail.com. > > 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/alpine.DEB.2.21.1903132045230.2515%40hadrien. > For more options, visit https://groups.google.com/d/optout. Should I submit this as patch series, along with other modified file. Thanks, Madhumitha ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-13 21:49 ` Madhumthia Prabakaran @ 2019-03-13 22:06 ` Julia Lawall 2019-03-13 22:36 ` Madhumthia Prabakaran 0 siblings, 1 reply; 9+ messages in thread From: Julia Lawall @ 2019-03-13 22:06 UTC (permalink / raw) To: Madhumthia Prabakaran; +Cc: outreachy-kernel On Wed, 13 Mar 2019, Madhumthia Prabakaran wrote: > On Wed, Mar 13, 2019 at 08:48:09PM +0100, Julia Lawall wrote: > > > > > > On Wed, 13 Mar 2019, Madhumitha Prabakaran wrote: > > > > > Remove declarations of local variables in functions rtw_init_cmd_priv > > > and rtw_init_evt_priv. > > > Issue suggested by Coccinelle using ret.cocci. > > > > > > Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> > > > --- > > > drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- > > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > index 91520ca3bbad..814a4b7677a9 100644 > > > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > @@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) > > > > > > u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) > > > { > > > - u32 res; > > > - > > > - res = _rtw_init_cmd_priv(pcmdpriv); > > > - return res; > > > + return _rtw_init_cmd_priv(pcmdpriv); > > > } > > > > > > u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) > > > { > > > - int res; > > > - > > > - res = _rtw_init_evt_priv(pevtpriv); > > > - return res; > > > + return _rtw_init_evt_priv(pevtpriv); > > > } > > > > I wonder if there is something more drastic that you could do here. The > > functions that these functions call (the ones with the _s) are called only > > once. They have a different return type (sint) than these functions > > (u32). They are declared as extern, but they are only used in the file in > > which they are defined. It looks like things could be greatly simplified. > > > > julia > > > > > > > > > > void rtw_free_evt_priv(struct evt_priv *pevtpriv) > > > -- > > > 2.17.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/20190313155425.5548-1-madhumithabiw%40gmail.com. > > > 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/alpine.DEB.2.21.1903132045230.2515%40hadrien. > > For more options, visit https://groups.google.com/d/optout. > > Should I submit this as patch series, along with other modified file. I'm not sure to understand the question. I expect that the changes I suggest above would need to be in one patch, because the kernel has to be able to compiler after each patch is applied. Please respond to messages right below the text you are responding to, and not at the end of the message. There is currently a good chance that your comments will be missed, because one doesn't pay much attention to what comes after the bla bla bla information about the group. julia ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-13 22:06 ` Julia Lawall @ 2019-03-13 22:36 ` Madhumthia Prabakaran 2019-03-14 6:15 ` Julia Lawall 0 siblings, 1 reply; 9+ messages in thread From: Madhumthia Prabakaran @ 2019-03-13 22:36 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel On Wed, Mar 13, 2019 at 11:06:53PM +0100, Julia Lawall wrote: > > > On Wed, 13 Mar 2019, Madhumthia Prabakaran wrote: > > > On Wed, Mar 13, 2019 at 08:48:09PM +0100, Julia Lawall wrote: > > > > > > > > > On Wed, 13 Mar 2019, Madhumitha Prabakaran wrote: > > > > > > > Remove declarations of local variables in functions rtw_init_cmd_priv > > > > and rtw_init_evt_priv. > > > > Issue suggested by Coccinelle using ret.cocci. > > > > > > > > Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> > > > > --- > > > > drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++-------- > > > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > > > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > > index 91520ca3bbad..814a4b7677a9 100644 > > > > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c > > > > @@ -297,18 +297,12 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) > > > > > > > > u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) > > > > { > > > > - u32 res; > > > > - > > > > - res = _rtw_init_cmd_priv(pcmdpriv); > > > > - return res; > > > > + return _rtw_init_cmd_priv(pcmdpriv); > > > > } > > > > > > > > u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) > > > > { > > > > - int res; > > > > - > > > > - res = _rtw_init_evt_priv(pevtpriv); > > > > - return res; > > > > + return _rtw_init_evt_priv(pevtpriv); > > > > } > > > > > > I wonder if there is something more drastic that you could do here. The > > > functions that these functions call (the ones with the _s) are called only > > > once. They have a different return type (sint) than these functions > > > (u32). They are declared as extern, but they are only used in the file in > > > which they are defined. It looks like things could be greatly simplified. > > > > > > julia > > > > > > > > > > > > > > void rtw_free_evt_priv(struct evt_priv *pevtpriv) > > > > -- > > > > 2.17.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/20190313155425.5548-1-madhumithabiw%40gmail.com. > > > > 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/alpine.DEB.2.21.1903132045230.2515%40hadrien. > > > For more options, visit https://groups.google.com/d/optout. > > > > Should I submit this as patch series, along with other modified file. > > I'm not sure to understand the question. I expect that the changes I > suggest above would need to be in one patch, because the kernel has to be > able to compiler after each patch is applied. > > Please respond to messages right below the text you are responding to, and > not at the end of the message. There is currently a good chance that your > comments will be missed, because one doesn't pay much attention to what > comes after the bla bla bla information about the group. > > 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.1903132304420.2515%40hadrien. > For more options, visit https://groups.google.com/d/optout. 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) So that's reason why I asked whether it has to be send as patch series or I can submit it as individual patches. In rtw_cmd.c, along with the change already made, I will change the return expression. i.e. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-13 22:36 ` Madhumthia Prabakaran @ 2019-03-14 6:15 ` Julia Lawall 2019-03-14 16:03 ` Madhumthia Prabakaran 0 siblings, 1 reply; 9+ messages in thread From: Julia Lawall @ 2019-03-14 6:15 UTC (permalink / raw) To: Madhumthia Prabakaran; +Cc: Julia Lawall, outreachy-kernel > 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. > 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. 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-14 6:15 ` Julia Lawall @ 2019-03-14 16:03 ` Madhumthia Prabakaran 2019-03-14 19:52 ` Julia Lawall 0 siblings, 1 reply; 9+ messages in thread From: Madhumthia Prabakaran @ 2019-03-14 16:03 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel 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. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-14 16:03 ` Madhumthia Prabakaran @ 2019-03-14 19:52 ` Julia Lawall 2019-03-14 22:14 ` Madhumthia Prabakaran 0 siblings, 1 reply; 9+ messages in thread From: Julia Lawall @ 2019-03-14 19:52 UTC (permalink / raw) To: Madhumthia Prabakaran; +Cc: outreachy-kernel On Thu, 14 Mar 2019, Madhumthia Prabakaran wrote: > 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? You should get rid of the functions that you previously modified. Remove the _s from the names of the functions that they call and change the return types. Check in the function body to see if changing the return types causes any problem. I haven't looked at those function definitions. julia > > > > > 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. > > -- > 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/20190314160338.GA14192%40madhuleo. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl872bs: Remove local variables in functions 2019-03-14 19:52 ` Julia Lawall @ 2019-03-14 22:14 ` Madhumthia Prabakaran 0 siblings, 0 replies; 9+ messages in thread From: Madhumthia Prabakaran @ 2019-03-14 22:14 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel On Thu, Mar 14, 2019 at 08:52:01PM +0100, Julia Lawall wrote: > > > On Thu, 14 Mar 2019, Madhumthia Prabakaran wrote: > > > 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? > > You should get rid of the functions that you previously modified. Remove > the _s from the names of the functions that they call and change the > return types. Check in the function body to see if changing the return > types causes any problem. I haven't looked at those function definitions. > Sorry I missed the _s in both the functions and assumed that both are same functions with different return type. So I can't able to think properly. Thanks. > julia > > > > > > > > > > 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. > > > > -- > > 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/20190314160338.GA14192%40madhuleo. > > 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/alpine.DEB.2.21.1903142050180.2749%40hadrien. > For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-03-14 22:14 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 2019-03-14 19:52 ` Julia Lawall 2019-03-14 22:14 ` Madhumthia Prabakaran
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.