diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-22 17:40:47 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-07-22 18:19:44 -0400 |
commit | f17a077e61b627e58db5926bc474cf308318dad9 (patch) | |
tree | d1cb311f6a4759cf3e880080fcaeeb8993395d99 /drivers/pci | |
parent | e5899e1b7d73e67de758a32174a859cc2586c0b9 (diff) |
PCI: fixup sparse endianness warnings in proc.c
drivers/pci/proc.c:91:3: warning: cast from restricted __le16
drivers/pci/proc.c:100:3: warning: cast from restricted __le32
drivers/pci/proc.c:109:3: warning: cast from restricted __le16
drivers/pci/proc.c:161:40: warning: cast to restricted __le16
drivers/pci/proc.c:170:41: warning: cast to restricted __le32
drivers/pci/proc.c:179:40: warning: cast to restricted __le16
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/proc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 4400dffbd93a..e1098c302c45 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -88,7 +88,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp | |||
88 | if ((pos & 3) && cnt > 2) { | 88 | if ((pos & 3) && cnt > 2) { |
89 | unsigned short val; | 89 | unsigned short val; |
90 | pci_user_read_config_word(dev, pos, &val); | 90 | pci_user_read_config_word(dev, pos, &val); |
91 | __put_user(cpu_to_le16(val), (unsigned short __user *) buf); | 91 | __put_user(cpu_to_le16(val), (__le16 __user *) buf); |
92 | buf += 2; | 92 | buf += 2; |
93 | pos += 2; | 93 | pos += 2; |
94 | cnt -= 2; | 94 | cnt -= 2; |
@@ -97,7 +97,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp | |||
97 | while (cnt >= 4) { | 97 | while (cnt >= 4) { |
98 | unsigned int val; | 98 | unsigned int val; |
99 | pci_user_read_config_dword(dev, pos, &val); | 99 | pci_user_read_config_dword(dev, pos, &val); |
100 | __put_user(cpu_to_le32(val), (unsigned int __user *) buf); | 100 | __put_user(cpu_to_le32(val), (__le32 __user *) buf); |
101 | buf += 4; | 101 | buf += 4; |
102 | pos += 4; | 102 | pos += 4; |
103 | cnt -= 4; | 103 | cnt -= 4; |
@@ -106,7 +106,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp | |||
106 | if (cnt >= 2) { | 106 | if (cnt >= 2) { |
107 | unsigned short val; | 107 | unsigned short val; |
108 | pci_user_read_config_word(dev, pos, &val); | 108 | pci_user_read_config_word(dev, pos, &val); |
109 | __put_user(cpu_to_le16(val), (unsigned short __user *) buf); | 109 | __put_user(cpu_to_le16(val), (__le16 __user *) buf); |
110 | buf += 2; | 110 | buf += 2; |
111 | pos += 2; | 111 | pos += 2; |
112 | cnt -= 2; | 112 | cnt -= 2; |
@@ -156,8 +156,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof | |||
156 | } | 156 | } |
157 | 157 | ||
158 | if ((pos & 3) && cnt > 2) { | 158 | if ((pos & 3) && cnt > 2) { |
159 | unsigned short val; | 159 | __le16 val; |
160 | __get_user(val, (unsigned short __user *) buf); | 160 | __get_user(val, (__le16 __user *) buf); |
161 | pci_user_write_config_word(dev, pos, le16_to_cpu(val)); | 161 | pci_user_write_config_word(dev, pos, le16_to_cpu(val)); |
162 | buf += 2; | 162 | buf += 2; |
163 | pos += 2; | 163 | pos += 2; |
@@ -165,8 +165,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof | |||
165 | } | 165 | } |
166 | 166 | ||
167 | while (cnt >= 4) { | 167 | while (cnt >= 4) { |
168 | unsigned int val; | 168 | __le32 val; |
169 | __get_user(val, (unsigned int __user *) buf); | 169 | __get_user(val, (__le32 __user *) buf); |
170 | pci_user_write_config_dword(dev, pos, le32_to_cpu(val)); | 170 | pci_user_write_config_dword(dev, pos, le32_to_cpu(val)); |
171 | buf += 4; | 171 | buf += 4; |
172 | pos += 4; | 172 | pos += 4; |
@@ -174,8 +174,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof | |||
174 | } | 174 | } |
175 | 175 | ||
176 | if (cnt >= 2) { | 176 | if (cnt >= 2) { |
177 | unsigned short val; | 177 | __le16 val; |
178 | __get_user(val, (unsigned short __user *) buf); | 178 | __get_user(val, (__le16 __user *) buf); |
179 | pci_user_write_config_word(dev, pos, le16_to_cpu(val)); | 179 | pci_user_write_config_word(dev, pos, le16_to_cpu(val)); |
180 | buf += 2; | 180 | buf += 2; |
181 | pos += 2; | 181 | pos += 2; |