Subject: Re: Cleanup of -Wunused-const-variable in drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c

From: Maxime Chevallier <[email-masked]>
Date: Tue, 18 Jun 2019 08:39:00 +0200

Hello Nathan,

On Thu, 13 Jun 2019 10:53:05 -0700
Nathan Huckleberry <[email-masked]> wrote:

>Hey all,
>
>I'm looking into cleaning up ignored warnings in the kernel so we can
>remove compiler flags to ignore warnings.
>
>There's an unused variable 'mvpp2_dbgfs_prs_pmap_fops' in
>mvpp2_debugfs.c. It looks like this code is for dumping useful
>information into userspace. I'd like to either remove the variable or
>dump it to userspace in the same way the other variables are.

Thanks for reporting this.

The ops should actually be used, fixing the warning should be as simple
as adding this into mvpp2_dbgfs_prs_entry_init :

+       debugfs_create_file("pmap", 0444, prs_entry_dir, entry,
+                           &mvpp2_dbgfs_prs_pmap_fops);
+

>Wanted to reach out for opinions on the best course of action before
>submitting a patch.

Can you submit a patch, or do you prefer me to do it ?

Thanks,

Maxime