[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] block/laptop_mode: Convert timers to use timer_setup()
On 10/04/2017 06:49 PM, Kees Cook wrote:
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
> Cc: Jens Axboe <>
> Cc: Michal Hocko <>
> Cc: Andrew Morton <>
> Cc: Jan Kara <>
> Cc: Johannes Weiner <>
> Cc: Nicholas Piggin <>
> Cc: Vladimir Davydov <>
> Cc: Matthew Wilcox <>
> Cc: Jeff Layton <>
> Cc:
> Cc:
> Cc: Thomas Gleixner <>
> Signed-off-by: Kees Cook <>
> ---
> This requires commit 686fef928bba ("timer: Prepare to change timer
> callback argument type") in v4.14-rc3, but should be otherwise
> stand-alone.

My only complaint about this is the use of a from_timer() macro instead
of just using container_of() at the call sites to actually show that is
happening. I'm generally opposed to obfuscation like that. It just means
you have to look up what is going on, instead of it being readily
apparent to the reader/reviewer.

I guess I do have a a second complaint as well - that it landed in -rc3,
which is rather late considering subsystem trees are usually forked
earlier than that. Had this been in -rc1, I would have had an easier
time applying the block bits for 4.15.

Jens Axboe

 \ /
  Last update: 2017-10-05 16:57    [W:0.044 / U:3.000 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site