Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255337 > unrolled thread

[PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer

Started byMuhammad Falak R Wani <falakreyaz@gmail.com>
First post2015-10-25 11:20 +0100
Last post2015-10-27 15:20 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-25 11:20 +0100
    Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Leon Romanovsky <leon@leon.nu> - 2015-10-25 12:30 +0100
      Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Dan Carpenter <dan.carpenter@oracle.com> - 2015-10-27 10:20 +0100
        Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Leon Romanovsky <leon@leon.nu> - 2015-10-27 10:50 +0100
          Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Dan Carpenter <dan.carpenter@oracle.com> - 2015-10-27 12:20 +0100
            Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-27 15:20 +0100

#1255337 — [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer

FromMuhammad Falak R Wani <falakreyaz@gmail.com>
Date2015-10-25 11:20 +0100
Subject[PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer
Message-ID<qnqz8-1mu-17@gated-at.bofh.it>
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.
The simplified semantic patch used is :-
<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
v2 changes:
	-> Change the subject line to a be more specific
	-> Add details about coccinelle in the commit log

mfrw

 drivers/staging/rdma/ipath/ipath_driver.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rdma/ipath/ipath_driver.c b/drivers/staging/rdma/ipath/ipath_driver.c
index 46d9898..577704a 100644
--- a/drivers/staging/rdma/ipath/ipath_driver.c
+++ b/drivers/staging/rdma/ipath/ipath_driver.c
@@ -2307,10 +2307,9 @@ void ipath_set_led_override(struct ipath_devdata *dd, unsigned int val)
 	 */
 	if (atomic_inc_return(&dd->ipath_led_override_timer_active) == 1) {
 		/* Need to start timer */
-		init_timer(&dd->ipath_led_override_timer);
-		dd->ipath_led_override_timer.function =
-						 ipath_run_led_override;
-		dd->ipath_led_override_timer.data = (unsigned long) dd;
+		setup_timer(&dd->ipath_led_override_timer,
+				ipath_run_led_override, (unsigned long)dd);
+
 		dd->ipath_led_override_timer.expires = jiffies + 1;
 		add_timer(&dd->ipath_led_override_timer);
 	} else
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1255367

FromLeon Romanovsky <leon@leon.nu>
Date2015-10-25 12:30 +0100
Message-ID<qnrES-2jD-9@gated-at.bofh.it>
In reply to#1255337
On Sun, Oct 25, 2015 at 12:17 PM, Muhammad Falak R Wani
<falakreyaz@gmail.com> wrote:
Please follow standard naming convention for the patches.
It should be [PATCH v2 1/4] and not [PATCH 1/4 v2].
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1256602

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-10-27 10:20 +0100
Message-ID<qo8Aa-3pT-13@gated-at.bofh.it>
In reply to#1255367
On Sun, Oct 25, 2015 at 01:21:11PM +0200, Leon Romanovsky wrote:
> On Sun, Oct 25, 2015 at 12:17 PM, Muhammad Falak R Wani
> <falakreyaz@gmail.com> wrote:
> Please follow standard naming convention for the patches.
> It should be [PATCH v2 1/4] and not [PATCH 1/4 v2].

Does this matter?  It's in a thread so it sorts fine either way.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1256632

FromLeon Romanovsky <leon@leon.nu>
Date2015-10-27 10:50 +0100
Message-ID<qo93c-3zz-9@gated-at.bofh.it>
In reply to#1256602
On Tue, Oct 27, 2015 at 11:19 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> On Sun, Oct 25, 2015 at 01:21:11PM +0200, Leon Romanovsky wrote:
>> On Sun, Oct 25, 2015 at 12:17 PM, Muhammad Falak R Wani
>> <falakreyaz@gmail.com> wrote:
>> Please follow standard naming convention for the patches.
>> It should be [PATCH v2 1/4] and not [PATCH 1/4 v2].
>
> Does this matter?  It's in a thread so it sorts fine either way.
It will be wise if people read guides and follow examples.

[1] https://www.kernel.org/doc/Documentation/SubmittingPatches


>
> regards,
> dan carpenter
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1256700

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-10-27 12:20 +0100
Message-ID<qoash-4xx-3@gated-at.bofh.it>
In reply to#1256632
On Tue, Oct 27, 2015 at 11:45:18AM +0200, Leon Romanovsky wrote:
> On Tue, Oct 27, 2015 at 11:19 AM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> > On Sun, Oct 25, 2015 at 01:21:11PM +0200, Leon Romanovsky wrote:
> >> On Sun, Oct 25, 2015 at 12:17 PM, Muhammad Falak R Wani
> >> <falakreyaz@gmail.com> wrote:
> >> Please follow standard naming convention for the patches.
> >> It should be [PATCH v2 1/4] and not [PATCH 1/4 v2].
> >
> > Does this matter?  It's in a thread so it sorts fine either way.
> It will be wise if people read guides and follow examples.
> 
> [1] https://www.kernel.org/doc/Documentation/SubmittingPatches

That document doesn't really specify one way or the other.  And even if
it did then why would you care?  Stop being so picky for no reason.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1256769

FromMuhammad Falak R Wani <falakreyaz@gmail.com>
Date2015-10-27 15:20 +0100
Message-ID<qodgt-6dy-1@gated-at.bofh.it>
In reply to#1256700

On October 27, 2015 4:40:42 PM GMT+05:30, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>On Tue, Oct 27, 2015 at 11:45:18AM +0200, Leon Romanovsky wrote:
>> On Tue, Oct 27, 2015 at 11:19 AM, Dan Carpenter
>> <dan.carpenter@oracle.com> wrote:
>> > On Sun, Oct 25, 2015 at 01:21:11PM +0200, Leon Romanovsky wrote:
>> >> On Sun, Oct 25, 2015 at 12:17 PM, Muhammad Falak R Wani
>> >> <falakreyaz@gmail.com> wrote:
>> >> Please follow standard naming convention for the patches.
>> >> It should be [PATCH v2 1/4] and not [PATCH 1/4 v2].
>> >
>> > Does this matter?  It's in a thread so it sorts fine either way.
>> It will be wise if people read guides and follow examples.
>> 
>> [1] https://www.kernel.org/doc/Documentation/SubmittingPatches
>
>That document doesn't really specify one way or the other.  And even if
>it did then why would you care?  Stop being so picky for no reason.
>
>regards,
>dan carpenter

Sorry, my bad . Won't repeat such mistakes.
-- 
mfrw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web