Skip to contentSkip to conversation

Rid W=1 warnings from Char

PATCH In review Lee Jones 4 participants 29 messages May 20, 2021 – Jun 17, 2021

Subsystems (9)
lore
Share & tools
lore

Lee Jones

author
#0 lore raw

cover Rid W=1 warnings from Char

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

 drivers/char/agp/backend.c           |  4 +-
 drivers/char/agp/frontend.c          |  1 +
 drivers/char/agp/generic.c           |  3 +-
 drivers/char/agp/uninorth-agp.c      |  3 --
 drivers/char/agp/via-agp.c           |  3 --
 drivers/char/applicom.c              | 10 ++--
 drivers/char/hpet.c                  |  4 +-
 drivers/char/hw_random/pseries-rng.c |  2 +-
 drivers/char/mem.c                   |  2 +
 drivers/char/pcmcia/cm4000_cs.c      |  3 +-
 drivers/char/pcmcia/cm4040_cs.c      |  3 +-
 drivers/char/pcmcia/synclink_cs.c    | 74 +++++++++++++++-------------
 drivers/char/random.c                |  1 +
 drivers/char/tpm/tpm1-cmd.c          |  4 +-
 drivers/char/tpm/tpm_ftpm_tee.c      |  6 +--
 15 files changed, 60 insertions(+), 63 deletions(-)
Cc Arnd Bergmann <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Bob Picco <[email protected]>
Cc Clemens Ladisch <[email protected]>
Cc "C. Scott Ananian" <[email protected]>
Cc "cs.c" <[email protected]>
Cc Dave Safford <[email protected]>
Cc David Airlie <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Harald Welte <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc "Jason A. Donenfeld" <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jerome Glisse <[email protected]>
Cc Kanoj Sarcar <[email protected]>
Cc Kylene Hall <[email protected]>
Cc Lee Jones <[email protected]>
Cc Lijun Pan <[email protected]>
Cc Matt Mackall <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michael Neuling <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Huewe <[email protected]>
Cc Reiner Sailer <[email protected]>
Cc "Theodore Ts'o" <[email protected]>
Cc Thirupathaiah Annapureddy <[email protected]>
Cc Tyrel Datwyler <[email protected]>
Cc "Uwe Kleine-König" <[email protected]>
Cc van Doorn <[email protected]>
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/16 char: pcmcia: cm4000_cs: Remove unused variable 'tmp'

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

drivers/char/pcmcia/cm4000_cs.c: In function ‘cmm_write’:
drivers/char/pcmcia/cm4000_cs.c:1053:16: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]

Cc Harald Welte <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "cs.c" <[email protected]>
---
 drivers/char/pcmcia/cm4000_cs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/char/pcmcia/cm4000_cs.c +1 -2
index 89681f07bc787..9ec25735425d6 100644
@@ -1050,7 +1050,6 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
 	struct cm4000_dev *dev = filp->private_data;
 	unsigned int iobase = dev->p_dev->resource[0]->start;
 	unsigned short s;
-	unsigned char tmp;
 	unsigned char infolen;
 	unsigned char sendT0;
 	unsigned short nsend;
@@ -1148,7 +1147,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
 	set_cardparameter(dev);
 
 	/* dummy read, reset flag procedure received */
-	tmp = inb(REG_FLAGS1(iobase));
+	inb(REG_FLAGS1(iobase));
 
 	dev->flags1 = 0x20	/* T_Active */
 	    | (sendT0)
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/16 char: pcmcia: cm4040_cs: Remove unused variable 'uc'

In reply to Lee Jones

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

drivers/char/pcmcia/cm4040_cs.c: In function ‘cm4040_read’:
drivers/char/pcmcia/cm4040_cs.c:224:16: warning: variable ‘uc’ set but not used [-Wunused-but-set-variable]

Cc Harald Welte <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/char/pcmcia/cm4040_cs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/char/pcmcia/cm4040_cs.c +1 -2
index d5e43606339c3..827711911da41 100644
@@ -221,7 +221,6 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
 	unsigned long i;
 	size_t min_bytes_to_read;
 	int rc;
-	unsigned char uc;
 
 	DEBUGP(2, dev, "-> cm4040_read(%s,%d)\n", current->comm, current->pid);
 
@@ -308,7 +307,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
 			return -EIO;
 	}
 
-	uc = xinb(iobase + REG_OFFSET_BULK_IN);
+	xinb(iobase + REG_OFFSET_BULK_IN);
 
 	DEBUGP(2, dev, "<- cm4040_read (successfully)\n");
 	return min_bytes_to_read;
Signature · 1 line
2.31.1
author
#3 lore raw

PATCH 3/16 char: random: Include header containing our prototypes

In reply to Lee Jones

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

drivers/char/random.c:2283:6: warning: no previous prototype for ‘add_hwgenerator_randomness’ [-Wmissing-prototypes]

Cc "Theodore Ts'o" <[email protected]>
Cc "Jason A. Donenfeld" <[email protected]>
Cc Matt Mackall <[email protected]>
---
 drivers/char/random.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/random.c +1 -0
