threads / patch / 27279

patchRe: [PATCH] staging: brcm80211: SDIO/MMC cleanups

Subject: Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups

## tl;dr

6 messages between May 6, 2011 and May 6, 2011. Diffs are folded; open one to read it.

replies: 5people: 4as markdown or json

Arend van Spriel· May 6, 2011, 08:25 UTC · lore
On 05/04/2011 06:59 PM, Grant Grundler wrote:
Show 14 quoted lines
> misc coding style cleanups to dhd_sdio/sdmmc
>
> o replace PKTFREE2 macro with static dhdsdio_pktfree2()
> o drop "delta" local var
> o drop GSPI_PR55150_BAILOUT
> o reformat some of the comments (white space changes)
> o drop dhd_bcmsdh_recv_buf wrapper and directly call bcmsdh_recv_buf
>
> 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
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
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.
2. did 'git hash-object'
     $ git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
     0c248aa43a37cfd1701f97988ec7cf4ff76a2789
What could be the problem?
Junio C Hamano· May 6, 2011, 14:37 UTC · re: Arend van Spriel · lore
"Arend van Spriel" <arend@broadcom.com> writes:
> 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.

Does it exactly match, or does it merely visually match if you ignore tabs and spaces munged by somebody between the state of the file submitter committed and grunder.eml file you stored?

Michael J Gruber· May 6, 2011, 16:00 UTC · re: Junio C Hamano · lore
Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:
Show 10 quoted lines
> "Arend van Spriel" <arend@broadcom.com> writes:
> 
>> 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.
> 
> Does it exactly match, or does it merely visually match if you ignore tabs
> and spaces munged by somebody between the state of the file submitter
> committed and grunder.eml file you stored?

Junio, he reported the hashes to match! Puzzling. Or a MUA doing things to the .eml.

Michael
Junio C Hamano· May 6, 2011, 16:07 UTC · re: Michael J Gruber · lore
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 14 quoted lines
> Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:
>> "Arend van Spriel" <arend@broadcom.com> writes:
>> 
>>> 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.
>> 
>> Does it exactly match, or does it merely visually match if you ignore tabs
>> and spaces munged by somebody between the state of the file submitter
>> committed and grunder.eml file you stored?
>
> Junio, he reported the hashes to match! Puzzling. Or a MUA doing things
> to the .eml.

The latter is exactly what I meant. The mailchain leading to the receiver's mailbox would not adjust the hash recorded in the patch when it munges whitespaces.

Arend van Spriel· May 6, 2011, 16:44 UTC · re: Junio C Hamano · lore
On 05/06/2011 06:07 PM, Junio C Hamano wrote:
Show 17 quoted lines
> Michael J Gruber<git@drmicha.warpmail.net>  writes:
>
>> Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:
>>> "Arend van Spriel"<arend@broadcom.com>  writes:
>>>
>>>> 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.
>>> Does it exactly match, or does it merely visually match if you ignore tabs
>>> and spaces munged by somebody between the state of the file submitter
>>> committed and grunder.eml file you stored?
>> Junio, he reported the hashes to match! Puzzling. Or a MUA doing things
>> to the .eml.
> The latter is exactly what I meant.  The mailchain leading to the
> receiver's mailbox would not adjust the hash recorded in the patch when it
> munges whitespaces.

Tried patch -p1 < grundler.eml. That gives info at which line it fails. I believe we have to blame Thunderbird here as you suspected. It placed a line break because to line was too long. Crap! Why do tools have to be "smart"?

Gr. AvS
Grant Grundler· May 6, 2011, 15:21 UTC · re: Arend van Spriel · lore

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.eml

This 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

← back to recent threads