From: James Bottomley <jejb@linux.ibm.com>
To: Kees Cook <keescook@chromium.org>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
shivasharan.srikanteshwara@broadcom.com,
linux-kernel@vger.kernel.org, kashyap.desai@broadcom.com,
sumit.saxena@broadcom.com, Allen Pais <allen.cryptic@gmail.com>,
target-devel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
linuxppc-dev@lists.ozlabs.org, megaraidlinux.pdl@broadcom.com
Subject: Re: [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup()
Date: Mon, 17 Aug 2020 12:57:32 -0700 [thread overview]
Message-ID: <1597694252.22390.12.camel@linux.ibm.com> (raw)
In-Reply-To: <202008171227.D3A4F454D8@keescook>
On Mon, 2020-08-17 at 12:28 -0700, Kees Cook wrote:
> 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:
> > > From: Allen Pais <allen.lkml@gmail.com>
> > >
> > > 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.
I really don't think that's a problem but if you want to add a new
generic container_of that does typeof instead of insisting on the type,
I'd be sort of OK with that ... provided you don't gratuitously alter
the argument order.
The thing I object to is that this encourages everyone to roll their
own unnecessary container_of type macros in spite of the fact that it's
function is wholly generic. It's fine if you're eliminating one of the
arguments, or actually making the macro specific to the type, but in
this case you're not, you're making a completely generic macro where
the name is the only thing that's specific to this case.
> This is what the timer_struct conversion did too (added a
> container_of wrapper), so I think it makes sense here too.
I didn't see that one to object to it ...
James
next prev parent reply other threads:[~2020-08-17 22:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 8:54 [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-17 8:54 ` [PATCH 1/8] scsi: aic94xx: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17 8:54 ` [PATCH 2/8] scsi: esas2r: " Allen Pais
2020-08-17 8:54 ` [PATCH 3/8] scsi: ibmvscsi: " Allen Pais
2020-08-17 8:54 ` [PATCH 4/8] scsi: isci: " Allen Pais
2020-08-17 8:54 ` [PATCH 5/8] scsi: megaraid: " Allen Pais
2020-08-17 8:54 ` [PATCH 6/8] scsi: mvsas: " Allen Pais
2020-08-17 8:54 ` [PATCH 7/8] scsi: pm8001: " Allen Pais
2020-08-17 8:54 ` [PATCH 8/8] scsi: pmcraid: " Allen Pais
2020-08-17 14:41 ` [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup() James Bottomley
2020-08-17 19:28 ` Kees Cook
2020-08-17 19:57 ` James Bottomley [this message]
2020-09-01 10:06 ` Allen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1597694252.22390.12.camel@linux.ibm.com \
--to=jejb@linux.ibm.com \
--cc=allen.cryptic@gmail.com \
--cc=allen.lkml@gmail.com \
--cc=kashyap.desai@broadcom.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=shivasharan.srikanteshwara@broadcom.com \
--cc=sumit.saxena@broadcom.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).