index 605969ed0f965..852e765aea62c 100644
@@ -317,6 +317,7 @@
 #include <linux/fcntl.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/hw_random.h>
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/fs.h>
Signature · 1 line
2.31.1
author
#4 lore raw

PATCH 4/16 char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues

In reply to Lee Jones
---
 drivers/char/pcmcia/synclink_cs.c | 64 ++++++++++++++++---------------
 1 file changed, 33 insertions(+), 31 deletions(-)
drivers/char/pcmcia/synclink_cs.c +33 -31
index 9f7420bc50267..4a1e63911b279 100644
@@ -483,7 +483,7 @@ static void* mgslpc_get_text_ptr(void)
 	return mgslpc_get_text_ptr;
 }
 
-/**
+/*
  * line discipline callback wrappers
  *
  * The wrappers maintain line discipline references
@@ -3861,12 +3861,13 @@ static void tx_timeout(struct timer_list *t)
 #if SYNCLINK_GENERIC_HDLC
 
 /**
- * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.)
- * set encoding and frame check sequence (FCS) options
+ * hdlcdev_attach() - called by generic HDLC layer when protocol selected
+ *                    (PPP, frame relay, etc.) set encoding and frame check
+ *                    sequence (FCS) options
  *
- * dev       pointer to network device structure
- * encoding  serial encoding setting
- * parity    FCS setting
+ * @dev:       pointer to network device structure
+ * @encoding:  serial encoding setting
+ * @parity:    FCS setting
  *
  * returns 0 if success, otherwise error code
  */
@@ -3914,10 +3915,10 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
 }
 
 /**
- * called by generic HDLC layer to send frame
+ * hdlcdev_xmit() - called by generic HDLC layer to send frame
  *
- * skb  socket buffer containing HDLC frame
- * dev  pointer to network device structure
+ * @skb:  socket buffer containing HDLC frame
+ * @dev:  pointer to network device structure
  */
 static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
 				      struct net_device *dev)
@@ -3959,10 +3960,10 @@ static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
 }
 
 /**
- * called by network layer when interface enabled
- * claim resources and initialize hardware
+ * hdlcdev_open() - called by network layer when interface enabled
+ *                  claim resources and initialize hardware
  *
- * dev  pointer to network device structure
+ * @dev:  pointer to network device structure
  *
  * returns 0 if success, otherwise error code
  */
@@ -4022,10 +4023,10 @@ static int hdlcdev_open(struct net_device *dev)
 }
 
 /**
- * called by network layer when interface is disabled
- * shutdown hardware and release resources
+ * hdlcdev_close() - called by network layer when interface is
+ *                   disabled shutdown hardware and release resources
  *
- * dev  pointer to network device structure
+ * @dev:  pointer to network device structure
  *
  * returns 0 if success, otherwise error code
  */
@@ -4161,9 +4162,10 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 }
 
 /**
- * called by network layer when transmit timeout is detected
+ * hdlcdev_tx_timeout() - called by network layer when transmit timeout
+ *                        is detected
  *
- * dev  pointer to network device structure
+ * @dev:  pointer to network device structure
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
@@ -4184,10 +4186,10 @@ static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 }
 
 /**
- * called by device driver when transmit completes
- * reenable network layer transmit if stopped
+ * hdlcdev_tx_done() - called by device driver when transmit completes
+ *                     reenable network layer transmit if stopped
  *
- * info  pointer to device instance information
+ * @info:  pointer to device instance information
  */
 static void hdlcdev_tx_done(MGSLPC_INFO *info)
 {
@@ -4196,12 +4198,12 @@ static void hdlcdev_tx_done(MGSLPC_INFO *info)
 }
 
 /**
- * called by device driver when frame received
- * pass frame to network layer
+ * hdlcdev_rx() - called by device driver when frame received
+ *                pass frame to network layer
  *
- * info  pointer to device instance information
- * buf   pointer to buffer contianing frame data
- * size  count of data bytes in buf
+ * @info:  pointer to device instance information
+ * @buf:   pointer to buffer contianing frame data
+ * @size:  count of data bytes in buf
  */
 static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size)
 {
@@ -4236,10 +4238,10 @@ static const struct net_device_ops hdlcdev_ops = {
 };
 
 /**
- * called by device driver when adding device instance
- * do generic HDLC initialization
+ * hdlcdev_init() - called by device driver when adding device instance
+ *                  do generic HDLC initialization
  *
- * info  pointer to device instance information
+ * @info:  pointer to device instance information
  *
  * returns 0 if success, otherwise error code
  */
@@ -4284,10 +4286,10 @@ static int hdlcdev_init(MGSLPC_INFO *info)
 }
 
 /**
- * called by device driver when removing device instance
- * do generic HDLC cleanup
+ * hdlcdev_exit() - called by device driver when removing device instance
+ *                  do generic HDLC cleanup
  *
- * info  pointer to device instance information
+ * @info:  pointer to device instance information
  */
 static void hdlcdev_exit(MGSLPC_INFO *info)
 {
Signature · 1 line
2.31.1
author
#5 lore raw

PATCH 5/16 char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues

In reply to Lee Jones

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

drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'dev' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'ifr' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'cmd' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: expecting prototype for called by network layer to process IOCTL call to network device(). Prototype was for hdlcdev_ioctl() instead drivers/char/pcmcia/synclink_cs.c:4173: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Lee Jones <[email protected]>
---
 drivers/char/pcmcia/synclink_cs.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/char/pcmcia/synclink_cs.c +7 -5
index 4a1e63911b279..b004abac61542 100644
@@ -4054,11 +4054,12 @@ static int hdlcdev_close(struct net_device *dev)
 }
 
 /**
- * called by network layer to process IOCTL call to network device
+ * hdlcdev_ioctl() - called by network layer to process IOCTL call
+ *                   to network device
  *
- * dev  pointer to network device structure
- * ifr  pointer to network interface request structure
- * cmd  IOCTL command code
+ * @dev:  pointer to network device structure
+ * @ifr:  pointer to network interface request structure
+ * @cmd:  IOCTL command code
  *
  * returns 0 if success, otherwise error code
  */
