Re: [PATCH] PCI and I2C fixes for 2.6.8

From: Greg KH
Date: Mon Aug 23 2004 - 21:10:02 EST


ChangeSet 1.1807.56.29, 2004/08/06 15:32:54-07:00, johnpol@xxxxxxxxxxx

[PATCH] w1: Debug output cleanup. memcpy instead of direct structure copying.

Debug output cleanup. memcpy instead of direct structure copying.

Signed-off-by: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/w1/w1.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c
--- a/drivers/w1/w1.c 2004-08-23 11:03:51 -07:00
+++ b/drivers/w1/w1.c 2004-08-23 11:03:51 -07:00
@@ -406,8 +406,8 @@
f = w1_family_registered(rn->family);
if (!f) {
spin_unlock(&w1_flock);
- dev_info(&dev->dev, "Family %x is not registered.\n",
- rn->family);
+ dev_info(&dev->dev, "Family %x for %02x.%012llx.%02x is not registered.\n",
+ rn->family, rn->family, rn->id, rn->crc);
kfree(sl);
return -ENODEV;
}
@@ -428,7 +428,7 @@

dev->slave_count++;

- msg.id.id = *rn;
+ memcpy(&msg.id.id, rn, sizeof(msg.id.id));
msg.type = W1_SLAVE_ADD;
w1_netlink_send(dev, &msg);

@@ -449,7 +449,7 @@
device_unregister(&sl->dev);
w1_family_put(sl->family);

- msg.id.id = sl->reg_num;
+ memcpy(&msg.id.id, &sl->reg_num, sizeof(msg.id.id));
msg.type = W1_SLAVE_REMOVE;
w1_netlink_send(sl->master, &msg);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/