From patchwork Mon Aug 3 11:57:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kubecek X-Patchwork-Id: 1340294 X-Patchwork-Delegate: mkubecek@suse.cz Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BKxG14r54z9sRN for ; Mon, 3 Aug 2020 21:57:29 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgHCL52 (ORCPT ); Mon, 3 Aug 2020 07:57:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:41840 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgHCL5U (ORCPT ); Mon, 3 Aug 2020 07:57:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 18858ABF1 for ; Mon, 3 Aug 2020 11:57:34 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id C32FD60754; Mon, 3 Aug 2020 13:57:18 +0200 (CEST) Message-Id: <820434dc601a5382260711db05764f33898dfcfe.1596451857.git.mkubecek@suse.cz> In-Reply-To: References: From: Michal Kubecek Subject: [PATCH ethtool 5/7] netlink: mark unused parameters of bitset walker callbacks To: netdev@vger.kernel.org Date: Mon, 3 Aug 2020 13:57:18 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Some callbacks used with walk_bitset() do not use all parameters passed to them. Mark unused parameters explicitly to get rid of compiler warnings. Signed-off-by: Michal Kubecek --- netlink/pause.c | 3 ++- netlink/privflags.c | 2 +- netlink/settings.c | 9 ++++++--- netlink/tsinfo.c | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/netlink/pause.c b/netlink/pause.c index 48215d29aa34..7b6b3a1d2c10 100644 --- a/netlink/pause.c +++ b/netlink/pause.c @@ -21,7 +21,8 @@ struct pause_autoneg_status { bool asym_pause; }; -static void pause_autoneg_walker(unsigned int idx, const char *name, bool val, +static void pause_autoneg_walker(unsigned int idx, + const char *name __maybe_unused, bool val, void *data) { struct pause_autoneg_status *status = data; diff --git a/netlink/privflags.c b/netlink/privflags.c index a06cd6d88d9d..299ccdc21581 100644 --- a/netlink/privflags.c +++ b/netlink/privflags.c @@ -19,7 +19,7 @@ /* PRIVFLAGS_GET */ static void privflags_maxlen_walk_cb(unsigned int idx, const char *name, - bool val, void *data) + bool val __maybe_unused, void *data) { unsigned int *maxlen = data; unsigned int len, n; diff --git a/netlink/settings.c b/netlink/settings.c index 726259d83702..17ef000ed812 100644 --- a/netlink/settings.c +++ b/netlink/settings.c @@ -656,7 +656,8 @@ int linkstate_reply_cb(const struct nlmsghdr *nlhdr, void *data) return MNL_CB_OK; } -void wol_modes_cb(unsigned int idx, const char *name, bool val, void *data) +void wol_modes_cb(unsigned int idx, const char *name __maybe_unused, bool val, + void *data) { struct ethtool_wolinfo *wol = data; @@ -704,7 +705,8 @@ int wol_reply_cb(const struct nlmsghdr *nlhdr, void *data) return MNL_CB_OK; } -void msgmask_cb(unsigned int idx, const char *name, bool val, void *data) +void msgmask_cb(unsigned int idx, const char *name __maybe_unused, bool val, + void *data) { u32 *msg_mask = data; @@ -714,7 +716,8 @@ void msgmask_cb(unsigned int idx, const char *name, bool val, void *data) *msg_mask |= (1U << idx); } -void msgmask_cb2(unsigned int idx, const char *name, bool val, void *data) +void msgmask_cb2(unsigned int idx __maybe_unused, const char *name, + bool val, void *data __maybe_unused) { if (val) printf(" %s", name); diff --git a/netlink/tsinfo.c b/netlink/tsinfo.c index 03ce91cd4314..c6571ffc16ff 100644 --- a/netlink/tsinfo.c +++ b/netlink/tsinfo.c @@ -16,7 +16,7 @@ /* TSINFO_GET */ static void tsinfo_dump_cb(unsigned int idx, const char *name, bool val, - void *data) + void *data __maybe_unused) { if (!val) return;