From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org, Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>
Subject: Re: [PATCH 2/2] ufshcd: use an enum for quirks
Date: Thu, 20 Feb 2020 18:25:27 +0100 [thread overview]
Message-ID: <20200220172527.GC14530@lst.de> (raw)
In-Reply-To: <b4c75415-347a-48e6-ddc7-d419d7774f22@acm.org>
On Tue, Feb 18, 2020 at 04:10:57PM -0800, Bart Van Assche wrote:
> On 2/18/20 3:44 PM, Christoph Hellwig wrote:
>> Use an enum to specify the various quirks instead of #defines inside
>> the structure definition.
>
> Hi Christoph,
>
> Although this patch looks like a significant improvement to me: has it been
> considered to change 'quirks' from an unsigned int into a bitfield with one
> bit per quirk? I think that would allow to remove multiple explicit bit
> manipulations from the UFS driver.
And it wouldn't make it quite as obvious what are quirks. Never mind that
the compiler would still do the masking and potentially affect other fields
placed right next to it. Bitfields tend to be a bad idea just about
everywhere.
next prev parent reply other threads:[~2020-02-20 17:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 23:44 ufshcd quirk cleanup Christoph Hellwig
2020-02-18 23:44 ` [PATCH 1/2] ufshcd: remove unused quirks Christoph Hellwig
2020-02-18 23:58 ` Kiwoong Kim
2020-02-19 0:00 ` Kiwoong Kim
2020-02-19 0:42 ` Eric Biggers
2020-02-19 1:01 ` Alim Akhtar
2020-02-20 17:23 ` 'Christoph Hellwig'
2020-02-19 0:30 ` Eric Biggers
2020-02-20 17:24 ` Christoph Hellwig
2020-02-18 23:44 ` [PATCH 2/2] ufshcd: use an enum for quirks Christoph Hellwig
2020-02-19 0:10 ` Bart Van Assche
2020-02-20 17:25 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-21 14:08 ufshcd quirk cleanup v2 Christoph Hellwig
2020-02-21 14:08 ` [PATCH 2/2] ufshcd: use an enum for quirks Christoph Hellwig
2020-02-21 18:18 ` Asutosh Das (asd)
2020-02-22 2:45 ` Bart Van Assche
2020-02-24 17:16 ` Christoph Hellwig
2020-02-22 2:46 ` Bart Van Assche
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=20200220172527.GC14530@lst.de \
--to=hch@lst.de \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.