Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v4 0/2] dc395x: fix compiler warnings and improve formatting of the macros
@ 2025-09-24  5:56 Xinhui Yang
  2025-09-24  5:56 ` [PATCH v4 1/2] scsi: dc395x: correctly discard the return value in certain reads Xinhui Yang
  2025-09-24  5:56 ` [PATCH v4 2/2] scsi: dc395x: improve code formatting for the macros Xinhui Yang
  0 siblings, 2 replies; 4+ messages in thread
From: Xinhui Yang @ 2025-09-24  5:56 UTC (permalink / raw)
  To: linux-scsi
  Cc: stable, Mingcong Bai, Kexy Biscuit, Xinhui Yang, Oliver Neukum,
	Ali Akcaagac, Jamie Lenehan, James E.J. Bottomley,
	Martin K. Petersen, open list

This series of patches clears the compiler warnings for the dc395x
driver.

The first patch introduces a new macro that casts the value returned by
a read operation to void, since some values returned by some specific
read operations (which just simply clears the FIFO buffer or resets the
interrupt status) can be ignored. Creating a new macro that casts the
return value to void to fix the warning.

During the fix, checkpatch.pl complained about missing white space
between macro arguments and missing parentheses around complex
expressions. To align with the changes in the first patch, the
formatting of macros above and below the introduced macro are also
fixed.

Since in Patch v2 [2] Bart pointed out that such change can't be made
to the stable tree, the patch is split to two parts.

---
Changes since v3 [1]:
- Undo some mistakes in the patch 2 of the patch v2 where extra
  parentheses are added around function calls.
- Remove the unnecessary casts from the inb(), inw() and inl() calls,
  so that extra parentheses are no longer required. They are now returns
  the type it was being casted to, as James pointed out.

Changes since v2 [2]:
- Split the patch into two parts, the first one fixes the warning, and
  the second one improves the formatting of the surrounding macros.
- Make the description of the formatting changes more clear.

Changes since v1 [3]:
- Add Cc: tag to include this patch to the stable tree.
- Add additional description about the formatting changes.

[1]: https://lore.kernel.org/linux-scsi/20250923125226.1883391-1-cyan@cyano.uk/
[2]: https://lore.kernel.org/linux-scsi/20250922152609.827311-1-cyan@cyano.uk/
[3]: https://lore.kernel.org/linux-scsi/20250922143619.824129-1-cyan@cyano.uk/

---
Xinhui Yang (2):
  scsi: dc395x: correctly discard the return value in certain reads
  scsi: dc395x: improve code formatting for the macros

 drivers/scsi/dc395x.c | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

---
Xinhui Yang (2):
  scsi: dc395x: correctly discard the return value in certain reads
  scsi: dc395x: improve code formatting for the macros

 drivers/scsi/dc395x.c | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-09-24  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24  5:56 [PATCH v4 0/2] dc395x: fix compiler warnings and improve formatting of the macros Xinhui Yang
2025-09-24  5:56 ` [PATCH v4 1/2] scsi: dc395x: correctly discard the return value in certain reads Xinhui Yang
2025-09-24  5:56 ` [PATCH v4 2/2] scsi: dc395x: improve code formatting for the macros Xinhui Yang
2025-09-24  6:02   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox