Commit Graph

13 Commits (1e142b29e210b5dfb2deeb6ce2210b60af16d2a6)

Author SHA1 Message Date
Peter Huewe dc7f5b3594 staging/ozwpan: Mark read only parameters and structs as const
This patch marks function parameters that are used read only
as well as readonly structs (and corresponding pointers) as const.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 15:14:30 -08:00
Peter Huewe a7f74c3005 staging/ozwpan: Mark local functions as static (fix sparse warnings)
sparse complains about the following functions

ozhcd.c:330:20: warning: symbol 'oz_uncancel_urb' was not declared.  Should it be static?
ozhcd.c:420:6: warning: symbol 'oz_complete_buffered_urb' was not declared. Should it be static?
ozmain.c:25:6: warning: symbol 'g_net_dev' was not declared. Should it be static?
ozevent.c:95:5: warning: symbol 'oz_events_open' was not declared.  Should it be static?
ozevent.c:110:5: warning: symbol 'oz_events_release' was not declared.  Should it be static?
ozevent.c:121:9: warning: symbol 'oz_events_read' was not declared.  Should it be static?
ozevent.c:160:30: warning: symbol 'oz_events_fops' was not declared.  Should it be static?
ozcdev.c:47:14: warning: symbol 'g_oz_class' was not declared. Should it be static?
ozcdev.c:74:5: warning: symbol 'oz_cdev_open' was not declared. Should it be static?
ozcdev.c:86:5: warning: symbol 'oz_cdev_release' was not declared.  Should it be static?
ozcdev.c:94:9: warning: symbol 'oz_cdev_read' was not declared. Should it be static?
ozcdev.c:146:9: warning: symbol 'oz_cdev_write' was not declared. Should it be static?
ozcdev.c:236:6: warning: symbol 'oz_cdev_ioctl' was not declared. Should it be static?
ozcdev.c:300:14: warning: symbol 'oz_cdev_poll' was not declared. Should it be static?
ozcdev.c:321:30: warning: symbol 'oz_fops' was not declared. Should it be static?
ozproto.c:958:6: warning: context imbalance in 'oz_polling_lock_bh' - wrong count at exit
ozproto.c:964:6: warning: context imbalance in 'oz_polling_unlock_bh' - unexpected unlock
ozusbsvc1.c:308:6: warning: symbol 'oz_usb_handle_ep_data' was not declared. Should it be static?
ozpd.c:410:6: warning: symbol 'oz_set_more_bit' was not declared. Should it be static?
ozpd.c:418:6: warning: symbol 'oz_set_last_pkt_nb' was not declared.  Should it be static?

-> add static keyword to silence the warning and make sparse happy.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 15:14:30 -08:00
Peter Huewe 86b02be043 staging/ozwpan: Fix NULL vs zero in ozpd.c (sparse warning)
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

If the initialization with NULL was unnecessary (due to unconditional
assignment before first use) it was removed.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15 10:23:49 -08:00
Sachin Kamat b150718ecb staging: ozwpan: Remove redundant null check before kfree in ozpd.c
kfree on NULL pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:50:12 -08:00
Wei Yongjun 0c925aa043 staging: ozwpan: remove pointless conditional before kfree_skb()
Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:12:13 -07:00
Rupesh Gujare 86d03a0f4f staging: ozwpan: isoc latency for audio burst
Set audio latency. This fixes issue where audio clips heard during
link outage.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:17:17 -07:00
Rupesh Gujare 86c948b441 staging: ozwpan: Set AC_VO priority
Set packet priority to AC_VO for audio data.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 16:05:35 -07:00
Rupesh Gujare 00ec12b827 staging: ozwpan: set last_pkt_nb
In case of trigeered ISOC mode set last_pkt_nb only when
we are ready to send data.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 16:05:35 -07:00
Rupesh Gujare 33e6ada17f staging: ozwpan: ISOC transfer in triggered mode
This patch implements ISOC frame transfer while PD is in
 triggered mode.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 16:05:34 -07:00
Rupesh Gujare 89f21cc050 staging: ozwpan: Fix bug where kfree is called twice.
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-26 12:40:53 -07:00
Greg Kroah-Hartman 1ec41a31fb staging: ozwpan: remove debug allocator
The kernel already has a debug allocator, no need to have one unique to
a single driver.  So delete it, replace with kfree, kmalloc, and, in a
few places that need it, kzalloc().

Cc: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:51:09 -08:00
Dan Carpenter 92a6253299 Staging: ozwpan: prevent bogus dereference
app_id comes from the network and can't be trusted.  If it's zero then
it will lead to a kernel crash.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:32:21 -08:00
Chris Kelly bc3157dde3 staging: ozwpan: Added device state support
Added support for maintaining state and data buffering for devices
connected via the network.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:51 -08:00