From: Harald Mommer <harald.mommer@opensynergy.com>
To: Haixu Cui <quic_haixcui@quicinc.com>,
virtio-dev@lists.oasis-open.org,
virtio-comment@lists.oasis-open.org, cohuck@redhat.com,
broonie@kernel.org, qiang4.zhang@linux.intel.com,
viresh.kumar@linaro.org
Cc: quic_ztu@quicinc.com
Subject: Re: [virtio-dev][PATCH V9 2/2] virtio-spi: add the device specification
Date: Thu, 21 Dec 2023 12:25:07 +0100 [thread overview]
Message-ID: <95dcd2c7-4b5b-4b04-8748-e9e65374d356@opensynergy.com> (raw)
In-Reply-To: <20231212033317.22198-3-quic_haixcui@quicinc.com>
Hello,
On 12.12.23 04:33, Haixu Cui wrote:
> +\field{bits_per_word_mask} is a mask indicating which values of bits_per_word are supported.
> +If bit n of \field{bits_per_word_mask} is set, the bits_per_word with value (n+1) is supported.
> +If all bits are not set, bits_per_word can be any value from 1 to 32.
"If all bits are not set" is not easy to understand as it means "if no
bit is set".
You can of course specify the value 0 this way to make code more
complicated.
To make code simple, 0 would be not given this special meaning. To allow
any value between 1 and 32 solely the value 0xFFFFFFFF would be allowed.
Which is already possible now without this additional sentence for 0.
Simply checking whether the respective bit is set in the mask and done
without having to add senseless additional code to handle the special
case that the mask is 0.
Giving 0 the same meaning as 0xFFFFFFFF brings nothing except confusion.
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2023-12-21 11:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 3:33 [virtio-dev][PATCH V9 0/2] virtio-spi: add virtual SPI controller Haixu Cui
2023-12-12 3:33 ` [virtio-dev][PATCH V9 1/2] content: Rename SPI master to " Haixu Cui
2023-12-12 3:33 ` [virtio-dev][PATCH V9 2/2] virtio-spi: add the device specification Haixu Cui
2023-12-18 11:04 ` Cornelia Huck
2023-12-21 3:57 ` Haixu Cui
2023-12-21 8:44 ` Cornelia Huck
2023-12-21 9:37 ` Haixu Cui
2023-12-21 9:54 ` Cornelia Huck
2023-12-26 3:05 ` [virtio-dev] Re: [virtio-comment] " Haixu Cui
2023-12-21 11:25 ` Harald Mommer [this message]
2023-12-22 2:28 ` Haixu Cui
2023-12-22 14:32 ` Harald Mommer
2023-12-26 4:15 ` Haixu Cui
2024-01-02 14:10 ` Harald Mommer
2023-12-22 12:21 ` Cornelia Huck
2023-12-26 3:11 ` Haixu Cui
2023-12-13 6:54 ` [virtio-dev][PATCH V9 0/2] virtio-spi: add virtual SPI controller Haixu Cui
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=95dcd2c7-4b5b-4b04-8748-e9e65374d356@opensynergy.com \
--to=harald.mommer@opensynergy.com \
--cc=broonie@kernel.org \
--cc=cohuck@redhat.com \
--cc=qiang4.zhang@linux.intel.com \
--cc=quic_haixcui@quicinc.com \
--cc=quic_ztu@quicinc.com \
--cc=viresh.kumar@linaro.org \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.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