qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] chardev/char-mux: tweak mux bitset operations
@ 2024-11-29 10:32 Roman Penyaev
  2024-11-29 10:32 ` [PATCH v3 1/2] chardev/char-mux: shift unsigned long to avoid 32-bit overflow Roman Penyaev
  2024-11-29 10:32 ` [PATCH v3 2/2] chardev/char-mux: make boolean bit check instead of find_next_bit() Roman Penyaev
  0 siblings, 2 replies; 3+ messages in thread
From: Roman Penyaev @ 2024-11-29 10:32 UTC (permalink / raw)
  Cc: Roman Penyaev, Marc-André Lureau, Peter Maydell,
	Paolo Bonzini, Clément Mathieu--Drif, qemu-devel

Patchset tweaks bitset operations by changing a constant to unsigned
long, introduces a static compile check and simplifies bitset operations.
Also resolves Coverity CID 1563776.

v2..v3:
* Multiply (sizeof(d->mux_bitset) * BITS_PER_BYTE) to get number
  of bits (thanks Paolo Bonzini for noticing that)
* Rebase on latest master

v1..v2:
  * Rebase on latest master, incorporate review tags.

Roman Penyaev (2):
  chardev/char-mux: shift unsigned long to avoid 32-bit overflow
  chardev/char-mux: make boolean bit check instead of find_next_bit()

 chardev/char-mux.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)


Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Reviewed-by: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Cc: qemu-devel@nongnu.org



-- 
2.34.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-29 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29 10:32 [PATCH v3 0/2] chardev/char-mux: tweak mux bitset operations Roman Penyaev
2024-11-29 10:32 ` [PATCH v3 1/2] chardev/char-mux: shift unsigned long to avoid 32-bit overflow Roman Penyaev
2024-11-29 10:32 ` [PATCH v3 2/2] chardev/char-mux: make boolean bit check instead of find_next_bit() Roman Penyaev

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).