]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ionic: Use debugfs_create_bool() to export bool
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 5 May 2020 13:28:09 +0000 (15:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:46:33 +0000 (17:46 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c

index 5f8fc58d42b3d31cd0c4e5318e8012e0e343f959..11621ccc1faf0837fdd9945e970309ce10f6d72b 100644 (file)
@@ -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);