git: b416345d5b13 - main - pcf8591: remove write-only variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Dec 2021 11:39:43 UTC
The branch main has been updated by avg:
URL: https://cgit.FreeBSD.org/src/commit/?id=b416345d5b13c77d82708cab94f43cb6144fbaf7
commit b416345d5b13c77d82708cab94f43cb6144fbaf7
Author: Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-12-13 11:10:12 +0000
Commit: Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-12-13 11:39:08 +0000
pcf8591: remove write-only variables
MFC after: 1 week
---
sys/dev/iicbus/pcf8591.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sys/dev/iicbus/pcf8591.c b/sys/dev/iicbus/pcf8591.c
index ff769b368d91..5bae3f0f272c 100644
--- a/sys/dev/iicbus/pcf8591.c
+++ b/sys/dev/iicbus/pcf8591.c
@@ -141,14 +141,12 @@ pcf8591_select_channel(device_t dev, int channel)
static int
pcf8591_channel_sysctl(SYSCTL_HANDLER_ARGS)
{
- struct pcf8591_softc *sc;
device_t dev;
int error, channel, val;
uint8_t reading;
dev = arg1;
channel = arg2;
- sc = device_get_softc(dev);
if (req->oldptr != NULL) {
error = pcf8591_select_channel(dev, channel);
@@ -173,7 +171,6 @@ pcf8591_start(void *arg)
struct sysctl_oid_list *tree;
struct sysctl_oid *inputs_node;
struct sysctl_oid_list *inputs;
- int error;
sc = arg;
dev = sc->sc_dev;
@@ -188,7 +185,7 @@ pcf8591_start(void *arg)
sc->sc_cfg = 0;
sc->sc_output = 0;
sc->sc_ch_count = 4;
- error = pcf8591_set_config(dev);
+ (void)pcf8591_set_config(dev);
ctx = device_get_sysctl_ctx(dev);
tree_node = device_get_sysctl_tree(dev);