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.

  • Merging Linux Changes into Android Kernel Project
  • How to get git to ignore line white spacing
  • git - Track Linux Kernel .config file
  • Linux kernel “historical” git repository with full history
  • Printing all kernel revisions where the patch is backported
  • Download or clone only a branch in git and not the entire tree
  • why kernel repositories' tags are different
  • How can I pull every linux kernel commit request?
  • 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> 
    

    Try using git blame on the file.

    Git Baby is a git and github fan, let's start git clone.