patch usb-garmin_gps-status.patch added to gregkh-2.6 tree

<[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
This is a note to let you know that I've just added the patch titled

     Subject: USB: serial: garmin_gps: clean up urb->status usage

to my gregkh-2.6 tree.  Its filename is

     usb-garmin_gps-status.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From foo@baz Tue Apr  9 12:12:43 2002
Date: Fri, 15 Jun 2007 15:44:13 -0700
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: USB: serial: garmin_gps: clean up urb->status usage

From: Greg Kroah-Hartman <[email protected]>

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <[email protected]>
Cc: Hermann Kneissel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/serial/garmin_gps.c |   47 +++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 22 deletions(-)

--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1036,15 +1036,16 @@ static void garmin_write_bulk_callback (
 	unsigned long flags;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
+	int status = urb->status;
 
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree (urb->transfer_buffer);
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
-	if (urb->status) {
+	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
-			__FUNCTION__, urb->status);
+			__FUNCTION__, status);
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1281,7 +1282,8 @@ static void garmin_read_bulk_callback (s
 	struct usb_serial *serial =  port->serial;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	unsigned char *data = urb->transfer_buffer;
-	int status;
+	int status = urb->status;
+	int retval;
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
@@ -1290,9 +1292,9 @@ static void garmin_read_bulk_callback (s
 		return;
 	}
 
-	if (urb->status) {
+	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
-			__FUNCTION__, urb->status);
+			__FUNCTION__, status);
 		return;
 	}
 
@@ -1306,19 +1308,19 @@ static void garmin_read_bulk_callback (s
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		garmin_data_p->flags &= ~FLAGS_BULK_IN_RESTART;
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
-		status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-		if (status)
+		retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+		if (retval)
 			dev_err(&port->dev,
 				"%s - failed resubmitting read urb, error %d\n",
-			        __FUNCTION__, status);
+				__FUNCTION__, retval);
 	} else if (urb->actual_length > 0) {
 		/* Continue trying to read until nothing more is received  */
 		if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) {
-			status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-			if (status)
+			retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+			if (retval)
 				dev_err(&port->dev,
-					"%s - failed resubmitting read urb, error %d\n",
-			        	__FUNCTION__, status);
+					"%s - failed resubmitting read urb, "
+					"error %d\n", __FUNCTION__, retval);
 		}
 	} else {
 		dbg("%s - end of bulk data", __FUNCTION__);
@@ -1333,13 +1335,14 @@ static void garmin_read_bulk_callback (s
 static void garmin_read_int_callback (struct urb *urb)
 {
 	unsigned long flags;
-	int status;
+	int retval;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial *serial = port->serial;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	unsigned char *data = urb->transfer_buffer;
+	int status = urb->status;
 
-	switch (urb->status) {
+	switch (status) {
 	case 0:
 		/* success */
 		break;
@@ -1348,11 +1351,11 @@ static void garmin_read_int_callback (st
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
-			__FUNCTION__, urb->status);
+			__FUNCTION__, status);
 		return;
 	default:
 		dbg("%s - nonzero urb status received: %d",
-			__FUNCTION__, urb->status);
+			__FUNCTION__, status);
 		return;
 	}
 
@@ -1374,11 +1377,11 @@ static void garmin_read_int_callback (st
 					port->read_urb->transfer_buffer,
 					port->read_urb->transfer_buffer_length,
 					garmin_read_bulk_callback, port);
-			status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-			if (status) {
+			retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+			if (retval) {
 				dev_err(&port->dev,
 					"%s - failed submitting read urb, error %d\n",
-				__FUNCTION__, status);
+				__FUNCTION__, retval);
 			} else {
 				spin_lock_irqsave(&garmin_data_p->lock, flags);
 				garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE;
@@ -1422,11 +1425,11 @@ static void garmin_read_int_callback (st
 	}
 
 	port->interrupt_in_urb->dev = port->serial->dev;
-	status = usb_submit_urb (urb, GFP_ATOMIC);
-	if (status)
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, status);
+			__FUNCTION__, retval);
 }
 
 


