Skip to contentSkip to conversation

pci_find_device and pci_find_slot mark as deprecated

PATCH In review Jiri Slaby 2 participants 7 messages Aug 8, 2005 – Aug 10, 2005 1 message not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jiri Slaby

author
#1 lore raw

PATCH 1/1 pci_find_device and pci_find_slot mark as deprecated

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Generated in 2.6.13-rc5-mm1 kernel version.

include/linux/pci.h +4 -2
@@ -328,9 +328,11 @@ void pci_setup_cardbus(struct pci_bus *b
 
 /* Generic PCI functions exported to card drivers */
 
-struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
+struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device,
+	const struct pci_dev *from) __deprecated;
 struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
-struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
+struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn)
+	__deprecated;
 int pci_find_capability (struct pci_dev *dev, int cap);
 int pci_find_ext_capability (struct pci_dev *dev, int cap);
 struct pci_bus * pci_find_next_bus(const struct pci_bus *from);
#2 lore raw
Quoted 3 lines · Jiri Slaby

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Did you forget to send this to the PCI maintainer for some reason?

Anyway, no, I don't want these functions marked this way, it's only going to cause build noise. I'd much rather you, or others, send me patches that remove the usage of these functions so I can just delete them entirely.

thanks,

greg k-h

author
#3 lore raw
Quoted 6 lines · Greg KH
Quoted 3 lines · Jiri Slaby

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Did you forget to send this to the PCI maintainer for some reason?

No, my badness, sorry.

Quoted 4 lines

Anyway, no, I don't want these functions marked this way, it's only going to cause build noise. I'd much rather you, or others, send me patches that remove the usage of these functions so I can just delete them entirely.

