Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d84702a5d7b500ead8db129ddea789c88764f357
Commit:     d84702a5d7b500ead8db129ddea789c88764f357
Parent:     633c52dccd73d83eabbe1fb23e3822b695a2718b
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 20 19:42:15 2007 +0100
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Tue Mar 20 23:27:19 2007 +0100

    firewire: fix compiler warnings on 64bit
    
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-device-cdev.c |    7 ++++---
 drivers/firewire/fw-device.c      |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/firewire/fw-device-cdev.c 
b/drivers/firewire/fw-device-cdev.c
index b1b7edb..f9f2688 100644
--- a/drivers/firewire/fw-device-cdev.c
+++ b/drivers/firewire/fw-device-cdev.c
@@ -274,10 +274,11 @@ static int ioctl_get_info(struct client *client, void 
__user *arg)
 
        if (get_info.rom != 0) {
                void __user *uptr = u64_to_uptr(get_info.rom);
-               size_t length = min(get_info.rom_length,
-                                   client->device->config_rom_length * 4);
+               size_t want = get_info.rom_length;
+               size_t have = client->device->config_rom_length * 4;
 
-               if (copy_to_user(uptr, client->device->config_rom, length))
+               if (copy_to_user(uptr, client->device->config_rom,
+                                min(want, have)))
                        return -EFAULT;
        }
        get_info.rom_length = client->device->config_rom_length * 4;
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 415e9ab..a834221 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -240,7 +240,7 @@ show_rom_index_attribute(struct device *dev,
        struct fw_unit *unit = fw_unit(dev);
 
        return snprintf(buf, PAGE_SIZE, "%d\n",
-                       unit->directory - device->config_rom);
+                       (int)(unit->directory - device->config_rom));
 }
 
 static struct device_attribute rom_index_attribute = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to