Patches currently in gregkh-2.6 which might be from [email protected] are

bad/pci-domain/pci-device-ensure-sysdata-initialised.patch
bad/pci-domain/pci-fix-the-x86-pci-domain-support-fix.patch
bad/relayfs/sysfs-update-relay-file-support-for-generic-relay-api.patch
bad/relayfs/relay-consolidate-relayfs-core-into-kernel-relay.c.patch
bad/relayfs/relay-relay-header-cleanup.patch
bad/relayfs/relayfs-remove-relayfs-in-favour-of-config_relay.patch
bad/relayfs/sysfs-add-__attr_relay-helper-for-relay-attributes.patch
bad/relayfs/sysfs-relay-channel-buffers-as-sysfs-attributes.patch
bad/usbip/usb-usbip-more-dead-code-fix.patch
bad/usbip/usb-usbip-build-fix.patch
bad/usbip/usb-usbip-warning-fixes.patch
bad/ndevfs.patch
bad/battery-class-driver.patch
bad/driver-model-convert-driver-model-to-mutexes.patch
bad/gpl_future-test.patch
bad/gregkh-debugfs_example.patch
bad/speakup-kconfig-fix.patch
bad/speakup-build-fix.patch
bad/pci-use-new-multi-phase-suspend-infrastructure.patch
bad/shot-accross-the-bow.patch
bad/no-more-non-gpl-modules.patch
bad/spi-device.patch
bad/ata_piix-multithread.patch
bad/uio-irq.patch
bad/pci-two-drivers-on-one-pci-device.patch
bad/pci-dynamic-id-cleanup.patch
bad/input-device.patch
driver/nozomi.patch
driver/uio.patch
driver/uio-documentation.patch
driver/driver-core-make-devt_attr-and-uevent_attr-static.patch
driver/sysfs-rules.patch
driver/uio-hilscher-cif-card-driver.patch
driver/sysfs-add-sysfs_dirent-s_name.patch
driver/debugfs-add-rename-for-debugfs-files.patch
driver/sysfs-consolidate-sysfs_dirent-creation-functions.patch
driver/sysfs-add-sysfs_dirent-s_parent.patch
driver/sysfs-allocate-inode-number-using-ida.patch
driver/sysfs-kill-attribute-file-orphaning.patch
driver/sysfs-fix-error-handling-in-binattr-write.patch
driver/sysfs-flatten-and-fix-sysfs_rename_dir-error-handling.patch
driver/sysfs-flatten-cleanup-paths-in-sysfs_add_link-and-create_dir.patch
driver/sysfs-implement-bin_buffer.patch
driver/sysfs-implement-kobj_sysfs_assoc_lock.patch
driver/sysfs-implement-sysfs_dirent-active-reference-and-immediate-disconnect.patch
driver/sysfs-kill-unnecessary-attribute-owner.patch
driver/sysfs-make-sysfs_dirent-s_element-a-union.patch
driver/howto-translated-into-japanese.patch
driver/sysfs-make-sysfs_put-ignore-null-sd.patch
driver/sysfs-move-release_sysfs_dirent-to-dir.c.patch
driver/sysfs-reimplement-symlink-using-sysfs_dirent-tree.patch
driver/sysfs-reimplement-sysfs_drop_dentry.patch
driver/sysfs-separate-out-sysfs_attach_dentry.patch
driver/ida-implement-idr-based-id-allocator.patch
driver/idr-fix-obscure-bug-in-allocation-path.patch
driver/idr-separate-out-idr_mark_full.patch
driver/sysfs-fix-oops-in-sysfs_drop_dentry-on-x86_64.patch
driver/sysfs-fix-root-sysfs_dirent-root-dentry-association.patch
driver/driver-core-add-missing-kset-uevent.patch
driver/power-management-use-mutexes-instead-of-semaphores.patch
driver/sysdev-use-mutex-instead-of-semaphore.patch
driver/sysfs-fix-parent-refcounting-during-rename-and-move.patch
driver/sysfs-implement-sysfs_find_dirent-and-sysfs_get_dirent.patch
driver/sysfs-make-sysfs_alloc_ino-static.patch
driver/sysfs-move-s_active-functions-to-fs-sysfs-dir.c.patch
driver/sysfs-reorganize-sysfs_new_indoe-and-sysfs_create.patch
driver/sysfs-slim-down-sysfs_dirent-s_active.patch
driver/sysfs-use-iget_locked-instead-of-new_inode.patch
driver/sysfs-use-singly-linked-list-for-sysfs_dirent-tree.patch
driver/sysfs-use-sysfs_mutex-to-protect-the-sysfs_dirent-tree.patch
driver/pm-remove-pm_parent-from-struct-dev_pm_info.patch
driver/pm-remove-saved_state-from-struct-dev_pm_info.patch
driver/pm-simplify-suspend_device.patch
driver/sysfs-consolidate-sysfs-spinlocks.patch
driver/sysfs-implement-sysfs_flag_removed-flag.patch
driver/sysfs-implement-sysfs_get_dentry.patch
driver/sysfs-make-directory-dentries-and-inodes-reclaimable.patch
driver/sysfs-make-kobj-point-to-sysfs_dirent-instead-of-dentry.patch
driver/sysfs-make-sysfs_drop_dentry-access-inodes-using-ilookup.patch
driver/sysfs-move-sysfs_drop_dentry-to-dir.c-and-make-it-static.patch
driver/sysfs-rename-sysfs_dirent-s_type-to-s_flags-and-make-room-for-flags.patch
driver/sysfs-restructure-add-remove-paths-and-fix-inode-update.patch
gregkh/gkh-version.patch
gregkh/sysfs-test.patch
gregkh/sysrq-u-laptop.patch
pci/pci_bridge-device.patch
pci/pci-piggy-bus.patch
pci/pci-make-pcibios_add_platform_entries-return-errors.patch
pci/pci-use-a-weak-symbol-for-the-empty-version-of-pcibios_add_platform_entries.patch
pci/pci-pci_find_slot-mark-deprecated.patch
pci/pci-remove-cpqphp-maintainer.patch
pci/pci-remove-useless-pci-driver-method.patch
pci/pci-fix-the-error-message-to-point-to-the-proper-person.patch
pci/pci-syscall.c-switch-to-refcounting-api.patch
usb/usb-gotemp.patch
usb/usb-stimulus.patch
usb/usb-add-usb-persist-facility.patch
usb/usb-core-hub.c-prevent-re-enumeration-on-hnp.patch
usb/usb-serial-license-fix.patch
usb/usb-aircable-status.patch
usb/usb-airprime-status.patch
usb/usb-belkin_sa-status.patch
usb/usb-ehci-safe-endianness-for-transfer-buffers-after-reset-in-case-of-hub-with-tt.patch
usb/usb-cyberjack-status.patch
usb/usb-cypress_m8-status.patch
usb/usb-digi_acceleport-status.patch
usb/usb-empeg-status.patch
usb/usb-ftdi_sio-status.patch
usb/usb-usb-serial-gadget-sparse-fixes.patch
usb/usb-suspend-support-for-usb-serial.patch
usb/usb-add-reset_resume-device-quirk.patch
usb/usb-ehci-cpufreq-fix.patch
usb/usb-ehci-support-for-big-endian-descriptors.patch
usb/usb-garmin_gps-status.patch
usb/usb-don-t-unsuspend-for-a-new-connection.patch
usb/usb-implement-pm-freeze-and-prethaw.patch
usb/usb-disable-file_storage-usb_config_att_wakeup.patch
usb/usb-interface-pm-state.patch
usb/usb-make-hub-driver-s-release-more-robust.patch
usb/usb-move-bus_suspend-and-bus_resume-method-calls.patch
usb/usb-remove-locktree-routine-from-the-hub-driver.patch
usb/usb-remove-references-to-dev.power.power_state.patch
usb/usb-generic-status.patch
usb/usb-io_edgeport-status.patch
usb/usb-io_ti-status.patch
usb/usb-cxacru-cleanup-sysfs-attribute-code.patch
usb/usb-make-device-reset-stop-retrying-after-disconnect.patch
usb/usb-add-power-persist-device-attribute.patch
usb/usb-ipw-status.patch
usb/usb-ehci-refcounts-work-on-ppc7448.patch
usb/usb-m66592-udc-peripheral-controller-driver-for-m66592.patch
usb/usb-add-reset_resume-method.patch
usb/usb-r8a66597-hcd-host-controller-driver-for-r8a66597.patch
usb/usb-g_file_storage-call-allow_signal.patch
usb/usb-m66592-udc-fix-use-old-interrupt-flags.patch
usb/usb-ipaq-status.patch
usb/usb-serial-keyspan-add-support-for-usa-49wg-usa-28xg.patch
usb/usb-use-menuconfig-objects.patch
usb/usb-r8a66597-hcd-fix-null-access.patch
usb/usb-remove-__usb_port_suspend.patch
usb/usb-remove-excess-code-from-hub.c.patch
usb/usb-separate-root-and-non-root-suspend-resume.patch
usb/usb-unify-reset_resume-and-normal-resume.patch
usb/usb-fsl_usb2_udc-get-max-ep-number-from-dccparams-register.patch
usb/usb-add-usb_device_and_interface_info-for-device-matching.patch
usb/usb-ehci-fix-handover-for-designated-full-speed-ports.patch
usb/usb-ehci-ohci-handover-changes.patch
usb/usb-gadget-driver-for-samsung-s3c2410-arm-soc.patch
usb/usb-io_ti-digi-edgeport-update-for-new-devices.patch
usb/usb-option-fix-usage-of-urb-status-abuse.patch
usb/usb-oti6858-usb-serial-driver.patch
usb/usb-prevent-char-device-open-deregister-race.patch
usb/usb-rework-c-style-comments.patch
usb/usb-usb-gadget-dead-config-cleanup.patch
usb/usbmon-add-class-for-binary-interface.patch
usb/usb-usb-host-side-can-be-configured-given-pcmcia.patch
usb/ehci-hub-improved-over-current-recovery.patch
usb/usb-ehci-big-endian-data-structures-support.patch
usb/usb-export-linux-usb_gadgetfs-as-linux-usb-gadgetfs.h.patch
usb/usb-ir-usb-status.patch
usb/usb-set-config_usb_ehci_big_endian_mmio-_desc-in-usb-host-kconfig.patch
usb/pl2303.c-patch.patch
usb/usb-usb-storage-use-kthread_stop-for-the-control-thread.patch
usb/usb-keyspan-status.patch
usb/usb-keyspan_pda-status.patch
usb/usb-handle-bogus-low-speed-bulk-endpoints.patch
usb/usb-free-dma-mappings-if-enqueue-fails.patch
usb/usb-kl5kusb105-status.patch
usb/usb-kobil_sct-status.patch
usb/usb-mct_u232-status.patch
usb/usb-mos7720-status.patch
usb/usb-mos7840-status.patch
usb/usb-navman-status.patch
usb/usb-omninet-status.patch
usb/usb-option-status.patch
usb/usb-oti6858-status.patch
usb/usb-pl2303-status.patch
usb/usb-safe_serial-status.patch
usb/usb-sierra-status.patch
usb/usb-ti_usb_3410_5052-status.patch
usb/usb-visor-status.patch
usb/usb-whiteheat-status.patch
HOWTO

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.