[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210410064932.12905-1-linqiheng@huawei.com>
Date: Sat, 10 Apr 2021 14:49:32 +0800
From: Qiheng Lin <linqiheng@...wei.com>
To: <linqiheng@...wei.com>, Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Deepak R Varma <mh12gx2825@...il.com>,
"Alexander A. Klimov" <grandmaster@...klimov.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Masahiro Yamada <masahiroy@...nel.org>
CC: <linux-staging@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH -next] staging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes'
GCC reports the following warning with W=1:
drivers/staging/comedi/drivers/tests/ni_routes_test.c:215:45: warning:
variable 'olddevroutes' set but not used [-Wunused-but-set-variable]
215 | const struct ni_device_routes *devroutes, *olddevroutes;
| ^~~~~~~~~~~~
This variable is not used in function , this commit
remove it to fix the warning.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Qiheng Lin <linqiheng@...wei.com>
---
.../staging/comedi/drivers/tests/ni_routes_test.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/tests/ni_routes_test.c b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
index 48e4a7a9cd14..652362486ff6 100644
--- a/drivers/staging/comedi/drivers/tests/ni_routes_test.c
+++ b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
@@ -212,7 +212,7 @@ static bool route_set_sources_in_order(const struct ni_device_routes *devroutes)
static void test_ni_assign_device_routes(void)
{
- const struct ni_device_routes *devroutes, *olddevroutes;
+ const struct ni_device_routes *devroutes;
const u8 *table, *oldtable;
init_pci_6070e();
@@ -248,7 +248,6 @@ static void test_ni_assign_device_routes(void)
RVI(table, B(NI_AI_ConvertClock), B(NI_PFI(2))) == V(NI_PFI_OUTPUT_AI_CONVERT),
"pci-6070e finds e-series route_values table\n");
- olddevroutes = devroutes;
oldtable = table;
init_pci_6220();
ni_assign_device_routes(ni_mseries, pci_6220, NULL,
Powered by blists - more mailing lists