All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ionic: Use debugfs_create_bool() to export bool
@ 2020-05-05 13:28 Geert Uytterhoeven
  2020-05-07  0:46 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-05-05 13:28 UTC (permalink / raw)
  To: David S . Miller
  Cc: Shannon Nelson, Pensando Drivers, netdev, linux-kernel,
	Geert Uytterhoeven

Currently bool ionic_cq.done_color is exported using
debugfs_create_u8(), which requires a cast, preventing further compiler
checks.

Fix this by switching to debugfs_create_bool(), and dropping the cast.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Shannon Nelson <snelson@pensando.io>
---
v2:
  - Add Acked-by.
---
 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
index 5f8fc58d42b3d31c..11621ccc1faf0837 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
@@ -170,8 +170,7 @@ void ionic_debugfs_add_qcq(struct ionic_lif *lif, struct ionic_qcq *qcq)
 	debugfs_create_x64("base_pa", 0400, cq_dentry, &cq->base_pa);
 	debugfs_create_u32("num_descs", 0400, cq_dentry, &cq->num_descs);
 	debugfs_create_u32("desc_size", 0400, cq_dentry, &cq->desc_size);
-	debugfs_create_u8("done_color", 0400, cq_dentry,
-			  (u8 *)&cq->done_color);
+	debugfs_create_bool("done_color", 0400, cq_dentry, &cq->done_color);
 
 	debugfs_create_file("tail", 0400, cq_dentry, cq, &cq_tail_fops);
 
-- 
2.17.1


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

* Re: [PATCH v2] ionic: Use debugfs_create_bool() to export bool
  2020-05-05 13:28 [PATCH v2] ionic: Use debugfs_create_bool() to export bool Geert Uytterhoeven
@ 2020-05-07  0:46 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-07  0:46 UTC (permalink / raw)
  To: geert+renesas; +Cc: snelson, drivers, netdev, linux-kernel

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Tue,  5 May 2020 15:28:09 +0200

> Currently bool ionic_cq.done_color is exported using
> debugfs_create_u8(), which requires a cast, preventing further compiler
> checks.
> 
> Fix this by switching to debugfs_create_bool(), and dropping the cast.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Shannon Nelson <snelson@pensando.io>

Applied, thanks.

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

end of thread, other threads:[~2020-05-07  0:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 13:28 [PATCH v2] ionic: Use debugfs_create_bool() to export bool Geert Uytterhoeven
2020-05-07  0:46 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.