From: Bixuan Cui <cuibixuan@huawei.com>
To: <linux-kernel@vger.kernel.org>
Cc: <abbotti@mev.co.uk>, <hsweeten@visionengravers.com>,
<gregkh@linuxfoundation.org>, <grandmaster@al2klimov.de>,
<john.wanghui@huawei.com>
Subject: [PATCH -next] staging: comedi: Remove unused variable ‘min_full_scale’
Date: Thu, 13 May 2021 21:34:58 +0800 [thread overview]
Message-ID: <20210513133458.27766-1-cuibixuan@huawei.com> (raw)
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@huawei.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
next reply other threads:[~2021-05-13 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 13:34 Bixuan Cui [this message]
2021-05-13 12:34 ` Greg KH
2021-05-14 3:08 ` Bixuan Cui
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=20210513133458.27766-1-cuibixuan@huawei.com \
--to=cuibixuan@huawei.com \
--cc=abbotti@mev.co.uk \
--cc=grandmaster@al2klimov.de \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=john.wanghui@huawei.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®