@@ -4165,7 +4166,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  * hdlcdev_tx_timeout() - called by network layer when transmit timeout
  *                        is detected
  *
- * @dev:  pointer to network device structure
+ * @dev:      pointer to network device structure
+ * @txqueue:  unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
Signature · 1 line
2.31.1
#6 lore raw

Re: [PATCH 05/16] char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues

Quoted 50 lines · Lee Jones

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

drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'dev' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'ifr' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'cmd' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: expecting prototype for called by network layer to process IOCTL call to network device(). Prototype was for hdlcdev_ioctl() instead drivers/char/pcmcia/synclink_cs.c:4173: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

---
 drivers/char/pcmcia/synclink_cs.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/char/pcmcia/synclink_cs.c +7 -5
index 4a1e63911b279..b004abac61542 100644
@@ -4054,11 +4054,12 @@ static int hdlcdev_close(struct net_device *dev)
 }
 
 /**
- * called by network layer to process IOCTL call to network device
+ * hdlcdev_ioctl() - called by network layer to process IOCTL call
+ *                   to network device
  *
- * dev  pointer to network device structure
- * ifr  pointer to network interface request structure
- * cmd  IOCTL command code
+ * @dev:  pointer to network device structure
+ * @ifr:  pointer to network interface request structure
+ * @cmd:  IOCTL command code
  *
  * returns 0 if success, otherwise error code
  */
@@ -4165,7 +4166,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  * hdlcdev_tx_timeout() - called by network layer when transmit timeout
  *                        is detected
  *
- * @dev:  pointer to network device structure
+ * @dev:      pointer to network device structure
+ * @txqueue:  unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
Signature · 1 line
2.31.1

This one did not apply to my tree :(

author
#7 lore raw

Re: [PATCH 05/16] char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues

Quoted 42 lines · Greg Kroah-Hartman
Quoted 41 lines · Lee Jones

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

drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'dev' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'ifr' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: Function parameter or member 'cmd' not described in 'hdlcdev_ioctl' drivers/char/pcmcia/synclink_cs.c:4068: warning: expecting prototype for called by network layer to process IOCTL call to network device(). Prototype was for hdlcdev_ioctl() instead drivers/char/pcmcia/synclink_cs.c:4173: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout'

---
 drivers/char/pcmcia/synclink_cs.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/char/pcmcia/synclink_cs.c +5 -4
index 4a1e63911b279..b004abac61542 100644
@@ -4054,11 +4054,12 @@ static int hdlcdev_close(struct net_device *dev)
 }
 
 /**
- * called by network layer to process IOCTL call to network device
+ * hdlcdev_ioctl() - called by network layer to process IOCTL call
+ *                   to network device
  *
- * dev  pointer to network device structure
- * ifr  pointer to network interface request structure
- * cmd  IOCTL command code
+ * @dev:  pointer to network device structure
+ * @ifr:  pointer to network interface request structure
+ * @cmd:  IOCTL command code
  *
  * returns 0 if success, otherwise error code
  */
@@ -4165,7 +4166,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  * hdlcdev_tx_timeout() - called by network layer when transmit timeout
  *                        is detected
  *
Quoted 8 lines

drivers/char/pcmcia/synclink_cs.c static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) · line 4173

