Re: (tracking down functions with git) or when did pcmcia_register_client disappear ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Jun 15, 2007 at 04:50:53PM +0300, Ramagudi Naziir wrote:
> I have a driver from QUATECH that when compiled screams that:
> warning: implicit declaration of function `pcmcia_report_error`
> warning: implicit declaration of function `pcmcia_register_client`
> warning: implicit declaration of function `pcmcia_deregister_client`
> warning: implicit declaration of function `register_serial`
> warning: implicit declaration of function  `unregister_serial`
> 
> and indeed I can't load it; it shouts about unknown symbols.

Correct, the PCMCIA subsytem got a major overhaul around 2.6.16 or so.

> I checked and saw that, for example the function pcmcia_register_client
> does not exists in modern kernels but does exist in 2.6.10.
> 
> Can I use git to find the exact kernel version (or patch)
> this function disappeared ?

Sure. I use pcmcia_report_error cause pcmcia_register_client was
probably removed before the use of git (from 2.6.12-rc2 and on). You
already figured out that the function lives in drivers/pcmcia/, so then
you tell git:

git-whatchanged -p drivers/pcmcia/ | grep pcmcia_report_error

That shows you which files are affected. Then you use git blame to see
who is to blame for the lines in that file:

git blame drivers/pcmcia/ds.c

^1da177e (Linus Torvalds     2005-04-16 15:20:36 -0700  158)
2bc5a9bd (Dominik Brodowski  2005-07-07 17:59:02 -0700  159) static int pcmcia_report_error(struct pcmcia_device *p_dev, error_info_t *err)
^1da177e (Linus Torvalds     2005-04-16 15:20:36 -0700  160) {
^1da177e (Linus Torvalds     2005-04-16 15:20:36 -0700  161)    int i;

That tells that commit 2bc5a9bd is responsible. Now you can use git
show to see the complete commit:

git show 2bc5a9bd

If you want to investigate further: the commit was on july 7 2005,
which is after 2.6.12 but before 2.6.12. You can now use gitk to see the exact relation:

gitk v2.6.12..v2.6.13

Type the commit in the "SHA1 ID" box, hit "Goto" and there you go: a
bunch of PCMCIA patches. Gitk even shows that this was merged between
2.6.13-rc2 and 2.6.13-rc3.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGcqtT/PlVHJtIto0RAjJzAJ4xiH/hpWYeSopOFqJag0PrL4Xy+QCfZqzQ
/9ccJZIdXZP6UvXWKqXSUDU=
=YVYb
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux