Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wunused-const-variable in drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c #529

Closed
nhukc opened this issue Jun 12, 2019 · 2 comments
Closed
Assignees
Labels
-Wunused-const-variable [ARCH] arm64 This bug impacts ARCH=arm64 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2

Comments

@nhukc
Copy link

nhukc commented Jun 12, 2019

drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c:365:1: warning: unused variable 'mvpp2_dbgfs_prs_pmap_fops' [-Wunused-const-variable]
DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_pmap);
^

Introduced in 21da57a. This file is for dumping useful debugging information to userspace. The functionality of pmap dumping exists, but is unused.

static int mvpp2_dbgfs_prs_pmap_show(struct seq_file *s, void *unused)
{
	struct mvpp2_dbgfs_prs_entry *entry = s->private;
	struct mvpp2_prs_entry pe;
	unsigned int pmap;

	mvpp2_prs_init_from_hw(entry->priv, &pe, entry->tid);

	pmap = mvpp2_prs_tcam_port_map_get(&pe);
	pmap &= MVPP2_PRS_PORT_MASK;

	seq_printf(s, "%02x\n", pmap);

	return 0;
}
	/* Create each attr */
	debugfs_create_file("sram", 0444, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_sram_fops);

	debugfs_create_file("valid", 0644, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_valid_fops);

	debugfs_create_file("lookup_id", 0644, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_lu_fops);

	debugfs_create_file("ai", 0644, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_ai_fops);

	debugfs_create_file("header_data", 0644, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_hdata_fops);

	debugfs_create_file("hits", 0444, prs_entry_dir, entry,
			    &mvpp2_dbgfs_prs_hits_fops);
@nhukc nhukc added [BUG] linux A bug that should be fixed in the mainline kernel. [ARCH] arm64 This bug impacts ARCH=arm64 low priority This bug is not critical and not a priority -Wunused-const-variable labels Jun 12, 2019
@nhukc nhukc self-assigned this Jun 12, 2019
@nhukc
Copy link
Author

nhukc commented Jun 13, 2019

Reached out to author+maintainers https://groups.google.com/forum/#!topic/clang-built-linux/ydA_FRyvZ14

@nickdesaulniers nickdesaulniers added the [PATCH] Accepted A submitted patch has been accepted upstream label Jun 20, 2019
@nhukc nhukc added the [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2 label Jun 24, 2019
@nhukc nhukc closed this as completed Jun 24, 2019
@nickdesaulniers nickdesaulniers removed the [PATCH] Accepted A submitted patch has been accepted upstream label Jun 24, 2019
@tpimh tpimh removed the low priority This bug is not critical and not a priority label Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wunused-const-variable [ARCH] arm64 This bug impacts ARCH=arm64 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2
Projects
None yet
Development

No branches or pull requests

3 participants