Skip to contentSkip to conversation

ata: macio: Use of_node_name_eq for node name comparisons

PATCH Applied Rob Herring 3 participants 3 messages Dec 5, 2018 – Feb 8, 2019 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: macio: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Jens Axboe <[email protected]>
---
 drivers/ata/pata_macio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_macio.c +1 -1
index 9588e685d994..9e2501da4638 100644
@@ -948,7 +948,7 @@ static void pata_macio_invariants(struct pata_macio_priv *priv)
 		priv->kind = controller_k2_ata6;
 	        priv->timings = pata_macio_kauai_timings;
 	} else if (of_device_is_compatible(priv->node, "keylargo-ata")) {
-		if (strcmp(priv->node->name, "ata-4") == 0) {
+		if (of_node_name_eq(priv->node, "ata-4")) {
 			priv->kind = controller_kl_ata4;
 			priv->timings = pata_macio_kl66_timings;
 		} else {
Signature · 1 line
2.19.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rob Herring

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Jens Axboe <[email protected]>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Applied
#2 lore raw
In reply to Rob Herring
Quoted 2 lines · Rob Herring

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

Applied, thanks.

Signature · 1 line
Jens Axboe