Quoted 6 lines
drivers/char/pcmcia/synclink_cs.c +2 -1
- * @dev:  pointer to network device structure
+ * @dev:      pointer to network device structure
+ * @txqueue:  unused
  */
 static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {

This one did not apply to my tree :(

It's based on yesterday's -next.

I'll re-rebase any that are left.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#8 lore raw

PATCH 6/16 char: applicom: Remove 3 unused variables 'ret' and 2 instances of 'byte_reset_it'

In reply to Lee Jones

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 <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/char/applicom.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/char/applicom.c +3 -7
index deb85a334c937..2d4ab42a986cb 100644
@@ -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;
Signature · 1 line
2.31.1
maintainer
#9 lore raw

Re: [PATCH 06/16] char: applicom: Remove 3 unused variables 'ret' and 2 instances of 'byte_reset_it'

Review static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_ · line 571

Quoted 9 lines · Lee Jones
(quoted diff) +1 -1
@@ -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);

This change doesn't look right to me. It's clear that the code we have is bogus, but I think what the authors intended was:

drivers/char/applicom.c +0 -0
@@ -577,7 +577,7 @@ static ssize_t ac_read (struct file *filp, char

__user *buf, size_t count, loff_
return -EFAULT;
if (copy_to_user(buf + sizeof(st_loc),
&mailbox, sizeof(mailbox)))

                                        return -EFAULT;
-                               return tmp;
+                               return ret;
                        }

                        if (tmp > 2) {

From the git history, I can see that this got changed in linux-2.3.99, but the previous
version just returned zero on success instead of the number of bytes, so presumably
nobody ever cared about the returned value.

Quoted 9 lines
(quoted diff) +0 -1
@@ -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;
 

Review static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 762

Quoted 6 lines
(quoted diff) +1 -1
@@ -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);
                        }

This is a little subtle but should be fine on all architectures now. I suspect this used to be required a long time ago before the readb() function worked correctly everywhere.

I'm also reminded that I had meant to send a patch to move this file to drivers/staging,
as all evidence suggests it has not been used for decades.

Arnd

author
#10 lore raw

PATCH 7/16 char: tpm: tpm1-cmd: Fix a couple of misnamed functions

In reply to Lee Jones

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

drivers/char/tpm/tpm1-cmd.c:325: warning: expecting prototype for tpm_startup(). Prototype was for tpm1_startup() instead drivers/char/tpm/tpm1-cmd.c:621: warning: expecting prototype for tpm_continue_selftest(). Prototype was for tpm1_continue_selftest() instead

Cc Peter Huewe <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc van Doorn <[email protected]>
Cc Dave Safford <[email protected]>
Cc Reiner Sailer <[email protected]>
Cc Kylene Hall <[email protected]>
---
 drivers/char/tpm/tpm1-cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/tpm/tpm1-cmd.c +2 -2
index ca7158fa6e6cd..f7dc986fa4a0a 100644
@@ -312,7 +312,7 @@ unsigned long tpm1_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal)
 #define TPM_ST_CLEAR 1
 
 /**
- * tpm_startup() - turn on the TPM
+ * tpm1_startup() - turn on the TPM
  * @chip: TPM chip to use
  *
  * Normally the firmware should start the TPM. This function is provided as a
@@ -611,7 +611,7 @@ int tpm1_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf)
 
 #define TPM_ORD_CONTINUE_SELFTEST 83
 /**
- * tpm_continue_selftest() - run TPM's selftest
+ * tpm1_continue_selftest() - run TPM's selftest
  * @chip: TPM chip to use
  *
  * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing
Signature · 1 line
2.31.1
maintainer Reviewed-by on v1 7/16
#11 lore raw

Re: [PATCH 07/16] char: tpm: tpm1-cmd: Fix a couple of misnamed functions

Quoted 5 lines · Lee Jones

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

drivers/char/tpm/tpm1-cmd.c:325: warning: expecting prototype for tpm_startup(). Prototype was for tpm1_startup() instead drivers/char/tpm/tpm1-cmd.c:621: warning: expecting prototype for tpm_continue_selftest(). Prototype was for tpm1_continue_selftest() instead

Quoted 9 lines
Cc Peter Huewe <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc van Doorn <[email protected]>
Cc Dave Safford <[email protected]>
Cc Reiner Sailer <[email protected]>
Cc Kylene Hall <[email protected]>

Thanks, I'll apply this.

Quoted 30 lines
---
 drivers/char/tpm/tpm1-cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/tpm/tpm1-cmd.c +2 -2
index ca7158fa6e6cd..f7dc986fa4a0a 100644
@@ -312,7 +312,7 @@ unsigned long tpm1_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal)
 #define TPM_ST_CLEAR 1
 
 /**
- * tpm_startup() - turn on the TPM
+ * tpm1_startup() - turn on the TPM
  * @chip: TPM chip to use
  *
  * Normally the firmware should start the TPM. This function is provided as a
@@ -611,7 +611,7 @@ int tpm1_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf)
 
 #define TPM_ORD_CONTINUE_SELFTEST 83
 /**
- * tpm_continue_selftest() - run TPM's selftest
+ * tpm1_continue_selftest() - run TPM's selftest
  * @chip: TPM chip to use
  *
  * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing
Signature · 1 line
2.31.1

/Jarkko

author
#12 lore raw

PATCH 8/16 char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours

In reply to Lee Jones

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

drivers/char/tpm/tpm_ftpm_tee.c:218: warning: Function parameter or member 'dev' not described in 'ftpm_tee_probe' drivers/char/tpm/tpm_ftpm_tee.c:218: warning: Excess function parameter 'pdev' description in 'ftpm_tee_probe' drivers/char/tpm/tpm_ftpm_tee.c:314: warning: Function parameter or member 'dev' not described in 'ftpm_tee_remove' drivers/char/tpm/tpm_ftpm_tee.c:314: warning: Excess function parameter 'pdev' description in 'ftpm_tee_remove' drivers/char/tpm/tpm_ftpm_tee.c:349: warning: expecting prototype for ftpm_tee_shutdown(). Prototype was for ftpm_plat_tee_shutdown() instead

Cc Peter Huewe <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Thirupathaiah Annapureddy <[email protected]>
---
 drivers/char/tpm/tpm_ftpm_tee.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_ftpm_tee.c +3 -3
index 2ccdf8ac69948..2d9c0ecd43f0a 100644
@@ -209,7 +209,7 @@ static int ftpm_tee_match(struct tee_ioctl_version_data *ver, const void *data)
 
 /**
  * ftpm_tee_probe() - initialize the fTPM
- * @pdev: the platform_device description.
+ * @dev: the platform_device description.
  *
  * Return:
  *	On success, 0. On failure, -errno.
@@ -305,7 +305,7 @@ static int ftpm_plat_tee_probe(struct platform_device *pdev)
 
 /**
  * ftpm_tee_remove() - remove the TPM device
- * @pdev: the platform_device description.
+ * @dev: the platform_device description.
  *
  * Return:
  *	0 always.
@@ -342,7 +342,7 @@ static int ftpm_plat_tee_remove(struct platform_device *pdev)
 }
 
 /**
- * ftpm_tee_shutdown() - shutdown the TPM device
+ * ftpm_plat_tee_shutdown() - shutdown the TPM device
  * @pdev: the platform_device description.
  */
 static void ftpm_plat_tee_shutdown(struct platform_device *pdev)
