On Fri, May 6, 2011 at 1:25 AM, Arend van Spriel <arend@broadcom.com> wrote: ...
Show 16 quoted lines
>> Signed-off-by: Grant Grundler<grundler@chromium.org>
>>
>> diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
>> b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
>> index 0c248aa..4bfd8d8 100644
>
> I am having difficulties applying a patch and want to turn it into a
> learning experience for me. I tried to apply this patch using the following
> steps:
> 1. save the email to grundler.eml
> 2. checkout staging-next branch (HEAD 7cc8243)
> 3. run 'git am grundler.eml'
> Applying: staging: brcm80211: SDIO/MMC cleanups
> error: patch failed: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:135
> error: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: patch does not apply
> Patch failed at 0001 staging: brcm80211: SDIO/MMC cleanups
In case it matters, that patch was generated with simple "git diff" and then hand edited to prepend the commit log, S-o-B, and comments. I'm still too chicken to use git-mail.
I haven't touched that tree since making the diff. Any information that might help explain the state is available. Here are some basics: grundler <2083>git config -l user.name=Grant Grundler user.email=grundler@google.com color.ui=auto core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git
grundler <2084>git status # Not currently on any branch. # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c # modified: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c # no changes added to commit (use "git add" and/or "git commit -a")
grundler <2054>cat .git/ORIG_HEAD 3d51406d08649d166b3f3d552da2bdfbcf46fcde grundler <2055>cat .git/FETCH_HEAD 5933f2ae353a93b1d3b501bc63c925531849bbc7 not-for-merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 6c7ed917a237a0605ebe3ea2237a8d1744b0bad5 not-for-merge branch 'ralink' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 b27b8ea853c4c1c1d5d95448cf69b3f10a9558d4 not-for-merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 7cc82439baf3faa45cbb9f05a6a8b6b55891621a not-for-merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 grundler <2056>cat .git/HEAD 7cc82439baf3faa45cbb9f05a6a8b6b55891621a
> The git documentation on the git am command is not very elaborate. I
> investigated the issue and checked following:
> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my checked out
> branch.
Just for grins, can you apply the patch by hand?
patch -p1 < grundler.emlThis would just confirm it's not a problem with the "diff" portion of the patch. It's possible something else in the file is confusing/annoying git-am command.
> 2. did 'git hash-object'
> $ git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
> 0c248aa43a37cfd1701f97988ec7cf4ff76a2789
grundler <2086>git hash-object drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c 25fbd9c54bb0039f1a4d17e6fc9c12c4d83e0e20 grundler <2087>git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c 4bfd8d867d29c0afd6e6b6fb4330871481e1c8bc
hth, grant