Re: [U-Boot-Users] pci_hose_read_config_byte() definition puzzles

--- Wolfgang Denk wd@denx.de wrote:
Sometimes even "grep" cannot save you from actually RTFS ;-)
Ummm, pls check the following two functions related PCI. I rechecked the source this time.
extern void pci_cfgfunc_nothing(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *);
extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code, int wanted_prog_if, int index);
If still some tricks in it, don't reply. Let me RTFS:-)
Thanks in advance,
Sam
_________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...

In message 20050601092245.83270.qmail@web15909.mail.cnb.yahoo.com you wrote:
Ummm, pls check the following two functions related PCI. I rechecked the source this time.
extern void pci_cfgfunc_nothing(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *);
A dummy prototype referenced nowhere in the source code?
extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code, int wanted_prog_if, int index);
A dummy prototype referenced nowhere in the active source code?
Best regards,
Wolfgang Denk

--- Wolfgang Denk wd@denx.dewrote:
extern void pci_cfgfunc_nothing(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *);
A dummy prototype referenced nowhere in the source code?
Yea. I guess there is a mistake. pci_cfgfunc_nothing() should be pci_cfgfunc_do_nothing() which is defined in drivers/pci.c. But pci_cfgfunc_do_nothing() is a dummy one which isn't used at all. Should we remove them or just fix it?
extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code, int wanted_prog_if, int
index);
A dummy prototype referenced nowhere in the active source code?
Not quite sure this one:-). grep told me it was used but where was it's body?!!
[root@sam u-boot-1.1.3]# grep -r pci_find_class ./ ./drivers/sk98lin/skge.c: while((pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8,pdev)))
./include/pci.h:extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code,
./lib_i386/video_bios.c: if ((devbusfn = pci_find_class(PCI_CLASS_VIDEO, [root@sam u-boot-1.1.3]#
Best regards,
Sam
___________________________________________________________ 雅虎免费G邮箱-中国最强免费防毒反垃圾超大邮箱 http://cn.mail.yahoo.com/?id=77072

In message 20050602054723.86671.qmail@web15906.mail.cnb.yahoo.com you wrote:
A dummy prototype referenced nowhere in the source code?
Yea. I guess there is a mistake. pci_cfgfunc_nothing() should be pci_cfgfunc_do_nothing() which is defined in drivers/pci.c. But pci_cfgfunc_do_nothing() is a dummy one which isn't used at all. Should we remove them or just fix it?
Fix it (having a look at the corresponding Linux code might help).
extern pci_dev_t pci_find_class(int wanted_class, int wanted_sub_code, int wanted_prog_if, int
index);
A dummy prototype referenced nowhere in the active source code?
Not quite sure this one:-). grep told me it was used but where was it's body?!!
It seems it gets used only in code which is deactivated by a "#if 0" or not compiled in any used configuration.
Again, just grepping for somthing is not enough. You have to read the code.
Best regards,
Wolfgang Denk
participants (2)
-
Sam Song
-
Wolfgang Denk