Signature · 1 line
2.31.1
maintainer Reviewed-by on v1 8/16
#13 lore raw

Re: [PATCH 08/16] char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours

Quoted 8 lines · Lee Jones

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

drivers/char/tpm/tpm_ftpm_tee.c:218: warning: Function parameter or member 'dev' not described in 'ftpm_tee_probe' drivers/char/tpm/tpm_ftpm_tee.c:218: warning: Excess function parameter 'pdev' description in 'ftpm_tee_probe' drivers/char/tpm/tpm_ftpm_tee.c:314: warning: Function parameter or member 'dev' not described in 'ftpm_tee_remove' drivers/char/tpm/tpm_ftpm_tee.c:314: warning: Excess function parameter 'pdev' description in 'ftpm_tee_remove' drivers/char/tpm/tpm_ftpm_tee.c:349: warning: expecting prototype for ftpm_tee_shutdown(). Prototype was for ftpm_plat_tee_shutdown() instead

Quoted 6 lines
Cc Peter Huewe <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Thirupathaiah Annapureddy <[email protected]>

/Jarkko

Quoted 39 lines
---
 drivers/char/tpm/tpm_ftpm_tee.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_ftpm_tee.c +3 -3
index 2ccdf8ac69948..2d9c0ecd43f0a 100644
@@ -209,7 +209,7 @@ static int ftpm_tee_match(struct tee_ioctl_version_data *ver, const void *data)
 
 /**
  * ftpm_tee_probe() - initialize the fTPM
- * @pdev: the platform_device description.
+ * @dev: the platform_device description.
  *
  * Return:
  *	On success, 0. On failure, -errno.
@@ -305,7 +305,7 @@ static int ftpm_plat_tee_probe(struct platform_device *pdev)
 
 /**
  * ftpm_tee_remove() - remove the TPM device
- * @pdev: the platform_device description.
+ * @dev: the platform_device description.
  *
  * Return:
  *	0 always.
@@ -342,7 +342,7 @@ static int ftpm_plat_tee_remove(struct platform_device *pdev)
 }
 
 /**
- * ftpm_tee_shutdown() - shutdown the TPM device
+ * ftpm_plat_tee_shutdown() - shutdown the TPM device
  * @pdev: the platform_device description.
  */
 static void ftpm_plat_tee_shutdown(struct platform_device *pdev)
Signature · 1 line
2.31.1
author
#14 lore raw

PATCH 9/16 char: agp: backend: Demote some non-conformant kernel-doc headers

In reply to Lee Jones

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

drivers/char/agp/backend.c:68: warning: Function parameter or member 'pdev' not described in 'agp_backend_acquire' drivers/char/agp/backend.c:93: warning: Function parameter or member 'bridge' not described in 'agp_backend_release'

Cc David Airlie <[email protected]>
---
 drivers/char/agp/backend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/agp/backend.c +2 -2
