LKML Archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	dwmw2@infradead.org
Subject: [PATCH 06/16] char: applicom: Remove 3 unused variables 'ret' and 2 instances of 'byte_reset_it'
Date: Thu, 20 May 2021 13:13:37 +0100	[thread overview]
Message-ID: <20210520121347.3467794-7-lee.jones@linaro.org> (raw)
In-Reply-To: <20210520121347.3467794-1-lee.jones@linaro.org>

Fixes the following W=1 kernel build warning(s):

 drivers/char/applicom.c: In function ‘ac_register_board’:
 drivers/char/applicom.c:131:25: warning: variable ‘byte_reset_it’ set but not used [-Wunused-but-set-variable]
 drivers/char/applicom.c: In function ‘ac_read’:
 drivers/char/applicom.c:540:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/char/applicom.c: In function ‘ac_ioctl’:
 drivers/char/applicom.c:703:25: warning: variable ‘byte_reset_it’ set but not used [-Wunused-but-set-variable]

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: dwmw2@infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/char/applicom.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index deb85a334c937..2d4ab42a986cb 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -128,8 +128,6 @@ static int dummy;	/* dev_id for request_irq() */
 static int ac_register_board(unsigned long physloc, void __iomem *loc, 
 		      unsigned char boardno)
 {
-	volatile unsigned char byte_reset_it;
-
 	if((readb(loc + CONF_END_TEST)     != 0x00) ||
 	   (readb(loc + CONF_END_TEST + 1) != 0x55) ||
 	   (readb(loc + CONF_END_TEST + 2) != 0xAA) ||
@@ -157,7 +155,7 @@ static int ac_register_board(unsigned long physloc, void __iomem *loc,
 	apbs[boardno].RamIO = loc;
 	init_waitqueue_head(&apbs[boardno].FlagSleepSend);
 	spin_lock_init(&apbs[boardno].mutex);
-	byte_reset_it = readb(loc + RAM_IT_TO_PC);
+	readb(loc + RAM_IT_TO_PC);
 
 	numboards++;
 	return boardno + 1;
@@ -537,7 +535,6 @@ static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_
 	unsigned long flags;
 	unsigned int i;
 	unsigned char tmp;
-	int ret = 0;
 	DECLARE_WAITQUEUE(wait, current);
 #ifdef DEBUG
 	int loopcount=0;
@@ -568,7 +565,7 @@ static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_
 
 				/* Got a packet for us */
 				memset(&st_loc, 0, sizeof(st_loc));
-				ret = do_ac_read(i, buf, &st_loc, &mailbox);
+				do_ac_read(i, buf, &st_loc, &mailbox);
 				spin_unlock_irqrestore(&apbs[i].mutex, flags);
 				set_current_state(TASK_RUNNING);
 				remove_wait_queue(&FlagSleepRec, &wait);
@@ -700,7 +697,6 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	void __iomem *pmem;
 	int ret = 0;
 	static int warncount = 10;
-	volatile unsigned char byte_reset_it;
 	struct st_ram_io *adgl;
 	void __user *argp = (void __user *)arg;
 
@@ -762,7 +758,7 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		
 		for (i = 0; i < MAX_BOARD; i++) {
 			if (apbs[i].RamIO) {
-				byte_reset_it = readb(apbs[i].RamIO + RAM_IT_TO_PC);
+				readb(apbs[i].RamIO + RAM_IT_TO_PC);
 			}
 		}
 		break;
-- 
2.31.1


  parent reply	other threads:[~2021-05-20 12:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 12:13 [PATCH 00/16] Rid W=1 warnings from Char Lee Jones
2021-05-20 12:13 ` [PATCH 01/16] char: pcmcia: cm4000_cs: Remove unused variable 'tmp' Lee Jones
2021-05-20 12:13 ` [PATCH 02/16] char: pcmcia: cm4040_cs: Remove unused variable 'uc' Lee Jones
2021-05-20 12:13 ` [PATCH 03/16] char: random: Include header containing our prototypes Lee Jones
2021-05-20 12:13 ` [PATCH 04/16] char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues Lee Jones
2021-05-20 12:13 ` [PATCH 05/16] " Lee Jones
2021-05-21  8:09   ` Greg Kroah-Hartman
2021-05-21  8:17     ` Lee Jones
2021-05-20 12:13 ` Lee Jones [this message]
2021-05-20 12:27   ` [PATCH 06/16] char: applicom: Remove 3 unused variables 'ret' and 2 instances of 'byte_reset_it' Arnd Bergmann
2021-05-20 12:13 ` [PATCH 07/16] char: tpm: tpm1-cmd: Fix a couple of misnamed functions Lee Jones
2021-05-20 16:41   ` Jarkko Sakkinen
2021-05-20 12:13 ` [PATCH 08/16] char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours Lee Jones
2021-05-20 16:43   ` Jarkko Sakkinen
2021-05-20 12:13 ` [PATCH 09/16] char: agp: backend: Demote some non-conformant kernel-doc headers Lee Jones
2021-06-17  9:52   ` Lee Jones
2021-05-20 12:13 ` [PATCH 10/16] char: agp: frontend: Include header file containing our prototypes Lee Jones
2021-05-20 12:13 ` [PATCH 11/16] char: agp: via-agp: Remove unused variable 'current_size' Lee Jones
2021-05-20 12:13 ` [PATCH 12/16] char: hpet: Remove unused variable 'm' Lee Jones
2021-05-20 12:13 ` [PATCH 13/16] char: agp: generic: Place braces around optimised out function in if() Lee Jones
2021-05-20 12:13 ` [PATCH 14/16] char: agp: uninorth-agp: Remove unused variable 'size' Lee Jones
2021-05-20 12:13 ` [PATCH 15/16] char: hw_random: pseries-rng: Demote non-conformant kernel-doc header Lee Jones
2021-05-20 12:13 ` [PATCH 16/16] char: mem: Provide local prototype for non-static function Lee Jones
2021-05-20 12:32   ` Arnd Bergmann
2021-05-20 12:56 ` [PATCH 00/16] Rid W=1 warnings from Char Arnd Bergmann
2021-05-21  7:22   ` Lee Jones
2021-05-21  7:42     ` Greg Kroah-Hartman
2021-05-21  7:44       ` Greg Kroah-Hartman
2021-05-21  7:56         ` Lee Jones

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=20210520121347.3467794-7-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).