* [PATCH 0/2] Remove wrapper functions and neat up code
@ 2015-10-23 13:45 Shivani Bhardwaj
2015-10-23 13:46 ` [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function Shivani Bhardwaj
2015-10-23 13:46 ` [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses Shivani Bhardwaj
0 siblings, 2 replies; 8+ messages in thread
From: Shivani Bhardwaj @ 2015-10-23 13:45 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
Unnecessary wrapper functions are removed and their calls replaced
with the appropriate functions. Also, unnecessary braces are removed.
After applying this patch, code becomes neat.
Shivani Bhardwaj (2):
Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper
function
Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses
drivers/staging/wilc1000/coreconfigurator.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function 2015-10-23 13:45 [PATCH 0/2] Remove wrapper functions and neat up code Shivani Bhardwaj @ 2015-10-23 13:46 ` Shivani Bhardwaj 2015-10-25 1:25 ` [Outreachy kernel] " Greg KH 2015-10-27 5:28 ` Greg KH 2015-10-23 13:46 ` [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses Shivani Bhardwaj 1 sibling, 2 replies; 8+ messages in thread From: Shivani Bhardwaj @ 2015-10-23 13:46 UTC (permalink / raw) To: outreachy-kernel; +Cc: outreachy-kernel Remove the function get_current_channel() and replace its calls by get_current_channel_802_11n() as the former function's definition involves only returning the value of latter function. Semantic patch used to find out the issue: @@ identifier f,g; @@ *f(...) { return g(...); } Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> --- drivers/staging/wilc1000/coreconfigurator.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 6dfe26d..1403a33 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -331,13 +331,6 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen) return 0; /* no MIB here */ } -u8 get_current_channel(u8 *pu8msa, u16 u16RxLen) -{ - /* Extract current channel information from */ - /* the beacon/probe response frame */ - return get_current_channel_802_11n(pu8msa, u16RxLen); -} - /** * @brief parses the received 'N' message * @details @@ -425,8 +418,12 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) /* Get BSSID */ get_BSSID(pu8msa, pstrNetworkInfo->au8bssid); - /* Get the current channel */ - pstrNetworkInfo->u8channel = get_current_channel(pu8msa, (u16RxLen + FCS_LEN)); + /* + * Extract current channel information from + * the beacon/probe response frame + */ + pstrNetworkInfo->u8channel = get_current_channel_802_11n(pu8msa, + (u16RxLen + FCS_LEN)); /* Get beacon period */ u8index = (MAC_HDR_LEN + TIME_STAMP_LEN); -- 2.1.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function 2015-10-23 13:46 ` [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function Shivani Bhardwaj @ 2015-10-25 1:25 ` Greg KH 2015-10-25 9:10 ` Shivani Bhardwaj 2015-10-27 5:28 ` Greg KH 1 sibling, 1 reply; 8+ messages in thread From: Greg KH @ 2015-10-25 1:25 UTC (permalink / raw) To: Shivani Bhardwaj; +Cc: outreachy-kernel On Fri, Oct 23, 2015 at 07:16:20PM +0530, Shivani Bhardwaj wrote: > Remove the function get_current_channel() and replace its calls by > get_current_channel_802_11n() as the former function's definition > involves only returning the value of latter function. > Semantic patch used to find out the issue: > > @@ > identifier f,g; > @@ > > *f(...) { > return g(...); } > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > --- > drivers/staging/wilc1000/coreconfigurator.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) This replaces a previous patch you sent, right? I'm totally confused as to what patches you want applied, please resend all of them for this driver, the latest versions, with proper version information so I have a hint as to what to do... thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function 2015-10-25 1:25 ` [Outreachy kernel] " Greg KH @ 2015-10-25 9:10 ` Shivani Bhardwaj 0 siblings, 0 replies; 8+ messages in thread From: Shivani Bhardwaj @ 2015-10-25 9:10 UTC (permalink / raw) To: Greg KH; +Cc: outreachy-kernel [-- Attachment #1: Type: text/plain, Size: 1092 bytes --] On Sun, Oct 25, 2015 at 6:55 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > On Fri, Oct 23, 2015 at 07:16:20PM +0530, Shivani Bhardwaj wrote: > > Remove the function get_current_channel() and replace its calls by > > get_current_channel_802_11n() as the former function's definition > > involves only returning the value of latter function. > > Semantic patch used to find out the issue: > > > > @@ > > identifier f,g; > > @@ > > > > *f(...) { > > return g(...); } > > > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > > --- > > drivers/staging/wilc1000/coreconfigurator.c | 15 ++++++--------- > > 1 file changed, 6 insertions(+), 9 deletions(-) > > This replaces a previous patch you sent, right? > > I'm totally confused as to what patches you want applied, please resend > all of them for this driver, the latest versions, with proper version > information so I have a hint as to what to do... > > thanks, > > greg k-h > This is different. I'm sorry for not updating the version information in the patches. I completely missed it. I'm sending them all again. Thank you [-- Attachment #2: Type: text/html, Size: 1664 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function 2015-10-23 13:46 ` [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function Shivani Bhardwaj 2015-10-25 1:25 ` [Outreachy kernel] " Greg KH @ 2015-10-27 5:28 ` Greg KH 1 sibling, 0 replies; 8+ messages in thread From: Greg KH @ 2015-10-27 5:28 UTC (permalink / raw) To: Shivani Bhardwaj; +Cc: outreachy-kernel On Mon, Oct 26, 2015 at 08:21:05PM +0530, Shivani Bhardwaj wrote: > Remove the function get_current_channel() and replace its calls by > get_current_channel_802_11n() as the former function's definition > involves only returning the value of latter function. > Semantic patch used to find out the issue: > > @@ > identifier f,g; > @@ > > *f(...) { > return g(...); } > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > --- > drivers/staging/wilc1000/coreconfigurator.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c > index 6dfe26d..1403a33 100644 > --- a/drivers/staging/wilc1000/coreconfigurator.c > +++ b/drivers/staging/wilc1000/coreconfigurator.c > @@ -331,13 +331,6 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen) > return 0; /* no MIB here */ > } > > -u8 get_current_channel(u8 *pu8msa, u16 u16RxLen) > -{ > - /* Extract current channel information from */ > - /* the beacon/probe response frame */ > - return get_current_channel_802_11n(pu8msa, u16RxLen); > -} > - > /** > * @brief parses the received 'N' message > * @details > @@ -425,8 +418,12 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) > /* Get BSSID */ > get_BSSID(pu8msa, pstrNetworkInfo->au8bssid); > > - /* Get the current channel */ > - pstrNetworkInfo->u8channel = get_current_channel(pu8msa, (u16RxLen + FCS_LEN)); > + /* > + * Extract current channel information from > + * the beacon/probe response frame > + */ Trailing whitespace :( Always check your patches with checkpatch.pl so you don't get grumpy emails from maintainers telling you to run your patches through checkpatch.pl before sending them out... thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses 2015-10-23 13:45 [PATCH 0/2] Remove wrapper functions and neat up code Shivani Bhardwaj 2015-10-23 13:46 ` [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function Shivani Bhardwaj @ 2015-10-23 13:46 ` Shivani Bhardwaj 2015-10-27 5:28 ` [Outreachy kernel] " Greg KH 1 sibling, 1 reply; 8+ messages in thread From: Shivani Bhardwaj @ 2015-10-23 13:46 UTC (permalink / raw) To: outreachy-kernel; +Cc: outreachy-kernel Parentheses around some arguments and expressions are not required and should be removed. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> --- drivers/staging/wilc1000/coreconfigurator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 1403a33..d002cfb 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -423,17 +423,17 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo) * the beacon/probe response frame */ pstrNetworkInfo->u8channel = get_current_channel_802_11n(pu8msa, - (u16RxLen + FCS_LEN)); + u16RxLen + FCS_LEN); /* Get beacon period */ - u8index = (MAC_HDR_LEN + TIME_STAMP_LEN); + u8index = MAC_HDR_LEN + TIME_STAMP_LEN; pstrNetworkInfo->u16BeaconPeriod = get_beacon_period(pu8msa + u8index); u8index += BEACON_INTERVAL_LEN + CAP_INFO_LEN; /* Get DTIM Period */ - pu8TimElm = get_tim_elm(pu8msa, (u16RxLen + FCS_LEN), u8index); + pu8TimElm = get_tim_elm(pu8msa, u16RxLen + FCS_LEN, u8index); if (pu8TimElm != NULL) pstrNetworkInfo->u8DtimPeriod = pu8TimElm[3]; pu8IEs = &pu8msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN]; -- 2.1.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses 2015-10-23 13:46 ` [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses Shivani Bhardwaj @ 2015-10-27 5:28 ` Greg KH 2015-10-27 17:20 ` Shivani Bhardwaj 0 siblings, 1 reply; 8+ messages in thread From: Greg KH @ 2015-10-27 5:28 UTC (permalink / raw) To: Shivani Bhardwaj; +Cc: outreachy-kernel On Mon, Oct 26, 2015 at 08:21:26PM +0530, Shivani Bhardwaj wrote: > Parentheses around some arguments and expressions are not required and > should be removed. > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > --- > drivers/staging/wilc1000/coreconfigurator.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Does not apply as I didn't take patch 1/2 :( ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses 2015-10-27 5:28 ` [Outreachy kernel] " Greg KH @ 2015-10-27 17:20 ` Shivani Bhardwaj 0 siblings, 0 replies; 8+ messages in thread From: Shivani Bhardwaj @ 2015-10-27 17:20 UTC (permalink / raw) To: Greg KH; +Cc: outreachy-kernel [-- Attachment #1: Type: text/plain, Size: 729 bytes --] On Tue, Oct 27, 2015 at 10:58 AM, Greg KH <gregkh@linuxfoundation.org> wrote: > On Mon, Oct 26, 2015 at 08:21:26PM +0530, Shivani Bhardwaj wrote: > > Parentheses around some arguments and expressions are not required and > > should be removed. > > > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > > --- > > drivers/staging/wilc1000/coreconfigurator.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > Does not apply as I didn't take patch 1/2 :( > Hi Greg, I think you've applied the patch because I've just rebased my branch and these changes are already done. However, I'm sending a patch that corrects the trailing whitespace error. I'm really sorry for the inconvenience caused. Thank you [-- Attachment #2: Type: text/html, Size: 1287 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-27 17:20 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-23 13:45 [PATCH 0/2] Remove wrapper functions and neat up code Shivani Bhardwaj 2015-10-23 13:46 ` [PATCH 1/2] Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function Shivani Bhardwaj 2015-10-25 1:25 ` [Outreachy kernel] " Greg KH 2015-10-25 9:10 ` Shivani Bhardwaj 2015-10-27 5:28 ` Greg KH 2015-10-23 13:46 ` [PATCH 2/2] Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses Shivani Bhardwaj 2015-10-27 5:28 ` [Outreachy kernel] " Greg KH 2015-10-27 17:20 ` Shivani Bhardwaj
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.