Thread (13 messages) flat view 13 messages, 4 authors, 2020-09-01

Re: [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup()

From: Kees Cook <hidden>
Date: 2020-08-17 19:29:10
Also in: linux-scsi, lkml, target-devel

On Mon, Aug 17, 2020 at 07:41:58AM -0700, James Bottomley wrote:
On Mon, 2020-08-17 at 14:24 +0530, Allen Pais wrote:
quoted
From: Allen Pais <redacted>

Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")'
introduced a new tasklet initialization API. This series converts 
all the scsi drivers to use the new tasklet_setup() API
I've got to say I agree with Jens, this was a silly obfuscation:

+#define from_tasklet(var, callback_tasklet, tasklet_fieldname) \
+       container_of(callback_tasklet, typeof(*var), tasklet_fieldname)

Just use container_of directly since we all understand what it does.
But then the lines get really long, wrapped, etc. This is what the
timer_struct conversion did too (added a container_of wrapper), so I
think it makes sense here too.

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help