Re: [PATCH v2 03/20] EDAC: Introduce mci_for_each_dimm() iterator

From: Borislav Petkov
Date: Sun Nov 10 2019 - 06:37:25 EST


On Wed, Nov 06, 2019 at 09:33:07AM +0000, Robert Richter wrote:
> @@ -702,6 +705,7 @@ EXPORT_SYMBOL_GPL(edac_get_owner);
> int edac_mc_add_mc_with_groups(struct mem_ctl_info *mci,
> const struct attribute_group **groups)
> {
> + struct dimm_info *dimm;
> int ret = -EINVAL;
> edac_dbg(0, "\n");
>

drivers/edac/edac_mc.c: In function âedac_mc_add_mc_with_groupsâ:
drivers/edac/edac_mc.c:711:20: warning: unused variable âdimmâ [-Wunused-variable]
struct dimm_info *dimm;
^~~~

Pushing the declaration into the #ifdef CONFIG_EDAC_DEBUG block.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette