diff mbox series

net: mvpp2: cls: Add pmap to fs dump

Message ID 20190618160910.62922-1-nhuck@google.com
State Changes Requested
Delegated to: David Miller
Headers show
Series net: mvpp2: cls: Add pmap to fs dump | expand

Commit Message

Nathan Huckleberry June 18, 2019, 4:09 p.m. UTC
There was an unused variable 'mvpp2_dbgfs_prs_pmap_fops'
Added a usage consistent with other fops to dump pmap
to userspace.

Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/529
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Nick Desaulniers June 18, 2019, 7 p.m. UTC | #1
On Tue, Jun 18, 2019 at 9:09 AM 'Nathan Huckleberry' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> There was an unused variable 'mvpp2_dbgfs_prs_pmap_fops'
> Added a usage consistent with other fops to dump pmap
> to userspace.
>
> Cc: clang-built-linux@googlegroups.com
> Link: https://github.com/ClangBuiltLinux/linux/issues/529
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>

Looks good to me based on Maxime's suggestion.  Thanks for seeking
clarification and following up on the feedback.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Nathan, you should use Suggested-by tags (liberally, IMO) when your
patch is based on feedback from others, in this case:
Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

> ---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
> index 0ee39ea47b6b..55947bc63cfd 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
> @@ -566,6 +566,9 @@ static int mvpp2_dbgfs_prs_entry_init(struct dentry *parent,
>         debugfs_create_file("hits", 0444, prs_entry_dir, entry,
>                             &mvpp2_dbgfs_prs_hits_fops);
>
> +       ddebugfs_create_file("pmap", 0444, prs_entry_dir, entry,
> +                            &mvpp2_dbgfs_prs_pmap_fops);
> +
David Miller June 19, 2019, 2:33 a.m. UTC | #2
From: Nathan Huckleberry <nhuck@google.com>
Date: Tue, 18 Jun 2019 09:09:10 -0700

> +	ddebugfs_create_file("pmap", 0444, prs_entry_dir, entry,

drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c: In function ‘mvpp2_dbgfs_prs_entry_init’:
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c:569:2: error: implicit declaration of function ‘ddebugfs_create_file’; did you mean ‘debugfs_create_file’? [-Werror=implicit-function-declaration]

This doesn't compile, did you build test this?
Maxime Chevallier June 19, 2019, 6:49 a.m. UTC | #3
Hello Nathan,

On Tue, 18 Jun 2019 09:09:10 -0700
Nathan Huckleberry <nhuck@google.com> wrote:

>There was an unused variable 'mvpp2_dbgfs_prs_pmap_fops'
>Added a usage consistent with other fops to dump pmap
>to userspace.

Thanks for sending a fix. Besides the typo preventing your patch from
compiling, you should also prefix the patch by "net: mvpp2: debugfs:"
rather than "cls", which is used for classifier patches.

Thanks,

Maxime
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
index 0ee39ea47b6b..55947bc63cfd 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
@@ -566,6 +566,9 @@  static int mvpp2_dbgfs_prs_entry_init(struct dentry *parent,
 	debugfs_create_file("hits", 0444, prs_entry_dir, entry,
 			    &mvpp2_dbgfs_prs_hits_fops);
 
+	ddebugfs_create_file("pmap", 0444, prs_entry_dir, entry,
+			     &mvpp2_dbgfs_prs_pmap_fops);
+
 	return 0;
 }