Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2010 12:19:08 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209102 - head/sys/compat/ndis
Message-ID:  <201006121219.o5CCJ8pe096481@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sat Jun 12 12:19:08 2010
New Revision: 209102
URL: http://svn.freebsd.org/changeset/base/209102

Log:
  ANSIfy prototypes in subr_usbd.c.
  
  Clang generates the following warnings when building subr_usbd.c:
  
  | subr_usbd.c:598:13: warning: promoted type 'int' of K&R function
  |   parameter is not compatible with the parameter type 'uint8_t' (aka
  |   'unsigned char') declared in a previous prototype
  | subr_usbd.c:627:13: warning: promoted type 'int' of K&R function
  |   parameter is not compatible with the parameter type 'uint8_t' (aka
  |   'unsigned char') declared in a previous prototype
  | subr_usbd.c:649:13: warning: promoted type 'int' of K&R function
  |   parameter is not compatible with the parameter type 'uint8_t' (aka
  |   'unsigned char') declared in a previous prototype
  
  Instead of just ANSIfying these three prototypes, do it for the entire
  file.
  
  Spotted by:	clang

Modified:
  head/sys/compat/ndis/subr_usbd.c

Modified: head/sys/compat/ndis/subr_usbd.c
==============================================================================
--- head/sys/compat/ndis/subr_usbd.c	Sat Jun 12 11:28:46 2010	(r209101)
+++ head/sys/compat/ndis/subr_usbd.c	Sat Jun 12 12:19:08 2010	(r209102)
@@ -234,9 +234,7 @@ usbd_libfini(void)
 }
 
 static int32_t
-usbd_iodispatch(dobj, ip)
-	device_object		*dobj;
-	irp			*ip;
+usbd_iodispatch(device_object *dobj, irp *ip)
 {
 	device_t dev = dobj->do_devext;
 	int32_t status;
@@ -266,9 +264,7 @@ usbd_iodispatch(dobj, ip)
 }
 
 static int32_t
-usbd_ioinvalid(dobj, ip)
-	device_object		*dobj;
-	irp			*ip;
+usbd_ioinvalid(device_object *dobj, irp *ip)
 {
 	device_t dev = dobj->do_devext;
 	struct io_stack_location *irp_sl;
@@ -286,9 +282,7 @@ usbd_ioinvalid(dobj, ip)
 }
 
 static int32_t
-usbd_pnp(dobj, ip)
-	device_object		*dobj;
-	irp			*ip;
+usbd_pnp(device_object *dobj, irp *ip)
 {
 	device_t dev = dobj->do_devext;
 	struct io_stack_location *irp_sl;
@@ -306,9 +300,7 @@ usbd_pnp(dobj, ip)
 }
 
 static int32_t
-usbd_power(dobj, ip)
-	device_object		*dobj;
-	irp			*ip;
+usbd_power(device_object *dobj, irp *ip)
 {
 	device_t dev = dobj->do_devext;
 	struct io_stack_location *irp_sl;
@@ -327,8 +319,7 @@ usbd_power(dobj, ip)
 
 /* Convert USBD_STATUS to NTSTATUS  */
 static int32_t
-usbd_urb2nt(status)
-	int32_t			status;
+usbd_urb2nt(int32_t status)
 {
 
 	switch (status) {
@@ -387,8 +378,7 @@ usbd_usb2urb(int status)
 }
 
 static union usbd_urb *
-usbd_geturb(ip)
-	irp			*ip;
+usbd_geturb(irp *ip)
 {
 	struct io_stack_location *irp_sl;
 
@@ -398,8 +388,7 @@ usbd_geturb(ip)
 }
 
 static int32_t
-usbd_submit_urb(ip)
-	irp			*ip;
+usbd_submit_urb(irp *ip)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	int32_t status;
@@ -452,8 +441,7 @@ usbd_submit_urb(ip)
 }
 
 static int32_t
-usbd_func_getdesc(ip)
-	irp			*ip;
+usbd_func_getdesc(irp *ip)
 {
 #define	NDISUSB_GETDESC_MAXRETRIES		3
 	device_t dev = IRP_NDIS_DEV(ip);
@@ -513,8 +501,7 @@ exit:
 }
 
 static int32_t
-usbd_func_selconf(ip)
-	irp			*ip;
+usbd_func_selconf(irp *ip)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	int i, j;
@@ -593,11 +580,8 @@ usbd_func_selconf(ip)
 }
 
 static usb_error_t
-usbd_setup_endpoint_one(ip, ifidx, ne, epconf)
-	irp				*ip;
-	uint8_t				ifidx;
-	struct ndisusb_ep		*ne;
-	struct usb_config		*epconf;
+usbd_setup_endpoint_one(irp *ip, uint8_t ifidx, struct ndisusb_ep *ne,
+    struct usb_config *epconf)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -622,9 +606,7 @@ usbd_setup_endpoint_one(ip, ifidx, ne, e
 }
 
 static usb_error_t
