Kernel Newbies Archive on lore.kernel.org
 help / color / Atom feed
* timer API change from kernel 4.9 to 5.0
@ 2020-09-30 16:34 Fabien R
  2020-09-30 18:04 ` Greg KH
  2020-09-30 18:48 ` Valdis Klētnieks
  0 siblings, 2 replies; 3+ messages in thread
From: Fabien R @ 2020-09-30 16:34 UTC (permalink / raw)
  To: kernelnewbies

Hello,
In timer.h of 4.9, struct timer_list contains a field data which is unsigned long.
In timer.c, call_timer_fn calls the triggered function with data as parameter.
As of 5.0, the field data disappears from struct timer_list and call_timer_fn is used with a struct timer_list *
as parameter.
Is there some info about this change somewhere ?

--
Fabien

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: timer API change from kernel 4.9 to 5.0
  2020-09-30 16:34 timer API change from kernel 4.9 to 5.0 Fabien R
@ 2020-09-30 18:04 ` Greg KH
  2020-09-30 18:48 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-09-30 18:04 UTC (permalink / raw)
  To: Fabien R; +Cc: kernelnewbies

On Wed, Sep 30, 2020 at 06:34:07PM +0200, Fabien R wrote:
> Hello,
> In timer.h of 4.9, struct timer_list contains a field data which is unsigned long.
> In timer.c, call_timer_fn calls the triggered function with data as parameter.
> As of 5.0, the field data disappears from struct timer_list and call_timer_fn is used with a struct timer_list *
> as parameter.
> Is there some info about this change somewhere ?

Yes, in the kernel changelog itself, have you looked?  Try just looking
at the log and changes for a specific file instead of the whole thing:
	git log -p path/to/a/single/file.c

4.9 -> 5.0 is a HUGE jump, many years there, you might want to go in
smaller steps :)

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: timer API change from kernel 4.9 to 5.0
  2020-09-30 16:34 timer API change from kernel 4.9 to 5.0 Fabien R
  2020-09-30 18:04 ` Greg KH
@ 2020-09-30 18:48 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Valdis Klētnieks @ 2020-09-30 18:48 UTC (permalink / raw)
  To: Fabien R; +Cc: kernelnewbies

[-- Attachment #1.1: Type: text/plain, Size: 885 bytes --]

On Wed, 30 Sep 2020 18:34:07 +0200, Fabien R said:
> Hello,
> In timer.h of 4.9, struct timer_list contains a field data which is unsigned long.
> In timer.c, call_timer_fn calls the triggered function with data as parameter.
> As of 5.0, the field data disappears from struct timer_list and call_timer_fn
> is used with a struct timer_list * as parameter.
> Is there some info about this change somewhere ?

[/usr/src/linux-next] git log v4.9..v5.0 -- kernel/time/timer.c

and reading through finds this:

commit 354b46b1a0adda1dd5b7f0bc2a5604cca091be5f
Author: Kees Cook <keescook@chromium.org>
Date:   Sun Oct 22 19:15:40 2017 -0700

    timer: Switch callback prototype to take struct timer_list * argument

    Since all callbacks have been converted, we can switch the core
    prototype to "struct timer_list *" now too.

(and several other commits from Kees following that)




[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 16:34 timer API change from kernel 4.9 to 5.0 Fabien R
2020-09-30 18:04 ` Greg KH
2020-09-30 18:48 ` Valdis Klētnieks

Kernel Newbies Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git