Skip to contentSkip to conversation

drivers/scsi/qla1280.c: pci_get_device instead of

PATCH In review Rodrigo Nascimento 5 participants 8 messages Jul 5, 2005 – Jul 6, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/qla1280.c: pci_get_device instead of

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

# diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c       2005-06-22
16:33:05.000000000 -0300
+++ /usr/src/linux-kj/drivers/scsi/qla1280.c    2005-07-05
17:55:24.000000000 -0300
@@ -1196,7 +1196,7 @@ qla1280_detect(Scsi_Host_Template *templ
 #endif
        /* First Initialize QLA12160 on PCI Bus 1 Dev 2 */
-       while ((pdev = pci_find_device(id->vendor, id->device, pdev))) {
+       while ((pdev = pci_get_device(id->vendor, id->device, pdev))) {
                if (pdev->bus->number = 1 && PCI_SLOT(pdev->devfn) = 2) {
                        if (!qla1280_probe_one(pdev, id))
                                num_hosts++;
@@ -1206,7 +1206,7 @@ qla1280_detect(Scsi_Host_Template *templ
        pdev = NULL;
        /* Try and find each different type of adapter we support */
        for (id = &qla1280_pci_tbl[0]; id->device; id++) {

- while ((pdev = pci_find_device(id->vendor, id->device, pdev))) {
+ while ((pdev = pci_get_device(id->vendor, id->device, pdev))) {
/*
* skip QLA12160 already initialized on
* PCI Bus 1 Dev 2 since we already initialized

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 9 lines · Rodrigo Nascimento

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

# diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c       2005-06-22
16:33:05.000000000 -0300

Content looks good, but the patch is linwrapped and all of the tabs are converted to spaces, making it impossible to apply. And it's made at the wrong patch level :(

Good luck,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Rodrigo Nascimento
Quoted 2 lines · Rodrigo Nascimento

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

Thanks. It looks good except trivially fixable issues:
1. Long lines are wrapped.
2. Tabs are converted to spaces.

If you're using Gmail web-interface and copy-pasting patch, stop now. ;-) If you're using email program, tune it a little.

Quoted 1 line

#

You can hack in your home directory. Much safer. You need root privileges only when installing new kernel.

Quoted 6 lines

diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c 2005-06-22
16:33:05.000000000 -0300
+++ /usr/src/linux-kj/drivers/scsi/qla1280.c 2005-07-05
17:55:24.000000000 -0300

Patches are supposed to be "patch -p1" compliant. Paths should be relative:

	--- linux/drivers/scsi/qla1280.c
	+++ linux-kj/drivers/scsi/qla1280.c
Quoted 10 lines
(quoted diff) +1 -1
@@ -1196,7 +1196,7 @@ qla1280_detect(Scsi_Host_Template *templ
 #endif
 
        /* First Initialize QLA12160 on PCI Bus 1 Dev 2 */
-       while ((pdev = pci_find_device(id->vendor, id->device, pdev))) {
+       while ((pdev = pci_get_device(id->vendor, id->device, pdev))) {
                if (pdev->bus->number = 1 && PCI_SLOT(pdev->devfn) = 2) {
                        if (!qla1280_probe_one(pdev, id))
                                num_hosts++;

Review qla1280_detect(Scsi_Host_Template *templ · line 1212

Quoted 8 lines
(quoted diff) +1 -1
@@ -1206,7 +1206,7 @@ qla1280_detect(Scsi_Host_Template *templ
        pdev = NULL;
        /* Try and find each different type of adapter we support */
        for (id = &qla1280_pci_tbl[0]; id->device; id++) {
-               while ((pdev = pci_find_device(id->vendor, id->device, pdev))) {
+               while ((pdev = pci_get_device(id->vendor, id->device, pdev))) {
                        /*
                         * skip QLA12160 already initialized on
                         * PCI Bus 1 Dev 2 since we already initialized

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#3 lore raw
In reply to Rodrigo Nascimento
Quoted 6 lines · Greg KH
Quoted 5 lines · Rodrigo Nascimento

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

Quoted 8 lines
Quoted 4 lines
# diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c       2005-06-22
16:33:05.000000000 -0300

Content looks good, but the patch is linwrapped and all of the tabs are converted to spaces, making it impossible to apply. And it's made at the wrong patch level :(

Is pci_dev_put() not needed? Why not?

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#4 lore raw
In reply to Rodrigo Nascimento
Quoted 12 lines · Domen Puncer
Quoted 11 lines · Greg KH
Quoted 9 lines · Rodrigo Nascimento

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

# diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c       2005-06-22
16:33:05.000000000 -0300
Quoted 5 lines
Quoted 3 lines

Content looks good, but the patch is linwrapped and all of the tabs are converted to spaces, making it impossible to apply. And it's made at the wrong patch level :(

Is pci_dev_put() not needed? Why not?

Where would you place it?

thanks,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#6 lore raw
In reply to Rodrigo Nascimento
Quoted 13 lines · Greg KH
Quoted 12 lines · Domen Puncer
Quoted 11 lines · Greg KH
Quoted 9 lines · Rodrigo Nascimento

This patch changes the pci_find_device to pci_get_device. Please correct me, whether it's wrong. It is my first patch. :)

# diff -urpN /usr/src/linux/drivers/scsi/qla1280.c
/usr/src/linux-kj/drivers/scsi/qla1280.c
--- /usr/src/linux/drivers/scsi/qla1280.c       2005-06-22
16:33:05.000000000 -0300
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Content looks good, but the patch is linwrapped and all of the tabs are converted to spaces, making it impossible to apply. And it's made at the wrong patch level :(

Is pci_dev_put() not needed? Why not?

Where would you place it?

Fail path of qla1280_probe_one(), qla1280_remove_one().

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors