Linux kernel which version changed the function parameters
I am build a out of tree module that has to work across range of kernel version. There has few internal API changes which require me use a #define to support those changes. I want to quickly locate which exact kernel version made those changes. How do I use git to browse through the history of a particular file/function changes.
- Download or clone only a branch in git and not the entire tree
- Linux kernel “historical” git repository with full history
- Removing files from Git commit message
- Printing all kernel revisions where the patch is backported
- How to manage the open source projects patches which can't push to upstream?
- Using a *.patch file to change a Linux kernel's source
2 Solutions collect form web for “Linux kernel which version changed the function parameters”
You can use the following
git log -S 'function_name' -- path/to/header.h
This will list only commits that modified the function
function_name. It’s likely that the last commit is the one that interest you, so get its SHA1 hash from the log output.
Then you want the first version to include this change, simply run
git tag --contains <sha1_hash>
git blame on the file.