linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Cleanup ATA sysfs attribute show functions
@ 2021-12-02  8:37 Damien Le Moal
  2021-12-02  8:37 ` [PATCH] ata: ahci_ceva: Fix sparse warning in ceva_ahci_read_id() Damien Le Moal
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Damien Le Moal @ 2021-12-02  8:37 UTC (permalink / raw)
  To: linux-ide

Convert remaining sysfs attribute show() functions to use sysfs_emit()
instead of s[n]printf().

Damien Le Moal (4):
  ata: libata-sata: use sysfs_emit()
  ata: libata-scsi: use sysfs_emit()
  ata: ahci: use sysfs_emit()
  ata: sata_fsl: use sysfs_emit()

 drivers/ata/ahci.c        | 2 +-
 drivers/ata/libata-sata.c | 4 ++--
 drivers/ata/libata-scsi.c | 2 +-
 drivers/ata/sata_fsl.c    | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] ata: ahci_ceva: Fix sparse warning in ceva_ahci_read_id()
@ 2021-12-02  8:36 Damien Le Moal
  0 siblings, 0 replies; 7+ messages in thread
From: Damien Le Moal @ 2021-12-02  8:36 UTC (permalink / raw)
  To: linux-ide; +Cc: Philipp Zabel

Fix the following sparse warning:

drivers/ata/ahci_ceva.c:107:33: warning: invalid assignment: &=
drivers/ata/ahci_ceva.c:107:33:    left side has type unsigned short
drivers/ata/ahci_ceva.c:107:33:    right side has type restricted __le16

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/ata/ahci_ceva.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index 50b56cd0039d..e9c7c07fd84c 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -94,6 +94,7 @@ struct ceva_ahci_priv {
 static unsigned int ceva_ahci_read_id(struct ata_device *dev,
 					struct ata_taskfile *tf, u16 *id)
 {
+	__le16 *__id = (__le16 *)id;
 	u32 err_mask;
 
 	err_mask = ata_do_dev_read_id(dev, tf, id);
@@ -103,7 +104,7 @@ static unsigned int ceva_ahci_read_id(struct ata_device *dev,
 	 * Since CEVA controller does not support device sleep feature, we
 	 * need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data.
 	 */
-	id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
+	__id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
 
 	return 0;
 }
-- 
2.31.1


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

end of thread, other threads:[~2021-12-02  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02  8:37 [PATCH 0/4] Cleanup ATA sysfs attribute show functions Damien Le Moal
2021-12-02  8:37 ` [PATCH] ata: ahci_ceva: Fix sparse warning in ceva_ahci_read_id() Damien Le Moal
2021-12-02  8:37 ` [PATCH 1/4] ata: libata-sata: use sysfs_emit() Damien Le Moal
2021-12-02  8:37 ` [PATCH 2/4] ata: libata-scsi: " Damien Le Moal
2021-12-02  8:37 ` [PATCH 3/4] ata: ahci: " Damien Le Moal
2021-12-02  8:37 ` [PATCH 4/4] ata: sata_fsl: " Damien Le Moal
  -- strict thread matches above, loose matches on Subject: below --
2021-12-02  8:36 [PATCH] ata: ahci_ceva: Fix sparse warning in ceva_ahci_read_id() Damien Le Moal

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