index 004a3ce8ba72d..c901c719fba89 100644
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(agp_bridge);
 EXPORT_SYMBOL(agp_bridges);
 EXPORT_SYMBOL(agp_find_bridge);
 
-/**
+/*
  *	agp_backend_acquire  -  attempt to acquire an agp backend.
  *
  */
@@ -81,7 +81,7 @@ struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev)
 EXPORT_SYMBOL(agp_backend_acquire);
 
 
-/**
+/*
  *	agp_backend_release  -  release the lock on the agp backend.
  *
  *	The caller must insure that the graphics aperture translation table
Signature · 1 line
2.31.1
author
#15 lore raw

Re: [PATCH 09/16] char: agp: backend: Demote some non-conformant kernel-doc headers

Quoted 6 lines · Lee Jones

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

drivers/char/agp/backend.c:68: warning: Function parameter or member 'pdev' not described in 'agp_backend_acquire' drivers/char/agp/backend.c:93: warning: Function parameter or member 'bridge' not described in 'agp_backend_release'

Cc David Airlie <[email protected]>

David, are you planning on taking these 'agp' patches please?

Quoted 27 lines
---
 drivers/char/agp/backend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/agp/backend.c +2 -2
index 004a3ce8ba72d..c901c719fba89 100644
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(agp_bridge);
 EXPORT_SYMBOL(agp_bridges);
 EXPORT_SYMBOL(agp_find_bridge);
 
-/**
+/*
  *	agp_backend_acquire  -  attempt to acquire an agp backend.
  *
  */
@@ -81,7 +81,7 @@ struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev)
 EXPORT_SYMBOL(agp_backend_acquire);
 
 
