From: Allen <allen.lkml@gmail.com>
To: jejb@linux.ibm.com
Cc: Kees Cook <keescook@chromium.org>,
martin.petersen@oracle.com,
shivasharan.srikanteshwara@broadcom.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
Allen Pais <allen.cryptic@gmail.com>,
target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, megaraidlinux.pdl@broadcom.com
Subject: Re: [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup()
Date: Tue, 1 Sep 2020 15:36:46 +0530 [thread overview]
Message-ID: <CAOMdWSKmNVQTpJtdEMNHc5SS75WNS7F0duzQi14kg62R4Un8zA@mail.gmail.com> (raw)
In-Reply-To: <1597694252.22390.12.camel@linux.ibm.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 ...
Since we could not get the generic API accepted, can I send out V2
which would use container_of()?
Thanks,
--
- Allen
prev parent reply other threads:[~2020-09-01 10:08 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
2020-09-01 10:06 ` Allen [this message]
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=CAOMdWSKmNVQTpJtdEMNHc5SS75WNS7F0duzQi14kg62R4Un8zA@mail.gmail.com \
--to=allen.lkml@gmail.com \
--cc=allen.cryptic@gmail.com \
--cc=jejb@linux.ibm.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).