lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210513133458.27766-1-cuibixuan@huawei.com>
Date:   Thu, 13 May 2021 21:34:58 +0800
From:   Bixuan Cui <cuibixuan@...wei.com>
To:     <linux-kernel@...r.kernel.org>
CC:     <abbotti@....co.uk>, <hsweeten@...ionengravers.com>,
        <gregkh@...uxfoundation.org>, <grandmaster@...klimov.de>,
        <john.wanghui@...wei.com>
Subject: [PATCH -next] staging: comedi: Remove unused variable ‘min_full_scale’

Fix the following build warnings:
drivers/comedi/drivers/jr3_pci.c:507:22:
	warning: variable ‘min_full_scale’ set but not used

And fix build warnings after removing ‘min_full_scale’:
drivers/comedi/drivers/jr3_pci.c:189:26:
	warning: ‘get_min_full_scales’ defined but not used
 static struct six_axis_t get_min_full_scales(struct jr3_sensor __iomem *sensor)
                          ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Bixuan Cui <cuibixuan@...wei.com>
---
 drivers/comedi/drivers/jr3_pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/comedi/drivers/jr3_pci.c b/drivers/comedi/drivers/jr3_pci.c
index 7a02c4fa3cda..122b95dc2bf9 100644
--- a/drivers/comedi/drivers/jr3_pci.c
+++ b/drivers/comedi/drivers/jr3_pci.c
@@ -186,7 +186,7 @@ static void set_full_scales(struct jr3_sensor __iomem *sensor,
 	set_s16(&sensor->command_word0, 0x0a00);
 }
 
-static struct six_axis_t get_min_full_scales(struct jr3_sensor __iomem *sensor)
+static __maybe_unused struct six_axis_t get_min_full_scales(struct jr3_sensor __iomem *sensor)
 {
 	struct six_axis_t result;
 
@@ -504,10 +504,8 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
 			result = poll_delay_min_max(20, 100);
 		} else {
 			/* Set full scale */
-			struct six_axis_t min_full_scale;
 			struct six_axis_t max_full_scale;
 
-			min_full_scale = get_min_full_scales(sensor);
 			max_full_scale = get_max_full_scales(sensor);
 			set_full_scales(sensor, max_full_scale);
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