-/**
+/*
  *	agp_backend_release  -  release the lock on the agp backend.
  *
  *	The caller must insure that the graphics aperture translation table
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#16 lore raw

PATCH 10/16 char: agp: frontend: Include header file containing our prototypes

In reply to Lee Jones

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

drivers/char/agp/frontend.c:46:20: warning: no previous prototype for ‘agp_find_mem_by_key’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:161:5: warning: no previous prototype for ‘agp_create_segment’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:213:26: warning: no previous prototype for ‘agp_find_private’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:268:6: warning: no previous prototype for ‘agp_free_memory_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:274:20: warning: no previous prototype for ‘agp_allocate_memory_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:486:20: warning: no previous prototype for ‘agp_find_client_by_pid’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:511:20: warning: no previous prototype for ‘agp_create_client’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:524:5: warning: no previous prototype for ‘agp_remove_client’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:735:5: warning: no previous prototype for ‘agpioc_acquire_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:778:5: warning: no previous prototype for ‘agpioc_release_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:785:5: warning: no previous prototype for ‘agpioc_setup_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:865:5: warning: no previous prototype for ‘agpioc_protect_wrap’ [-Wmissing-prototypes] drivers/char/agp/frontend.c:899:5: warning: no previous prototype for ‘agpioc_deallocate_wrap’ [-Wmissing-prototypes]

Cc David Airlie <[email protected]>
---
 drivers/char/agp/frontend.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/agp/frontend.c +1 -0
index 00ff5fcb808a7..10186f5881cb9 100644
@@ -40,6 +40,7 @@
 #include <linux/sched.h>
 #include <linux/uaccess.h>
 #include "agp.h"
+#include "compat_ioctl.h"
 
 struct agp_front_data agp_fe;
 
Signature · 1 line
2.31.1
author
#17 lore raw

PATCH 11/16 char: agp: via-agp: Remove unused variable 'current_size'

In reply to Lee Jones

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

drivers/char/agp/via-agp.c: In function ‘via_configure_agp3’:
drivers/char/agp/via-agp.c:131:28: warning: variable ‘current_size’ set but not used [-Wunused-but-set-variable]

Cc David Airlie <[email protected]>
---
 drivers/char/agp/via-agp.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/char/agp/via-agp.c +0 -3
index 87a92a044570e..dc594f4eca38a 100644
@@ -128,9 +128,6 @@ static int via_fetch_size_agp3(void)
 static int via_configure_agp3(void)
 {
 	u32 temp;
-	struct aper_size_info_16 *current_size;
-
-	current_size = A_SIZE_16(agp_bridge->current_size);
 
 	/* address to map to */
 	agp_bridge->gart_bus_addr = pci_bus_address(agp_bridge->dev,
Signature · 1 line
2.31.1
author
#18 lore raw

PATCH 12/16 char: hpet: Remove unused variable 'm'

In reply to Lee Jones

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

drivers/char/hpet.c: In function ‘hpet_interrupt’:
drivers/char/hpet.c:159:17: warning: variable ‘m’ set but not used [-Wunused-but-set-variable]

Cc Clemens Ladisch <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Bob Picco <[email protected]>
---
 drivers/char/hpet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/hpet.c +2 -2
index 8b55085650ad0..4e5431f01450b 100644
@@ -156,12 +156,12 @@ static irqreturn_t hpet_interrupt(int irq, void *data)
 	 * This has the effect of treating non-periodic like periodic.
 	 */
 	if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {
-		unsigned long m, t, mc, base, k;
+		unsigned long t, mc, base, k;
 		struct hpet __iomem *hpet = devp->hd_hpet;
 		struct hpets *hpetp = devp->hd_hpets;
 
 		t = devp->hd_ireqfreq;
-		m = read_counter(&devp->hd_timer->hpet_compare);
+		read_counter(&devp->hd_timer->hpet_compare);
 		mc = read_counter(&hpet->hpet_mc);
 		/* The time for the next interrupt would logically be t + m,
 		 * however, if we are very unlucky and the interrupt is delayed
Signature · 1 line
2.31.1
author
#19 lore raw

PATCH 13/16 char: agp: generic: Place braces around optimised out function in if()

In reply to Lee Jones

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

drivers/char/agp/generic.c: In function ‘agp_generic_destroy_page’:
drivers/char/agp/generic.c:1265:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Cc David Airlie <[email protected]>
---
 drivers/char/agp/generic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/char/agp/generic.c +2 -1
index 3ffbb1c80c5c7..37a07676da6ff 100644
@@ -1261,8 +1261,9 @@ void agp_generic_destroy_page(struct page *page, int flags)
 	if (page == NULL)
 		return;
 
-	if (flags & AGP_PAGE_DESTROY_UNMAP)
+	if (flags & AGP_PAGE_DESTROY_UNMAP) {
 		unmap_page_from_agp(page);
+	}
 
 	if (flags & AGP_PAGE_DESTROY_FREE) {
 		put_page(page);
Signature · 1 line
2.31.1
author
#20 lore raw

PATCH 14/16 char: agp: uninorth-agp: Remove unused variable 'size'

In reply to Lee Jones

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

drivers/char/agp/uninorth-agp.c: In function ‘uninorth_create_gatt_table’:
drivers/char/agp/uninorth-agp.c:372:6: warning: variable ‘size’ set but not used [-Wunused-but-set-variable]

Cc David Airlie <[email protected]>
Cc Jerome Glisse <[email protected]>
---
 drivers/char/agp/uninorth-agp.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/char/agp/uninorth-agp.c +0 -3
index 62de7f4ba8643..ee67d587cad1e 100644
@@ -369,7 +369,6 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
 {
 	char *table;
 	char *table_end;
-	int size;
 	int page_order;
 	int num_entries;
 	int i;
@@ -383,10 +382,8 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
 	table = NULL;
 	i = bridge->aperture_size_idx;
 	temp = bridge->current_size;
-	size = page_order = num_entries = 0;
 
 	do {
-		size = A_SIZE_32(temp)->size;
 		page_order = A_SIZE_32(temp)->page_order;
 		num_entries = A_SIZE_32(temp)->num_entries;
 
Signature · 1 line
2.31.1
author
#21 lore raw

PATCH 15/16 char: hw_random: pseries-rng: Demote non-conformant kernel-doc header

In reply to Lee Jones

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

drivers/char/hw_random/pseries-rng.c:42: warning: Function parameter or member 'vdev' not described in 'pseries_rng_get_desired_dma'

Cc Matt Mackall <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Lijun Pan <[email protected]>
Cc "Uwe Kleine-König" <[email protected]>
Cc Tyrel Datwyler <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Michael Neuling <[email protected]>
---
 drivers/char/hw_random/pseries-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/pseries-rng.c +1 -1
index f4949b689bd5a..62bdd5af1339f 100644
@@ -29,7 +29,7 @@ static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait
 	return 8;
 }
 
-/**
+/*
  * pseries_rng_get_desired_dma - Return desired DMA allocate for CMO operations
  *
  * This is a required function for a driver to operate in a CMO environment
Signature · 1 line
2.31.1
author
#22 lore raw

PATCH 16/16 char: mem: Provide local prototype for non-static function

In reply to Lee Jones

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

drivers/char/mem.c:95:29: warning: no previous prototype for ‘unxlate_dev_mem_ptr’ [-Wmissing-prototypes] drivers/char/mem.c:96:13: note: in expansion of macro ‘unxlate_dev_mem_ptr’

Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "C. Scott Ananian" <[email protected]>
Cc Kanoj Sarcar <[email protected]>
---
 drivers/char/mem.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/mem.c +2 -0
index 95741f93a6cd0..7969ac85491df 100644
@@ -40,6 +40,8 @@
 #define DEVMEM_MINOR	1
 #define DEVPORT_MINOR	4
 
+void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
+
 static inline unsigned long size_inside_page(unsigned long start,
 					     unsigned long size)
 {
Signature · 1 line
2.31.1
maintainer
#23 lore raw

Re: [PATCH 16/16] char: mem: Provide local prototype for non-static function

Quoted 20 lines · Lee Jones

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

drivers/char/mem.c:95:29: warning: no previous prototype for ‘unxlate_dev_mem_ptr’ [-Wmissing-prototypes] drivers/char/mem.c:96:13: note: in expansion of macro ‘unxlate_dev_mem_ptr’

Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc "C. Scott Ananian" <[email protected]>
Cc Kanoj Sarcar <[email protected]>
---
 drivers/char/mem.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/char/mem.c +0 -0
index 95741f93a6cd0..7969ac85491df 100644

drivers/char/mem.c line 44

Quoted 5 lines
drivers/char/mem.c +2 -0
@@ -40,6 +40,8 @@
 #define DEVMEM_MINOR   1
 #define DEVPORT_MINOR  4
 
+void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
+

This one doesn't look quite right to me, won't it break on architectures that use the static inline unxlate_dev_mem_ptr() definition from asm-generic?

I think the correct way would be to remove the __weak annotation as well as the inline definition, and replace the local definition with a static inline version.

Arnd

maintainer Reviewed-by on the v1 series
#24 lore raw
In reply to Lee Jones
Quoted 13 lines · Lee Jones

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'
Quoted 10 lines

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

Thanks a lot!

I've looked all the patches now and commented on patches 6 and 16. With my comments addressed

Arnd

author
#25 lore raw
Quoted 25 lines · Arnd Bergmann
Quoted 13 lines · Lee Jones

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'
Quoted 10 lines

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

Quoted 6 lines

Thanks a lot!

I've looked all the patches now and commented on patches 6 and 16. With my comments addressed

Thanks Arnd.

Would it be possible for the remaining 14 patches to be taken in please? I will work on the 2 Arnd commented on in due course and resubmit them independently.

TIA.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#26 lore raw
Quoted 32 lines · Lee Jones
Quoted 30 lines · Arnd Bergmann
Quoted 13 lines · Lee Jones

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'
Quoted 10 lines

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

Thanks a lot!

I've looked all the patches now and commented on patches 6 and 16. With my comments addressed

Quoted 7 lines
Quoted 1 line

Thanks Arnd.

Would it be possible for the remaining 14 patches to be taken in please? I will work on the 2 Arnd commented on in due course and resubmit them independently.

Yes, I can queue them up, thanks.

greg k-h

#27 lore raw
Quoted 35 lines · Greg Kroah-Hartman
Quoted 34 lines · Lee Jones
Quoted 31 lines · Arnd Bergmann
Quoted 13 lines · Lee Jones

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'
Quoted 10 lines

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

Thanks a lot!

I've looked all the patches now and commented on patches 6 and 16. With my comments addressed

Quoted 7 lines
Quoted 5 lines

Thanks Arnd.

Would it be possible for the remaining 14 patches to be taken in please? I will work on the 2 Arnd commented on in due course and resubmit them independently.

Yes, I can queue them up, thanks.

Wait, I can take the ones for code that I maintain, not for others. drivers/char/ is "fun" in that some subdirs have active trees/maintainers that are not me and Arnd so they go to Linus through other ways. I'll queue up the ones that I am "allowed" to and you will get the emails from that.

thanks,

greg k-h

author
#28 lore raw
Quoted 42 lines · Greg Kroah-Hartman
Quoted 41 lines · Greg Kroah-Hartman
Quoted 39 lines · Lee Jones
Quoted 25 lines · Arnd Bergmann
Quoted 13 lines · Lee Jones

This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.

Lee Jones (16):
char: pcmcia: cm4000_cs: Remove unused variable 'tmp'
char: pcmcia: cm4040_cs: Remove unused variable 'uc'
char: random: Include header containing our prototypes
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: pcmcia: synclink_cs: Fix a bunch of kernel-doc issues
char: applicom: Remove 3 unused variables 'ret' and 2 instances of

    'byte_reset_it'
Quoted 10 lines

char: tpm: tpm1-cmd: Fix a couple of misnamed functions
char: tpm: tpm_ftpm_tee: Fix a couple of kernel-doc misdemeanours
char: agp: backend: Demote some non-conformant kernel-doc headers
char: agp: frontend: Include header file containing our prototypes
char: agp: via-agp: Remove unused variable 'current_size'
char: hpet: Remove unused variable 'm'
char: agp: generic: Place braces around optimised out function in if()
char: agp: uninorth-agp: Remove unused variable 'size'
char: hw_random: pseries-rng: Demote non-conformant kernel-doc header
char: mem: Provide local prototype for non-static function

Quoted 6 lines

Thanks a lot!

I've looked all the patches now and commented on patches 6 and 16. With my comments addressed

Thanks Arnd.

Would it be possible for the remaining 14 patches to be taken in please? I will work on the 2 Arnd commented on in due course and resubmit them independently.

Quoted 7 lines
Quoted 1 line

Yes, I can queue them up, thanks.

Wait, I can take the ones for code that I maintain, not for others. drivers/char/ is "fun" in that some subdirs have active trees/maintainers that are not me and Arnd so they go to Linus through other ways. I'll queue up the ones that I am "allowed" to and you will get the emails from that.

Understood, thanks.

Hopefully the other maintainers will be as on the ball as you are.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog