Skip to contentSkip to conversation

watchdog: pcwd_usb: fix compilation warning

watchdog-next Tomas Winkler 2 participants 2 messages Jan 19, 2016 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

In function ‘usb_pcwd_probe’:
drivers/watchdog/pcwd_usb.c:611:12: warning: variable ‘maxp’ set but not used [-Wunused-but-set-variable]
int pipe, maxp;

---
 drivers/watchdog/pcwd_usb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/pcwd_usb.c +1 -2
index 1a11aedc4fe8..68952d9ccf83 100644
@@ -608,7 +608,7 @@ static int usb_pcwd_probe(struct usb_interface *interface,
 	struct usb_host_interface *iface_desc;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_pcwd_private *usb_pcwd = NULL;
-	int pipe, maxp;
+	int pipe;
 	int retval = -ENOMEM;
 	int got_fw_rev;
 	unsigned char fw_rev_major, fw_rev_minor;
@@ -641,7 +641,6 @@ static int usb_pcwd_probe(struct usb_interface *interface,
 
 	/* get a handle to the interrupt data pipe */
 	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
 
 	/* allocate memory for our device and initialize it */
 	usb_pcwd = kzalloc(sizeof(struct usb_pcwd_private), GFP_KERNEL);
Signature · 1 line
2.4.3
maintainer Reviewed-by
#1 lore raw
Quoted 6 lines · Tomas Winkler

In function ‘usb_pcwd_probe’:
drivers/watchdog/pcwd_usb.c:611:12: warning: variable ‘maxp’ set but not used [-Wunused-but-set-variable]
int pipe, maxp;

Quoted 26 lines
---
  drivers/watchdog/pcwd_usb.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/pcwd_usb.c +1 -2
index 1a11aedc4fe8..68952d9ccf83 100644
@@ -608,7 +608,7 @@ static int usb_pcwd_probe(struct usb_interface *interface,
  	struct usb_host_interface *iface_desc;
  	struct usb_endpoint_descriptor *endpoint;
  	struct usb_pcwd_private *usb_pcwd = NULL;
-	int pipe, maxp;
+	int pipe;
  	int retval = -ENOMEM;
  	int got_fw_rev;
  	unsigned char fw_rev_major, fw_rev_minor;
@@ -641,7 +641,6 @@ static int usb_pcwd_probe(struct usb_interface *interface,
 
  	/* get a handle to the interrupt data pipe */
  	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
 
  	/* allocate memory for our device and initialize it */
  	usb_pcwd = kzalloc(sizeof(struct usb_pcwd_private), GFP_KERNEL);