{"thread":{"id":"27279","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","startedAt":"2011-05-06T08:25:42Z","lastAt":"2011-05-06T16:44:18Z","messageCount":6,"participants":["Arend van Spriel","Junio C Hamano","Grant Grundler","Michael J Gruber"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167230","messageId":"4DC3B086.90802@broadcom.com","threadId":"27279","inReplyTo":"20110504165947.40EED208186@grundler.mtv.corp.google.com","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Arend van Spriel","fromEmail":"arend@broadcom.com","sentAt":"2011-05-06T08:25:42Z","receivedAt":"2011-05-06T08:25:42Z","isPatch":true,"sender":{"key":"arend@broadcom.com","avatar":null},"body":"On 05/04/2011 06:59 PM, Grant Grundler wrote:\n> misc coding style cleanups to dhd_sdio/sdmmc\n>\n> o replace PKTFREE2 macro with static dhdsdio_pktfree2()\n> o drop \"delta\" local var\n> o drop GSPI_PR55150_BAILOUT\n> o reformat some of the comments (white space changes)\n> o drop dhd_bcmsdh_recv_buf wrapper and directly call bcmsdh_recv_buf\n>\n> Signed-off-by: Grant Grundler<grundler@chromium.org>\n>\n> ---\n>\n> diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n> index 0c248aa..4bfd8d8 100644\n\nI am having difficulties applying a patch and want to turn it into a \nlearning experience for me. I tried to apply this patch using the \nfollowing steps:\n1. save the email to grundler.eml\n2. checkout staging-next branch (HEAD 7cc8243)\n3. run 'git am grundler.eml'\nApplying: staging: brcm80211: SDIO/MMC cleanups\nerror: patch failed: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:135\nerror: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: patch does not apply\nPatch failed at 0001 staging: brcm80211: SDIO/MMC cleanups\nWhen you have resolved this problem run \"git am --resolved\".\nIf you would prefer to skip this patch, instead run \"git am --skip\".\nTo restore the original branch and stop patching run \"git am --abort\".\n\nThe git documentation on the git am command is not very elaborate. I \ninvestigated the issue and checked following:\n1. line 135 in dhd_sdio.c in the patch does match line 135 in my checked \nout branch.\n2. did 'git hash-object'\n     $ git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n     0c248aa43a37cfd1701f97988ec7cf4ff76a2789\n\nWhat could be the problem?\n"},{"id":"167252","messageId":"7viptn3neo.fsf@alter.siamese.dyndns.org","threadId":"27279","inReplyTo":"4DC3B086.90802@broadcom.com","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-06T14:37:51Z","receivedAt":"2011-05-06T14:37:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Arend van Spriel\" <arend@broadcom.com> writes:\n\n> The git documentation on the git am command is not very elaborate. I\n> investigated the issue and checked following:\n> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my\n> checked out branch.\n\nDoes it exactly match, or does it merely visually match if you ignore tabs\nand spaces munged by somebody between the state of the file submitter\ncommitted and grunder.eml file you stored?\n"},{"id":"167254","messageId":"BANLkTimQ8A9bfRE=Uu59QDWhBgxvVRJW7g@mail.gmail.com","threadId":"27279","inReplyTo":"4DC3B086.90802@broadcom.com","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Grant Grundler","fromEmail":"grundler@chromium.org","sentAt":"2011-05-06T15:21:45Z","receivedAt":"2011-05-06T15:21:45Z","isPatch":true,"sender":{"key":"grundler@chromium.org","avatar":null},"body":"On Fri, May 6, 2011 at 1:25 AM, Arend van Spriel <arend@broadcom.com> wrote:\n...\n>> Signed-off-by: Grant Grundler<grundler@chromium.org>\n>>\n>> diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n>> b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n>> index 0c248aa..4bfd8d8 100644\n>\n> I am having difficulties applying a patch and want to turn it into a\n> learning experience for me. I tried to apply this patch using the following\n> steps:\n> 1. save the email to grundler.eml\n> 2. checkout staging-next branch (HEAD 7cc8243)\n> 3. run 'git am grundler.eml'\n> Applying: staging: brcm80211: SDIO/MMC cleanups\n> error: patch failed: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:135\n> error: drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: patch does not apply\n> Patch failed at 0001 staging: brcm80211: SDIO/MMC cleanups\n\nIn case it matters, that patch was generated with simple \"git diff\"\nand then hand edited to prepend the commit log, S-o-B, and comments.\nI'm still too chicken to use git-mail.\n\nI haven't touched that tree since making the diff. Any information\nthat might help explain the state is available. Here are some basics:\ngrundler <2083>git config -l\nuser.name=Grant Grundler\nuser.email=grundler@google.com\ncolor.ui=auto\ncore.repositoryformatversion=0\ncore.filemode=true\ncore.bare=false\ncore.logallrefupdates=true\nremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\nremote.origin.url=git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git\n\ngrundler <2084>git status\n# Not currently on any branch.\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       modified:   drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c\n#       modified:   drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n#\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n\ngrundler <2054>cat .git/ORIG_HEAD\n3d51406d08649d166b3f3d552da2bdfbcf46fcde\ngrundler <2055>cat .git/FETCH_HEAD\n5933f2ae353a93b1d3b501bc63c925531849bbc7        not-for-merge   branch\n'master' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6\n6c7ed917a237a0605ebe3ea2237a8d1744b0bad5        not-for-merge   branch\n'ralink' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6\nb27b8ea853c4c1c1d5d95448cf69b3f10a9558d4        not-for-merge   branch\n'staging-linus' of\ngit://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6\n7cc82439baf3faa45cbb9f05a6a8b6b55891621a        not-for-merge   branch\n'staging-next' of\ngit://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6\ngrundler <2056>cat .git/HEAD\n7cc82439baf3faa45cbb9f05a6a8b6b55891621a\n\n\n> The git documentation on the git am command is not very elaborate. I\n> investigated the issue and checked following:\n> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my checked out\n> branch.\n\nJust for grins, can you apply the patch by hand?\n    patch -p1 < grundler.eml\n\nThis would just confirm it's not a problem with the \"diff\" portion of\nthe patch. It's possible something else in the file is\nconfusing/annoying git-am command.\n\n> 2. did 'git hash-object'\n>    $ git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n>    0c248aa43a37cfd1701f97988ec7cf4ff76a2789\n\ngrundler <2086>git hash-object drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c\n25fbd9c54bb0039f1a4d17e6fc9c12c4d83e0e20\ngrundler <2087>git hash-object drivers/staging/brcm80211/brcmfmac/dhd_sdio.c\n4bfd8d867d29c0afd6e6b6fb4330871481e1c8bc\n\nhth,\ngrant\n"},{"id":"167257","messageId":"4DC41B06.5040500@drmicha.warpmail.net","threadId":"27279","inReplyTo":"7viptn3neo.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-05-06T16:00:06Z","receivedAt":"2011-05-06T16:00:06Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:\n> \"Arend van Spriel\" <arend@broadcom.com> writes:\n> \n>> The git documentation on the git am command is not very elaborate. I\n>> investigated the issue and checked following:\n>> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my\n>> checked out branch.\n> \n> Does it exactly match, or does it merely visually match if you ignore tabs\n> and spaces munged by somebody between the state of the file submitter\n> committed and grunder.eml file you stored?\n\nJunio, he reported the hashes to match! Puzzling. Or a MUA doing things\nto the .eml.\n\nMichael\n"},{"id":"167259","messageId":"7v39kr3j8r.fsf@alter.siamese.dyndns.org","threadId":"27279","inReplyTo":"4DC41B06.5040500@drmicha.warpmail.net","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-06T16:07:48Z","receivedAt":"2011-05-06T16:07:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:\n>> \"Arend van Spriel\" <arend@broadcom.com> writes:\n>> \n>>> The git documentation on the git am command is not very elaborate. I\n>>> investigated the issue and checked following:\n>>> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my\n>>> checked out branch.\n>> \n>> Does it exactly match, or does it merely visually match if you ignore tabs\n>> and spaces munged by somebody between the state of the file submitter\n>> committed and grunder.eml file you stored?\n>\n> Junio, he reported the hashes to match! Puzzling. Or a MUA doing things\n> to the .eml.\n\nThe latter is exactly what I meant.  The mailchain leading to the\nreceiver's mailbox would not adjust the hash recorded in the patch when it\nmunges whitespaces.\n"},{"id":"167262","messageId":"4DC42562.5080308@broadcom.com","threadId":"27279","inReplyTo":"7v39kr3j8r.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] staging: brcm80211: SDIO/MMC cleanups","fromName":"Arend van Spriel","fromEmail":"arend@broadcom.com","sentAt":"2011-05-06T16:44:18Z","receivedAt":"2011-05-06T16:44:18Z","isPatch":true,"sender":{"key":"arend@broadcom.com","avatar":null},"body":"On 05/06/2011 06:07 PM, Junio C Hamano wrote:\n> Michael J Gruber<git@drmicha.warpmail.net>  writes:\n>\n>> Junio C Hamano venit, vidit, dixit 06.05.2011 16:37:\n>>> \"Arend van Spriel\"<arend@broadcom.com>  writes:\n>>>\n>>>> The git documentation on the git am command is not very elaborate. I\n>>>> investigated the issue and checked following:\n>>>> 1. line 135 in dhd_sdio.c in the patch does match line 135 in my\n>>>> checked out branch.\n>>> Does it exactly match, or does it merely visually match if you ignore tabs\n>>> and spaces munged by somebody between the state of the file submitter\n>>> committed and grunder.eml file you stored?\n>> Junio, he reported the hashes to match! Puzzling. Or a MUA doing things\n>> to the .eml.\n> The latter is exactly what I meant.  The mailchain leading to the\n> receiver's mailbox would not adjust the hash recorded in the patch when it\n> munges whitespaces.\n\nTried patch -p1 < grundler.eml. That gives info at which line it fails. \nI believe we have to blame Thunderbird here as you suspected. It placed \na line break because to line was too long. Crap! Why do tools have to be \n\"smart\"?\n\nGr. AvS\n"}]}