Re: [patch] 2.6.9-mm1: dvb-dibusb.c: remove unused code

From: Patrick Boettcher
Date: Sat Oct 23 2004 - 05:58:14 EST


On Sat, 23 Oct 2004, Adrian Bunk wrote:

> It seems the following warnings come from Linus' tree:
>
> <-- snip -->
>
> ...
> CC drivers/media/dvb/dibusb/dvb-dibusb.o
> drivers/media/dvb/dibusb/dvb-dibusb.c:308: warning: 'dibusb_interrupt_read_loop' defined but not used
> drivers/media/dvb/dibusb/dvb-dibusb.c:318: warning: 'dibusb_read_remote_control' defined but not used
> drivers/media/dvb/dibusb/dvb-dibusb.c:345: warning: 'dibusb_hw_sleep' defined but not used
> drivers/media/dvb/dibusb/dvb-dibusb.c:351: warning: 'dibusb_hw_wakeup' defined but not used
> ...
>
> <-- snip -->

Hi,

Sorry for the trouble. I'd prefer to comment out the code instead of
throwing it away, because it will be used in future version.
The attached patch is doing this.

It should apply cleanly to 2.6.9-mm1 as well.

Thanks,
Patrick.

--
Mail: patrick.boettcher@xxxxxxx
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/--- dvb-dibusb.c.orig 2004-10-23 12:39:20.000000000 +0200
+++ dvb-dibusb.c 2004-10-23 12:40:09.000000000 +0200
@@ -132,11 +132,6 @@
return ret;
}

-static int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len)
-{
- return dibusb_readwrite_usb(dib,buf,len,NULL,0);
-}
-
static int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr,
u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
{
@@ -297,9 +292,20 @@
}

/*
- * Firmware transfers
+ * cypress transfers
+ */
+
+#if 0
+
+/*
+ * This code is currently unused, but will be in used in future versions.
*/

+static int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len)
+{
+ return dibusb_readwrite_usb(dib,buf,len,NULL,0);
+}
+
/*
* do not use this, just a workaround for a bug,
* which will never occur :).
@@ -353,6 +359,8 @@
return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1);
}

+#endif
+
/*
* I2C
*/