* [PATCH 1/5] crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics
2019-10-21 14:51 [PATCH 0/5] debugfs: Remove casts in debugfs_create_*() callers Geert Uytterhoeven
@ 2019-10-21 14:51 ` Geert Uytterhoeven
2019-10-25 15:27 ` Herbert Xu
2019-10-21 14:51 ` [PATCH 2/5] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2019-10-21 14:51 UTC (permalink / raw)
To: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel, Geert Uytterhoeven
Variables of type atomic{,64}_t can be used fine with
debugfs_create_u{32,64}, when passing a pointer to the embedded counter.
This allows to get rid of the casts, which prevented compiler checks.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/crypto/nx/nx_debugfs.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/nx/nx_debugfs.c b/drivers/crypto/nx/nx_debugfs.c
index e0d44a5512ab455b..1975bcbee997481e 100644
--- a/drivers/crypto/nx/nx_debugfs.c
+++ b/drivers/crypto/nx/nx_debugfs.c
@@ -38,23 +38,23 @@ void nx_debugfs_init(struct nx_crypto_driver *drv)
drv->dfs_root = root;
debugfs_create_u32("aes_ops", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.aes_ops);
+ root, &drv->stats.aes_ops.counter);
debugfs_create_u32("sha256_ops", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.sha256_ops);
+ root, &drv->stats.sha256_ops.counter);
debugfs_create_u32("sha512_ops", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.sha512_ops);
+ root, &drv->stats.sha512_ops.counter);
debugfs_create_u64("aes_bytes", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u64 *)&drv->stats.aes_bytes);
+ root, &drv->stats.aes_bytes.counter);
debugfs_create_u64("sha256_bytes", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u64 *)&drv->stats.sha256_bytes);
+ root, &drv->stats.sha256_bytes.counter);
debugfs_create_u64("sha512_bytes", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u64 *)&drv->stats.sha512_bytes);
+ root, &drv->stats.sha512_bytes.counter);
debugfs_create_u32("errors", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.errors);
+ root, &drv->stats.errors.counter);
debugfs_create_u32("last_error", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.last_error);
+ root, &drv->stats.last_error.counter);
debugfs_create_u32("last_error_pid", S_IRUSR | S_IRGRP | S_IROTH,
- root, (u32 *)&drv->stats.last_error_pid);
+ root, &drv->stats.last_error_pid.counter);
}
void
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics
2019-10-21 14:51 ` [PATCH 1/5] crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics Geert Uytterhoeven
@ 2019-10-25 15:27 ` Herbert Xu
0 siblings, 0 replies; 12+ messages in thread
From: Herbert Xu @ 2019-10-25 15:27 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
David S . Miller, Alex Deucher, Christian König, David,
David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon,
Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel
On Mon, Oct 21, 2019 at 04:51:45PM +0200, Geert Uytterhoeven wrote:
> Variables of type atomic{,64}_t can be used fine with
> debugfs_create_u{32,64}, when passing a pointer to the embedded counter.
> This allows to get rid of the casts, which prevented compiler checks.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/crypto/nx/nx_debugfs.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/5] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call
2019-10-21 14:51 [PATCH 0/5] debugfs: Remove casts in debugfs_create_*() callers Geert Uytterhoeven
2019-10-21 14:51 ` [PATCH 1/5] crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics Geert Uytterhoeven
@ 2019-10-21 14:51 ` Geert Uytterhoeven
2019-10-21 14:51 ` [PATCH 3/5] drm/amdgpu: " Geert Uytterhoeven
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2019-10-21 14:51 UTC (permalink / raw)
To: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel, Geert Uytterhoeven
There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter. Remove it, as the cast prevents
further compiler checks.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index f6fc0875d5b0a285..4a07a73c672b5996 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2480,7 +2480,7 @@ static int setup_debugfs(struct adapter *adapter)
for (i = 0; i < ARRAY_SIZE(debugfs_files); i++)
debugfs_create_file(debugfs_files[i].name,
debugfs_files[i].mode,
- adapter->debugfs_root, (void *)adapter,
+ adapter->debugfs_root, adapter,
debugfs_files[i].fops);
return 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/5] drm/amdgpu: Remove superfluous void * cast in debugfs_create_file() call
2019-10-21 14:51 [PATCH 0/5] debugfs: Remove casts in debugfs_create_*() callers Geert Uytterhoeven
2019-10-21 14:51 ` [PATCH 1/5] crypto: nx - Improve debugfs_create_u{32,64}() handling for atomics Geert Uytterhoeven
2019-10-21 14:51 ` [PATCH 2/5] cxgb4/cxgb4vf: Remove superfluous void * cast in debugfs_create_file() call Geert Uytterhoeven
@ 2019-10-21 14:51 ` Geert Uytterhoeven
2019-10-28 17:56 ` Alex Deucher
2019-10-21 14:51 ` [PATCH 4/5] power: avs: smartreflex: Remove superfluous " Geert Uytterhoeven
2019-10-21 14:51 ` [PATCH 5/5] ionic: Use debugfs_create_bool() to export bool Geert Uytterhoeven
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2019-10-21 14:51 UTC (permalink / raw)
To: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel, Geert Uytterhoeven
There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter. Remove it, as the cast prevents
further compiler checks.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5652cc72ed3a9b3a..b97a38b1e089b3d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1090,8 +1090,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
{
adev->debugfs_preempt =
debugfs_create_file("amdgpu_preempt_ib", 0600,
- adev->ddev->primary->debugfs_root,
- (void *)adev, &fops_ib_preempt);
+ adev->ddev->primary->debugfs_root, adev,
+ &fops_ib_preempt);
if (!(adev->debugfs_preempt)) {
DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
return -EIO;
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/5] drm/amdgpu: Remove superfluous void * cast in debugfs_create_file() call
2019-10-21 14:51 ` [PATCH 3/5] drm/amdgpu: " Geert Uytterhoeven
@ 2019-10-28 17:56 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-10-28 17:56 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon, amd-gfx list,
Linux PM, Greg Kroah-Hartman, LKML, Maling list - DRI developers,
linux-crypto, Network Development, linuxppc-dev
On Mon, Oct 21, 2019 at 6:23 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> There is no need to cast a typed pointer to a void pointer when calling
> a function that accepts the latter. Remove it, as the cast prevents
> further compiler checks.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 5652cc72ed3a9b3a..b97a38b1e089b3d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -1090,8 +1090,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
> {
> adev->debugfs_preempt =
> debugfs_create_file("amdgpu_preempt_ib", 0600,
> - adev->ddev->primary->debugfs_root,
> - (void *)adev, &fops_ib_preempt);
> + adev->ddev->primary->debugfs_root, adev,
> + &fops_ib_preempt);
> if (!(adev->debugfs_preempt)) {
> DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
> return -EIO;
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call
2019-10-21 14:51 [PATCH 0/5] debugfs: Remove casts in debugfs_create_*() callers Geert Uytterhoeven
` (2 preceding siblings ...)
2019-10-21 14:51 ` [PATCH 3/5] drm/amdgpu: " Geert Uytterhoeven
@ 2019-10-21 14:51 ` Geert Uytterhoeven
2019-11-08 11:24 ` Rafael J. Wysocki
2019-11-13 11:02 ` Rafael J. Wysocki
2019-10-21 14:51 ` [PATCH 5/5] ionic: Use debugfs_create_bool() to export bool Geert Uytterhoeven
4 siblings, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2019-10-21 14:51 UTC (permalink / raw)
To: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel, Geert Uytterhoeven
There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter. Remove it, as the cast prevents
further compiler checks.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/power/avs/smartreflex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index 4684e7df833a81e9..5376f3d22f31eade 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev)
sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir);
debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir,
- (void *)sr_info, &pm_sr_fops);
+ sr_info, &pm_sr_fops);
debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
&sr_info->err_weight);
debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
--
2.17.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 4/5] power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call
2019-10-21 14:51 ` [PATCH 4/5] power: avs: smartreflex: Remove superfluous " Geert Uytterhoeven
@ 2019-11-08 11:24 ` Rafael J. Wysocki
2019-11-08 11:37 ` Greg Kroah-Hartman
2019-11-13 11:02 ` Rafael J. Wysocki
1 sibling, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2019-11-08 11:24 UTC (permalink / raw)
To: Geert Uytterhoeven, Greg Kroah-Hartman
Cc: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon, linux-crypto,
linuxppc-dev, amd-gfx, dri-devel, netdev, linux-pm, linux-kernel
On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote:
> There is no need to cast a typed pointer to a void pointer when calling
> a function that accepts the latter. Remove it, as the cast prevents
> further compiler checks.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Greg, have you taken this one by any chance?
> ---
> drivers/power/avs/smartreflex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
> index 4684e7df833a81e9..5376f3d22f31eade 100644
> --- a/drivers/power/avs/smartreflex.c
> +++ b/drivers/power/avs/smartreflex.c
> @@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev)
> sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir);
>
> debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir,
> - (void *)sr_info, &pm_sr_fops);
> + sr_info, &pm_sr_fops);
> debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
> &sr_info->err_weight);
> debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/5] power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call
2019-11-08 11:24 ` Rafael J. Wysocki
@ 2019-11-08 11:37 ` Greg Kroah-Hartman
0 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-08 11:37 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Geert Uytterhoeven, Breno Leitão, Nayna Jain,
Paulo Flabiano Smorigo, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Herbert Xu, David S . Miller, Alex Deucher,
Christian König, David, David Airlie, Daniel Vetter,
Casey Leedom, Shannon Nelson, Pensando Drivers, Kevin Hilman,
Nishanth Menon, linux-crypto, linuxppc-dev, amd-gfx, dri-devel,
netdev, linux-pm, linux-kernel
On Fri, Nov 08, 2019 at 12:24:42PM +0100, Rafael J. Wysocki wrote:
> On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote:
> > There is no need to cast a typed pointer to a void pointer when calling
> > a function that accepts the latter. Remove it, as the cast prevents
> > further compiler checks.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Greg, have you taken this one by any chance?
Nope, it's all yours! :)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/5] power: avs: smartreflex: Remove superfluous cast in debugfs_create_file() call
2019-10-21 14:51 ` [PATCH 4/5] power: avs: smartreflex: Remove superfluous " Geert Uytterhoeven
2019-11-08 11:24 ` Rafael J. Wysocki
@ 2019-11-13 11:02 ` Rafael J. Wysocki
1 sibling, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2019-11-13 11:02 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon,
Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel
On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote:
> There is no need to cast a typed pointer to a void pointer when calling
> a function that accepts the latter. Remove it, as the cast prevents
> further compiler checks.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/power/avs/smartreflex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
> index 4684e7df833a81e9..5376f3d22f31eade 100644
> --- a/drivers/power/avs/smartreflex.c
> +++ b/drivers/power/avs/smartreflex.c
> @@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev)
> sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir);
>
> debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir,
> - (void *)sr_info, &pm_sr_fops);
> + sr_info, &pm_sr_fops);
> debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir,
> &sr_info->err_weight);
> debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
>
Applying as 5.5 material, thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 5/5] ionic: Use debugfs_create_bool() to export bool
2019-10-21 14:51 [PATCH 0/5] debugfs: Remove casts in debugfs_create_*() callers Geert Uytterhoeven
` (3 preceding siblings ...)
2019-10-21 14:51 ` [PATCH 4/5] power: avs: smartreflex: Remove superfluous " Geert Uytterhoeven
@ 2019-10-21 14:51 ` Geert Uytterhoeven
2019-10-21 16:35 ` Shannon Nelson
4 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2019-10-21 14:51 UTC (permalink / raw)
To: Breno Leitão, Nayna Jain, Paulo Flabiano Smorigo,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Herbert Xu, David S . Miller, Alex Deucher, Christian König,
David, David Airlie, Daniel Vetter, Casey Leedom, Shannon Nelson,
Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, 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>
---
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 bc03cecf80cc9eb4..5beba915f69d12dd 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] 12+ messages in thread
* Re: [PATCH 5/5] ionic: Use debugfs_create_bool() to export bool
2019-10-21 14:51 ` [PATCH 5/5] ionic: Use debugfs_create_bool() to export bool Geert Uytterhoeven
@ 2019-10-21 16:35 ` Shannon Nelson
0 siblings, 0 replies; 12+ messages in thread
From: Shannon Nelson @ 2019-10-21 16:35 UTC (permalink / raw)
To: Geert Uytterhoeven, Breno Leitão, Nayna Jain,
Paulo Flabiano Smorigo, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Herbert Xu, David S . Miller, Alex Deucher,
Christian König, David, David Airlie, Daniel Vetter,
Casey Leedom, Pensando Drivers, Kevin Hilman, Nishanth Menon
Cc: Greg Kroah-Hartman, linux-crypto, linuxppc-dev, amd-gfx,
dri-devel, netdev, linux-pm, linux-kernel
On 10/21/19 7:51 AM, Geert Uytterhoeven wrote:
> 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>
> ---
> 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 bc03cecf80cc9eb4..5beba915f69d12dd 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);
>
^ permalink raw reply [flat|nested] 12+ messages in thread