Skip to contentSkip to conversation

Staging: rtl8192e: Timer setup using macro rather assignment

PATCH Superseded DHANAPAL, GNANACHANDRAN (G.) 5 participants 6 messages May 18, 2015 – May 31, 2015 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtl8192e: Timer setup using macro rather assignment

setup_timer is used for timer parameter setup rather than direct assignment

---
 drivers/staging/rtl8192e/rtllib_module.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192e/rtllib_module.c +1 -2
index 32cc8df..7ad1541 100644
@@ -59,9 +59,8 @@ EXPORT_SYMBOL(rt_global_debug_component);
 
 void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data)
 {
-	ptimer->function = fun;
-	ptimer->data = data;
 	init_timer(ptimer);
+	setup_timer(ptimer, fun, data);
 }
 
 static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · GNANACHANDRAN (G.)

setup_timer is used for timer parameter setup rather than direct assignment

your From: name and Signed-off-by: names are not matching. They should be same.

Quoted 1 line

---

<snip>

drivers/staging/rtl8192e/rtllib_module.c EXPORT_SYMBOL(rt_global_debug_component); · line 63

Quoted 10 lines
drivers/staging/rtl8192e/rtllib_module.c +1 -2
@@ -59,9 +59,8 @@ EXPORT_SYMBOL(rt_global_debug_component);
 
 void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data)
 {
-	ptimer->function = fun;
-	ptimer->data = data;
 	init_timer(ptimer);
+	setup_timer(ptimer, fun, data);

setup_timer is calling __setup_timer which is again calling __init_timer here we already have an init_timer which is also calling __init_timer. so now __init_timer gets executed two times for one timer.

regards
sudip

#2 lore raw
Quoted 8 lines · Sudip Mukherjee
Quoted 4 lines · GNANACHANDRAN (G.)

setup_timer is used for timer parameter setup rather than direct assignment

your From: name and Signed-off-by: names are not matching. They should be same.

If there's a specific "From: " in the _body_ of the email, that's true, but the sender email "From: " header and the
Signed-off-by: line do not have to match.

A "From: " line in the email body should only be used when the patch is from a different sender than the sign-off.

#3 lore raw
Quoted 5 lines · Joe Perches
Quoted 4 lines · Sudip Mukherjee
Quoted 3 lines · GNANACHANDRAN (G.)

setup_timer is used for timer parameter setup rather than direct assignment

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

your From: name and Signed-off-by: names are not matching. They should be same.

If there's a specific "From: " in the _body_ of the email, that's true, but the sender email "From: " header and the
Signed-off-by: line do not have to match.

But Greg usually rejects these patches where the sender "From:" header and Signed-off-by: doesnot match. Just for example:

https://lkml.org/lkml/2014/11/25/924

regards
sudip

Quoted 5 lines

A "From: " line in the email body should only be used when the patch is from a different sender than the sign-off.

#4 lore raw
Quoted 11 lines · Sudip Mukherjee
Quoted 10 lines · Joe Perches
Quoted 8 lines · Sudip Mukherjee
Quoted 4 lines · GNANACHANDRAN (G.)

setup_timer is used for timer parameter setup rather than direct assignment

your From: name and Signed-off-by: names are not matching. They should be same.

Quoted 7 lines
Quoted 3 lines

If there's a specific "From: " in the _body_ of the email, that's true, but the sender email "From: " header and the
Signed-off-by: line do not have to match.

But Greg usually rejects these patches where the sender "From:" header and Signed-off-by: doesnot match. Just for example:

https://lkml.org/lkml/2014/11/25/924

Yes, I can't take it where it doesn't match up.

Sometimes I miss it, but when it's pointed out, I will not accept it.

thanks,

greg k-h

#5 lore raw
In reply to DHANAPAL, GNANACHANDRAN (G.)

drivers/staging/rtl8192e/rtllib_module.c EXPORT_SYMBOL(rt_global_debug_component); · line 64

Quoted 7 lines

void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data) {

drivers/staging/rtl8192e/rtllib_module.c +1 -2
-	ptimer->function = fun;
-	ptimer->data = data;
 	init_timer(ptimer);
+	setup_timer(ptimer, fun, data);
 }

setup_timer also subsumes init_timer. Check the definition. Probably you can delete this function completely.

julia