-usbd_setup_endpoint_default(ip, ifidx)
-	irp				*ip;
-	uint8_t				ifidx;
+usbd_setup_endpoint_default(irp *ip, uint8_t ifidx)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -644,10 +626,8 @@ usbd_setup_endpoint_default(ip, ifidx)
 }
 
 static usb_error_t
-usbd_setup_endpoint(ip, ifidx, ep)
-	irp				*ip;
-	uint8_t				ifidx;
-	struct usb_endpoint_descriptor	*ep;
+usbd_setup_endpoint(irp *ip, uint8_t ifidx,
+    struct usb_endpoint_descriptor *ep)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -702,8 +682,7 @@ usbd_setup_endpoint(ip, ifidx, ep)
 }
 
 static int32_t
-usbd_func_abort_pipe(ip)
-	irp			*ip;
+usbd_func_abort_pipe(irp *ip)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -726,8 +705,7 @@ usbd_func_abort_pipe(ip)
 }
 
 static int32_t
-usbd_func_vendorclass(ip)
-	irp			*ip;
+usbd_func_vendorclass(irp *ip)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	int32_t error;
@@ -781,9 +759,7 @@ usbd_func_vendorclass(ip)
 }
 
 static void
-usbd_irpcancel(dobj, ip)
-	device_object		*dobj;
-	irp			*ip;
+usbd_irpcancel(device_object *dobj, irp *ip)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -1102,9 +1078,7 @@ next:
 }
 
 static struct ndisusb_ep *
-usbd_get_ndisep(ip, ep)
-	irp			*ip;
-	usb_endpoint_descriptor_t *ep;
+usbd_get_ndisep(irp *ip, usb_endpoint_descriptor_t *ep)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -1119,9 +1093,7 @@ usbd_get_ndisep(ip, ep)
 }
 
 static void
-usbd_xfertask(dobj, arg)
-	device_object		*dobj;
-	void			*arg;
+usbd_xfertask(device_object *dobj, void *arg)
 {
 	int error;
 	irp *ip;
@@ -1201,9 +1173,7 @@ usbd_xfertask(dobj, arg)
  * we don't want to be in the scope of HAL lock.
  */
 static int32_t
-usbd_taskadd(ip, type)
-	irp			*ip;
-	unsigned		 type;
+usbd_taskadd(irp *ip, unsigned type)
 {
 	device_t dev = IRP_NDIS_DEV(ip);
 	struct ndis_softc *sc = device_get_softc(dev);
@@ -1226,9 +1196,7 @@ usbd_taskadd(ip, type)
 }
 
 static void
-usbd_task(dobj, arg)
-	device_object		*dobj;
-	void			*arg;
+usbd_task(device_object *dobj, void *arg)
 {
 	irp *ip;
 	list_entry *l;
@@ -1289,8 +1257,7 @@ exit:
 }
 
 static int32_t
-usbd_func_bulkintr(ip)
-	irp			*ip;
+usbd_func_bulkintr(irp *ip)
 {
 	int32_t error;
 	struct ndisusb_ep *ne;
@@ -1336,9 +1303,7 @@ usbd_func_bulkintr(ip)
 }
 
 static union usbd_urb *
-USBD_CreateConfigurationRequest(conf, len)
-	usb_config_descriptor_t *conf;
-	uint16_t *len;
+USBD_CreateConfigurationRequest(usb_config_descriptor_t *conf, uint16_t *len)
 {
 	struct usbd_interface_list_entry list[2];
 	union usbd_urb *urb;
@@ -1355,9 +1320,8 @@ USBD_CreateConfigurationRequest(conf, le
 }
 
 static union usbd_urb *
-USBD_CreateConfigurationRequestEx(conf, list)
-	usb_config_descriptor_t *conf;
-	struct usbd_interface_list_entry *list;
+USBD_CreateConfigurationRequestEx(usb_config_descriptor_t *conf,
+    struct usbd_interface_list_entry *list)
 {
 	int i, j, size;
 	struct usbd_interface_information *intf;
@@ -1413,8 +1377,7 @@ USBD_CreateConfigurationRequestEx(conf, 
 }
 
 static void
-USBD_GetUSBDIVersion(ui)
-	usbd_version_info	*ui;
+USBD_GetUSBDIVersion(usbd_version_info *ui)
 {
 
 	/* Pretend to be Windows XP. */
@@ -1433,15 +1396,9 @@ USBD_ParseConfigurationDescriptor(usb_co
 }
 
 static usb_interface_descriptor_t *
-USBD_ParseConfigurationDescriptorEx(conf, start, intfnum,
-    altset, intfclass, intfsubclass, intfproto)
-	usb_config_descriptor_t *conf;
-	void *start;
-	int32_t intfnum;
-	int32_t altset;
-	int32_t intfclass;
-	int32_t intfsubclass;
-	int32_t intfproto;
+USBD_ParseConfigurationDescriptorEx(usb_config_descriptor_t *conf,
+    void *start, int32_t intfnum, int32_t altset, int32_t intfclass,
+    int32_t intfsubclass, int32_t intfproto)
 {
 	struct usb_descriptor *next = NULL;
 	usb_interface_descriptor_t *desc;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006121219.o5CCJ8pe096481>