Re: [PATCH] USB and Driver Core patches for 2.6.10

From: Greg KH
Date: Sat Jan 08 2005 - 01:41:57 EST


ChangeSet 1.1938.446.37, 2004/12/17 15:41:32-08:00, greg@xxxxxxxxx

[PATCH] USB: fix up some sparse warnings in the new garmin_gps driver

Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/usb/serial/garmin_gps.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)


diff -Nru a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
--- a/drivers/usb/serial/garmin_gps.c 2005-01-07 15:44:39 -08:00
+++ b/drivers/usb/serial/garmin_gps.c 2005-01-07 15:44:39 -08:00
@@ -343,7 +343,7 @@
static struct garmin_packet *pkt_pop(struct garmin_data * garmin_data_p)
{
unsigned long flags;
- struct garmin_packet *result = 0;
+ struct garmin_packet *result = NULL;

spin_lock_irqsave(&garmin_data_p->lock, flags);
if (!list_empty(&garmin_data_p->pktlist)) {
@@ -359,7 +359,7 @@
static void pkt_clear(struct garmin_data * garmin_data_p)
{
unsigned long flags;
- struct garmin_packet *result = 0;
+ struct garmin_packet *result = NULL;

dbg("%s", __FUNCTION__);

@@ -737,10 +737,9 @@
*/
static void gsp_next_packet(struct garmin_data * garmin_data_p)
{
- struct garmin_packet *pkt = 0;
+ struct garmin_packet *pkt = NULL;

- while ((pkt = pkt_pop(garmin_data_p)) != 0)
- {
+ while ((pkt = pkt_pop(garmin_data_p)) != 0) {
dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq);
if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
kfree(pkt);
@@ -1428,7 +1427,7 @@
{
int status = 0;
struct usb_serial_port *port = serial->port[0];
- struct garmin_data * garmin_data_p = 0;
+ struct garmin_data * garmin_data_p = NULL;

dbg("%s", __FUNCTION__);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/