2009-12-29 16:22:46

by Hartley Sweeten

[permalink] [raw]
Subject: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Tom Tucker <[email protected]>

---

diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c
index ad723bd..712314a 100644
--- a/drivers/infiniband/hw/amso1100/c2_provider.c
+++ b/drivers/infiniband/hw/amso1100/c2_provider.c
@@ -760,10 +760,7 @@ static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev)
memcpy_fromio(netdev->dev_addr, c2dev->kva + C2_REGS_RDMA_ENADDR, 6);

/* Print out the MAC address */
- pr_debug("%s: MAC %02X:%02X:%02X:%02X:%02X:%02X\n",
- netdev->name,
- netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
- netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]);
+ pr_debug("%s: MAC %pM\n", netdev->name, netdev->dev_addr);

#if 0
/* Disable network packets */


2009-12-31 05:59:28

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

From: "H Hartley Sweeten" <[email protected]>
Date: Tue, 29 Dec 2009 11:22:42 -0500

> Use the %pM kernel extension to display the MAC address.
>
> Signed-off-by: H Hartley Sweeten <[email protected]>

Hartley, I was going to mention this for your previous
series, and now that you've sent another huge set of
patches I must make a note of this.

Every single one of your patches applies with one-line of
patch 'fuzz', like this:

davem@sunset:~/src/GIT/linux-2.6$ patch -p1 <diff
patching file drivers/infiniband/hw/amso1100/c2_provider.c
Hunk #1 succeeded at 760 with fuzz 1.

And GIT rejects such patches entirely:

davem@sunset:~/src/GIT/linux-2.6$ git apply --check --whitespace=error-all diff
error: patch failed: drivers/infiniband/hw/amso1100/c2_provider.c:760
error: drivers/infiniband/hw/amso1100/c2_provider.c: patch does not apply

So I had to add all of your patches to my tree by hand, one by one,
yesterday.

I refuse to do this for so many more patches. Could you generate
patches that apply accurately?

Thanks.

2009-12-31 14:32:26

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

On Wednesday, December 30, 2009 10:59 PM, David Miller wrote:
> From: "H Hartley Sweeten" <[email protected]>
> Date: Tue, 29 Dec 2009 11:22:42 -0500
>
>> Use the %pM kernel extension to display the MAC address.
>>
>> Signed-off-by: H Hartley Sweeten <[email protected]>
>
> Hartley, I was going to mention this for your previous
> series, and now that you've sent another huge set of
> patches I must make a note of this.
>
> Every single one of your patches applies with one-line of
> patch 'fuzz', like this:
>
> davem@sunset:~/src/GIT/linux-2.6$ patch -p1 <diff
> patching file drivers/infiniband/hw/amso1100/c2_provider.c
> Hunk #1 succeeded at 760 with fuzz 1.
>
> And GIT rejects such patches entirely:
>
> davem@sunset:~/src/GIT/linux-2.6$ git apply --check --whitespace=error-all diff
> error: patch failed: drivers/infiniband/hw/amso1100/c2_provider.c:760
> error: drivers/infiniband/hw/amso1100/c2_provider.c: patch does not apply
>
> So I had to add all of your patches to my tree by hand, one by one,
> yesterday.
>
> I refuse to do this for so many more patches. Could you generate
> patches that apply accurately?

Hi David,

Sorry for the problem with the patches. I really don't understand why they are
producing a 'fuzz' issue. I'm still a bit new with git, maybe you can provide
me a bit of insight?

To create all of the patches I did the following:

1) 'git pull' of Linus' tree to make sure I had the most recent source.
2) opened the file I want to patch, i.e .../c2_provider.c
3) made the edit and saved the file
4) 'git diff > ~/patches/c2_provider_MAC.patch'
5) restored the original file
6) verified the patch applies
bigguiness@etch ~/src/git/linux-2.6 $ patch -p1 < ~/patches/c2_provider_MAC.patch
patching file drivers/infiniband/hw/amso1100/c2_provider.c

I have never tried the 'git apply ...' before so I just did with this patch:

bigguiness@etch ~/src/git/linux-2.6 $ git apply --check --whitespace=error-all /mnt/hgfs/share/c2_provider_MAC.patch
bigguiness@etch ~/src/git/linux-2.6 $

I assume no messages means that the patch applies ok?

I have attached the original patch that I sent in the email. Could you
please see if you still have problems with it? If you don't it might be
something in my email configuration.

Thanks and sorry for the troubles,
Hartley


Attachments:
c2_provider_MAC.patch (742.00 B)
c2_provider_MAC.patch

2010-01-04 06:24:07

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

From: "H Hartley Sweeten" <[email protected]>
Date: Thu, 31 Dec 2009 09:32:21 -0500

> Sorry for the problem with the patches. I really don't understand why they are
> producing a 'fuzz' issue. I'm still a bit new with git, maybe you can provide
> me a bit of insight?

This patch as an attachment works properly.

It's very possible your email client makes some modification
to the patch when inlining it.

In any event you do need to resubmit all of your pending patches
as I've tossed them already while we work out this issue.

2010-01-04 17:39:20

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Tom Tucker <[email protected]>

---

David,

Can you please try the following patch to see if the 'fuzz' issue
is still present. I think my email client was stripping the last
empty line from the patch. Thanks.

diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c
index ad723bd..712314a 100644
--- a/drivers/infiniband/hw/amso1100/c2_provider.c
+++ b/drivers/infiniband/hw/amso1100/c2_provider.c
@@ -760,10 +760,7 @@ static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev)
memcpy_fromio(netdev->dev_addr, c2dev->kva + C2_REGS_RDMA_ENADDR, 6);

/* Print out the MAC address */
- pr_debug("%s: MAC %02X:%02X:%02X:%02X:%02X:%02X\n",
- netdev->name,
- netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
- netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]);
+ pr_debug("%s: MAC %pM\n", netdev->name, netdev->dev_addr);

#if 0
/* Disable network packets */

2010-01-04 18:42:47

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] amso1100/c2_provider.c: use %pM to shown MAC address

From: "H Hartley Sweeten" <[email protected]>
Date: Mon, 4 Jan 2010 12:39:12 -0500

> Use the %pM kernel extension to display the MAC address.
>
> Signed-off-by: H Hartley Sweeten <[email protected]>
> Cc: David S. Miller <[email protected]>
> Cc: Tom Tucker <[email protected]>
>
> ---
>
> David,
>
> Can you please try the following patch to see if the 'fuzz' issue
> is still present. I think my email client was stripping the last
> empty line from the patch. Thanks.

Yep, I think it is, this patch has the same problem all of
your previous ones did.