2018-03-05 09:55:33

by Harish Jenny K N

[permalink] [raw]
Subject: [PATCH v3] mmc: Export host capabilities to debugfs.

From: Abbas Raza <[email protected]>

This patch exports the host capabilities to debugfs

Signed-off-by: Abbas Raza <[email protected]>
Signed-off-by: Andrew Gabbasov <[email protected]>
Signed-off-by: Harish Jenny K N <[email protected]>
---

Changes in v3:
- Removed typecasting of &host->caps to (u32 *)

Changes in v2:
- Changed Author

drivers/mmc/core/debugfs.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
index c51e0c0..570c9e4 100644
--- a/drivers/mmc/core/debugfs.c
+++ b/drivers/mmc/core/debugfs.c
@@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)

card->debugfs_root = root;

+ if (!debugfs_create_x32("host_caps", S_IRUSR, root, &host->caps))
+ goto err;
+
if (!debugfs_create_x32("state", S_IRUSR, root, &card->state))
goto err;

--
1.9.1



2018-03-05 14:13:58

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH v3] mmc: Export host capabilities to debugfs.

On 5 March 2018 at 10:28, Harish Jenny K N <[email protected]> wrote:
> From: Abbas Raza <[email protected]>
>
> This patch exports the host capabilities to debugfs
>
> Signed-off-by: Abbas Raza <[email protected]>
> Signed-off-by: Andrew Gabbasov <[email protected]>
> Signed-off-by: Harish Jenny K N <[email protected]>
> ---
>
> Changes in v3:
> - Removed typecasting of &host->caps to (u32 *)
>
> Changes in v2:
> - Changed Author
>
> drivers/mmc/core/debugfs.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
> index c51e0c0..570c9e4 100644
> --- a/drivers/mmc/core/debugfs.c
> +++ b/drivers/mmc/core/debugfs.c
> @@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)
>
> card->debugfs_root = root;
>
> + if (!debugfs_create_x32("host_caps", S_IRUSR, root, &host->caps))
> + goto err;
> +

This isn't the correct place to created the node(s). Please move this
to mmc_add_host_debugfs().

Moreover, I suggest you export both caps and caps2 in the same change,
there is no need to have two changes for that - and finally name the
nodes to "caps" and "caps2".

> if (!debugfs_create_x32("state", S_IRUSR, root, &card->state))
> goto err;
>
> --
> 1.9.1
>

Kind regards
Uffe

2018-03-05 14:20:38

by Harish Jenny K N

[permalink] [raw]
Subject: Re: [PATCH v3] mmc: Export host capabilities to debugfs.



On Monday 05 March 2018 05:43 PM, Ulf Hansson wrote:
> On 5 March 2018 at 10:28, Harish Jenny K N <[email protected]> wrote:
>> From: Abbas Raza <[email protected]>
>>
>> This patch exports the host capabilities to debugfs
>>
>> Signed-off-by: Abbas Raza <[email protected]>
>> Signed-off-by: Andrew Gabbasov <[email protected]>
>> Signed-off-by: Harish Jenny K N <[email protected]>
>> ---
>>
>> Changes in v3:
>> - Removed typecasting of &host->caps to (u32 *)
>>
>> Changes in v2:
>> - Changed Author
>>
>> drivers/mmc/core/debugfs.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
>> index c51e0c0..570c9e4 100644
>> --- a/drivers/mmc/core/debugfs.c
>> +++ b/drivers/mmc/core/debugfs.c
>> @@ -289,6 +289,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)
>>
>> card->debugfs_root = root;
>>
>> + if (!debugfs_create_x32("host_caps", S_IRUSR, root, &host->caps))
>> + goto err;
>> +
> This isn't the correct place to created the node(s). Please move this
> to mmc_add_host_debugfs().
>
> Moreover, I suggest you export both caps and caps2 in the same change,
> there is no need to have two changes for that - and finally name the
> nodes to "caps" and "caps2".

Addressed your review findings in v4 patch.

Thanks,
Harish Jenny K N