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

Borislav Petkov
2019-11-10T11:37:24Z

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.