When the patch was here
(http://www.fi.muni.cz/~xslaby/lnx/lnx-pci_find-2.6.13-r3g4_3.patch -- it'll be certainly sliced into many pieces; of course I didn't cc you :( ), they told me, that the better way is to let it be, because it signify the driver as old api based, if there are some warnings, so I want people to stop using the old functions. So you want me to continue producing the patches, that removes it?

regards,
jiri

author
#4 lore raw
Quoted 21 lines · Jiri Slaby
Quoted 9 lines · Greg KH
Quoted 3 lines · Jiri Slaby

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Anyway, no, I don't want these functions marked this way, it's only going to cause build noise. I'd much rather you, or others, send me patches that remove the usage of these functions so I can just delete them entirely.

When the patch was here
(http://www.fi.muni.cz/~xslaby/lnx/lnx-pci_find-2.6.13-r3g4_3.patch -- it'll be certainly sliced into many pieces; of course I didn't cc you :( ), they told me, that the better way is to let it be, because it signify the driver as old api based, if there are some warnings, so I want people to stop using the old functions. So you want me to continue producing the patches, that removes it?

regards,
jiri

#5 lore raw
In reply to Jiri Slaby
Quoted 9 lines · Jiri Slaby
Quoted 6 lines · Greg KH
Quoted 3 lines · Jiri Slaby

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Did you forget to send this to the PCI maintainer for some reason?

No, my badness, sorry.

Quoted 8 lines
Quoted 4 lines

Anyway, no, I don't want these functions marked this way, it's only going to cause build noise. I'd much rather you, or others, send me patches that remove the usage of these functions so I can just delete them entirely.

When the patch was here
(http://www.fi.muni.cz/~xslaby/lnx/lnx-pci_find-2.6.13-r3g4_3.patch -- it'll be certainly sliced into many pieces; of course I didn't cc you :(

Yes, I can't take anything so big. Just break it up into pieces please.

thanks,

greg k-h

author
#6 lore raw

Greg KH napsal(a):

Quoted 20 lines · Jiri Slaby
Quoted 19 lines · Greg KH
Quoted 8 lines · Jiri Slaby
Quoted 4 lines

This marks these functions as deprecated not to use in latest drivers (it doesn't use reference counts and the device returned by it can disappear in any time).

Did you forget to send this to the PCI maintainer for some reason?

No, my badness, sorry.

Quoted 4 lines

Anyway, no, I don't want these functions marked this way, it's only going to cause build noise. I'd much rather you, or others, send me patches that remove the usage of these functions so I can just delete them entirely.

Quoted 7 lines
Quoted 4 lines

When the patch was here
(http://www.fi.muni.cz/~xslaby/lnx/lnx-pci_find-2.6.13-r3g4_3.patch -- it'll be certainly sliced into many pieces; of course I didn't cc you :(

Yes, I can't take anything so big. Just break it up into pieces please.

*It removes most occurences of pci_find_device in the kernel tree. *pci_(get|find)_device(x, ANY_ID, ANY_ID, x) changes to for_each_pci_dev(x).

Generated in 2.6.13-rc5-mm1 kernel version.

 arch/alpha/kernel/sys_alcor.c                |    3 +-
 arch/alpha/kernel/sys_sio.c                  |    8 ++---
 arch/frv/mb93090-mb00/pci-frv.c              |    8 +----
 arch/frv/mb93090-mb00/pci-irq.c              |    4 --
 arch/i386/kernel/cpu/cpufreq/gx-suspmod.c    |    6 +---
 arch/i386/pci/acpi.c                         |    2 -
 arch/i386/pci/irq.c                          |    6 ++--
 arch/m68k/atari/hades-pci.c                  |    4 --
 arch/ppc/kernel/pci.c                        |   21 ++++++++-------
 arch/ppc/platforms/85xx/mpc85xx_cds_common.c |    9 ++++--
 arch/ppc64/kernel/eeh.c                      |    2 -
 drivers/char/ip2main.c                       |    9 +++---
 drivers/char/istallion.c                     |    9 +++---
 drivers/char/mxser.c                         |    5 ++-
 drivers/char/rocket.c                        |    2 -
 drivers/char/specialix.c                     |   13 ++++++---
 drivers/char/stallion.c                      |    6 ++--
 drivers/char/sx.c                            |    2 -
 drivers/char/watchdog/alim1535_wdt.c         |   15 ++++++++--
 drivers/char/watchdog/alim7101_wdt.c         |    7 +++--
 drivers/char/watchdog/i8xx_tco.c             |    5 ++-
 drivers/ide/pci/alim15x3.c                   |   17 ++++++++++--
 drivers/ide/pci/cs5530.c                     |    7 ++++-
 drivers/ide/pci/hpt366.c                     |   17 ++++++++----
 drivers/ide/pci/pdc202xx_new.c               |   13 +++++----
 drivers/ide/pci/piix.c                       |    3 --
 drivers/ide/pci/serverworks.c                |   17 ++++++++++--
 drivers/ide/pci/sis5513.c                    |    3 +-
 drivers/ide/pci/via82cxxx.c                  |   14 +++++++++-
 drivers/ide/setup-pci.c                      |    3 --
 drivers/isdn/hisax/avm_pci.c                 |    8 ++++-
 drivers/isdn/hisax/bkm_a4t.c                 |    2 -
 drivers/isdn/hisax/bkm_a8.c                  |    2 -
 drivers/isdn/hisax/diva.c                    |    8 ++---
 drivers/isdn/hisax/elsa.c                    |    4 +-
 drivers/isdn/hisax/enternow_pci.c            |    8 ++---
 drivers/isdn/hisax/gazel.c                   |    2 -
 drivers/isdn/hisax/hfc_pci.c                 |   12 ++++++--
 drivers/isdn/hisax/niccy.c                   |    2 -
 drivers/isdn/hisax/nj_s.c                    |    2 -
 drivers/isdn/hisax/nj_u.c                    |    2 -
 drivers/isdn/hisax/sedlbauer.c               |    2 -
 drivers/isdn/hisax/telespci.c                |    2 -
 drivers/isdn/hisax/w6692.c                   |    2 -
 drivers/isdn/hysdn/hysdn_init.c              |    5 ++-
 drivers/macintosh/via-pmu.c                  |   20 +++++++++-----
 drivers/macintosh/via-pmu68k.c               |    6 ++--
 drivers/media/radio/radio-maestro.c          |    6 ++--
 drivers/media/video/bttv-cards.c             |    2 -
 drivers/media/video/stradis.c                |    3 +-
 drivers/media/video/zoran_card.c             |    2 -
 drivers/media/video/zr36120.c                |    9 ++++--
 drivers/mtd/devices/pmc551.c                 |   15 +++++-----
 drivers/mtd/maps/amd76xrom.c                 |    3 +-
 drivers/mtd/maps/ichxrom.c                   |    3 +-
 drivers/mtd/maps/l440gx.c                    |   14 ++++++++--
 drivers/mtd/maps/scx200_docflash.c           |   23 +++++++++++++---
 drivers/net/gt96100eth.c                     |   15 +++++++---
 drivers/net/sunhme.c                         |    5 ++-
 drivers/net/wan/sdladrv.c                    |   11 +++++---
 drivers/pci/hotplug/fakephp.c                |    2 -
 drivers/pci/pci.c                            |    4 +-
 drivers/pci/proc.c                           |    5 ++-
 drivers/pci/setup-irq.c                      |    4 +-
 drivers/scsi/BusLogic.c                      |    6 ++--
 drivers/scsi/advansys.c                      |    6 +++-
 drivers/scsi/aic7xxx_old.c                   |    2 -
 drivers/scsi/cpqfcTSinit.c                   |    4 ++
 drivers/scsi/dpt_i2o.c                       |    5 ++-
 drivers/scsi/eata_pio.c                      |    3 +-
 drivers/scsi/fdomain.c                       |   30 +++++++++++++--------
 drivers/scsi/gdth.c                          |    9 ++++--
 drivers/scsi/initio.c                        |    4 ++
 drivers/scsi/qlogicfc.c                      |    2 -
 drivers/scsi/qlogicisp.c                     |    3 --
 drivers/telephony/ixj.c                      |    3 +-
 drivers/video/igafb.c                        |   12 ++++++--
 drivers/video/pm3fb.c                        |   37 
+++++++++++----------------
 include/asm-i386/ide.h                       |    7 ++++-
 sound/core/memalloc.c                        |   10 +++----
 sound/pci/ali5451/ali5451.c                  |   18 ++++++++-----
 sound/pci/au88x0/au88x0.c                    |   20 +++++++-------
 sound/pci/cs46xx/cs46xx_lib.c                |    3 +-
 sound/pci/via82xx.c                          |    3 +-
 84 files changed, 401 insertions(+), 241 deletions(-)

Here, it is:
http://www.fi.muni.cz/~xslaby/lnx/pci_find/

Signature · 3 lines
Jiri Slaby         www.fi.muni.cz/~xslaby
~\-/~      [email protected]      ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
author
#7 lore raw

Jiri Slaby napsal(a):

Quoted 4 lines

*It removes most occurences of pci_find_device in the kernel tree. *pci_(get|find)_device(x, ANY_ID, ANY_ID, x) changes to for_each_pci_dev(x).

Generated in 2.6.13-rc5-mm1 kernel version.

[...]

Quoted 1 line
 drivers/scsi/qlogicisp.c                     |    3 --

This maybe won't be needed, adrian bunk began removing process with that.