netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rafael@kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@resnulli.us>,
	Johannes Berg <johannes@sipsolutions.net>,
	Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2 1/3] genetlink: Add per family bind/unbind callbacks
Date: Tue, 6 Feb 2024 18:42:02 -0800	[thread overview]
Message-ID: <20240206184202.3089c098@kernel.org> (raw)
In-Reply-To: <20240206133605.1518373-2-stanislaw.gruszka@linux.intel.com>

On Tue,  6 Feb 2024 14:36:03 +0100 Stanislaw Gruszka wrote:
> +static void genl_unbind(struct net *net, int group)
> +{
> +	const struct genl_family *family;
> +	unsigned int id;
> +
> +	down_read(&cb_lock);
> +
> +	idr_for_each_entry(&genl_fam_idr, family, id) {
> +		const struct genl_multicast_group *grp;
> +		int i;
> +
> +		if (family->n_mcgrps == 0)
> +			continue;
> +
> +		i = group - family->mcgrp_offset;
> +		if (i < 0 || i >= family->n_mcgrps)
> +			continue;
> +
> +		grp = &family->mcgrps[i];
> +
> +		if (family->unbind)
> +			family->unbind(i);
> +
> +		break;

Compiler says:

net/netlink/genetlink.c:1857:52: warning: variable ‘grp’ set but not used [-Wunused-but-set-variable]
 1857 |                 const struct genl_multicast_group *grp;
      |                                                    ^~~
-- 
pw-bot: cr

  reply	other threads:[~2024-02-07  2:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 13:36 [PATCH v2 0/3] thermal/netlink/intel_hfi: Enable HFI feature only when required Stanislaw Gruszka
2024-02-06 13:36 ` [PATCH v2 1/3] genetlink: Add per family bind/unbind callbacks Stanislaw Gruszka
2024-02-07  2:42   ` Jakub Kicinski [this message]
2024-02-06 13:36 ` [PATCH v2 2/3] thermal: netlink: Add genetlink bind/unbind notifications Stanislaw Gruszka
2024-02-06 13:36 ` [PATCH v2 3/3] thermal: intel: hfi: Enable interface only when required Stanislaw Gruszka
2024-02-07  3:18   ` Ricardo Neri
2024-02-07 11:47     ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240206184202.3089c098@kernel.org \
    --to=kuba@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafael@kernel.org \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=stanislaw.gruszka@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).