public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: proc.c sparse endian annotations
@ 2008-07-17 22:57 Harvey Harrison
  2008-07-22 21:37 ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Harvey Harrison @ 2008-07-17 22:57 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Andrew Morton, LKML

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>
---
Patch against next-20080717

 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 7e2bd7e..c8eb11c 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
 	if ((pos & 3) && cnt > 2) {
 		unsigned short val;
 		pci_user_read_config_word(dev, pos, &val);
-		__put_user(cpu_to_le16(val), (unsigned short __user *) buf);
+		__put_user(cpu_to_le16(val), (__le16 __user *) buf);
 		buf += 2;
 		pos += 2;
 		cnt -= 2;
@@ -97,7 +97,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
 	while (cnt >= 4) {
 		unsigned int val;
 		pci_user_read_config_dword(dev, pos, &val);
-		__put_user(cpu_to_le32(val), (unsigned int __user *) buf);
+		__put_user(cpu_to_le32(val), (__le32 __user *) buf);
 		buf += 4;
 		pos += 4;
 		cnt -= 4;
@@ -106,7 +106,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
 	if (cnt >= 2) {
 		unsigned short val;
 		pci_user_read_config_word(dev, pos, &val);
-		__put_user(cpu_to_le16(val), (unsigned short __user *) buf);
+		__put_user(cpu_to_le16(val), (__le16 __user *) buf);
 		buf += 2;
 		pos += 2;
 		cnt -= 2;
@@ -156,8 +156,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	if ((pos & 3) && cnt > 2) {
-		unsigned short val;
-		__get_user(val, (unsigned short __user *) buf);
+		__le16 val;
+		__get_user(val, (__le16 __user *) buf);
 		pci_user_write_config_word(dev, pos, le16_to_cpu(val));
 		buf += 2;
 		pos += 2;
@@ -165,8 +165,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	while (cnt >= 4) {
-		unsigned int val;
-		__get_user(val, (unsigned int __user *) buf);
+		__le32 val;
+		__get_user(val, (__le32 __user *) buf);
 		pci_user_write_config_dword(dev, pos, le32_to_cpu(val));
 		buf += 4;
 		pos += 4;
@@ -174,8 +174,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	if (cnt >= 2) {
-		unsigned short val;
-		__get_user(val, (unsigned short __user *) buf);
+		__le16 val;
+		__get_user(val, (__le16 __user *) buf);
 		pci_user_write_config_word(dev, pos, le16_to_cpu(val));
 		buf += 2;
 		pos += 2;
-- 
1.5.6.3.569.ga9185




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] pci: proc.c sparse endian annotations
  2008-07-17 22:57 [PATCH] pci: proc.c sparse endian annotations Harvey Harrison
@ 2008-07-22 21:37 ` Jesse Barnes
  2008-07-22 21:40   ` Harvey Harrison
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Barnes @ 2008-07-22 21:37 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Andrew Morton, LKML

On Thursday, July 17, 2008 3:57 pm Harvey Harrison wrote:
> 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>
> ---
> Patch against next-20080717
>
>  drivers/pci/proc.c |   18 +++++++++---------
>  1 files changed, 9 insertions(+), 9 deletions(-)

Somehow this patch came across with htmlish junk in it, care to resend?

Thanks,
Jesse

diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 7e2bd7e..c8eb11c 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, si=
ze_t nbytes, loff_t *pp
        if ((pos & 3) && cnt > 2) {
                unsigned short val;
                pci_user_read_config_word(dev, pos, &val);
-               __put_user(cpu_to_le16(val), (unsigned short __user *) buf)=
;
+               __put_user(cpu_to_le16(val), (__le16 __user *) buf);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] pci: proc.c sparse endian annotations
  2008-07-22 21:37 ` Jesse Barnes
@ 2008-07-22 21:40   ` Harvey Harrison
  2008-07-22 22:18     ` Jesse Barnes
  2008-07-22 22:20     ` Jesse Barnes
  0 siblings, 2 replies; 5+ messages in thread
From: Harvey Harrison @ 2008-07-22 21:40 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Andrew Morton, LKML

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>
---
 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 7e2bd7e..c8eb11c 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
 	if ((pos & 3) && cnt > 2) {
 		unsigned short val;
 		pci_user_read_config_word(dev, pos, &val);
-		__put_user(cpu_to_le16(val), (unsigned short __user *) buf);
+		__put_user(cpu_to_le16(val), (__le16 __user *) buf);
 		buf += 2;
 		pos += 2;
 		cnt -= 2;
@@ -97,7 +97,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
 	while (cnt >= 4) {
 		unsigned int val;
 		pci_user_read_config_dword(dev, pos, &val);
-		__put_user(cpu_to_le32(val), (unsigned int __user *) buf);
+		__put_user(cpu_to_le32(val), (__le32 __user *) buf);
 		buf += 4;
 		pos += 4;
 		cnt -= 4;
@@ -106,7 +106,7 @@ proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pp
 	if (cnt >= 2) {
 		unsigned short val;
 		pci_user_read_config_word(dev, pos, &val);
-		__put_user(cpu_to_le16(val), (unsigned short __user *) buf);
+		__put_user(cpu_to_le16(val), (__le16 __user *) buf);
 		buf += 2;
 		pos += 2;
 		cnt -= 2;
@@ -156,8 +156,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	if ((pos & 3) && cnt > 2) {
-		unsigned short val;
-		__get_user(val, (unsigned short __user *) buf);
+		__le16 val;
+		__get_user(val, (__le16 __user *) buf);
 		pci_user_write_config_word(dev, pos, le16_to_cpu(val));
 		buf += 2;
 		pos += 2;
@@ -165,8 +165,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	while (cnt >= 4) {
-		unsigned int val;
-		__get_user(val, (unsigned int __user *) buf);
+		__le32 val;
+		__get_user(val, (__le32 __user *) buf);
 		pci_user_write_config_dword(dev, pos, le32_to_cpu(val));
 		buf += 4;
 		pos += 4;
@@ -174,8 +174,8 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof
 	}
 
 	if (cnt >= 2) {
-		unsigned short val;
-		__get_user(val, (unsigned short __user *) buf);
+		__le16 val;
+		__get_user(val, (__le16 __user *) buf);
 		pci_user_write_config_word(dev, pos, le16_to_cpu(val));
 		buf += 2;
 		pos += 2;
-- 
1.5.6.3.569.ga9185




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] pci: proc.c sparse endian annotations
  2008-07-22 21:40   ` Harvey Harrison
@ 2008-07-22 22:18     ` Jesse Barnes
  2008-07-22 22:20     ` Jesse Barnes
  1 sibling, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2008-07-22 22:18 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Andrew Morton, LKML

On Tuesday, July 22, 2008 2:40 pm Harvey Harrison wrote:
> 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>

Silly me.  I thought it was your mailer corrupting things but of course it was 
the Exchange server for my @intel.com address.  I have no idea why Exchange 
finds text so difficult to handle text without molesting it, but there you 
go.  I'll grab your patch from my lkml mailbox, which necessarily gets routed 
to my virtuousgeek.org addr.

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pci: proc.c sparse endian annotations
  2008-07-22 21:40   ` Harvey Harrison
  2008-07-22 22:18     ` Jesse Barnes
@ 2008-07-22 22:20     ` Jesse Barnes
  1 sibling, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2008-07-22 22:20 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Andrew Morton, LKML

On Tuesday, July 22, 2008 2:40 pm Harvey Harrison wrote:
> 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>

Applied to for-linus, thanks.

Jesse

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-22 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 22:57 [PATCH] pci: proc.c sparse endian annotations Harvey Harrison
2008-07-22 21:37 ` Jesse Barnes
2008-07-22 21:40   ` Harvey Harrison
2008-07-22 22:18     ` Jesse Barnes
2008-07-22 22:20     ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox