Re: [PATCH 1/2] Remove all users of cpu_to_{le|be}{16|32|64}p

Previous thread: [PATCH] Firmware loader driver for USB Apple iSight camera by Matthew Garrett on Tuesday, May 20, 2008 - 12:06 pm. (6 messages)

Next thread: [PATCH 2/2] byteorder: eliminate pointer bytorder api by Harvey Harrison on Tuesday, May 20, 2008 - 12:24 pm. (7 messages)
From: Harvey Harrison
Date: Tuesday, May 20, 2008 - 12:24 pm

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
akpm: applies on top of the 21-patch aligned get/put helpers series.

 arch/sparc64/lib/PeeCeeI.c      |   16 ++++++++--------
 drivers/i2c/busses/i2c-pmcmsp.c |    2 +-
 drivers/isdn/hisax/st5481_usb.c |    4 ++--
 drivers/net/usb/kaweth.c        |    6 +++---
 drivers/net/usb/pegasus.c       |   12 ++++++------
 drivers/usb/class/cdc-acm.c     |    5 +++--
 drivers/usb/core/message.c      |    6 +++---
 drivers/usb/gadget/net2280.c    |    2 +-
 drivers/usb/host/ohci.h         |    8 ++------
 9 files changed, 29 insertions(+), 32 deletions(-)

diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c
index f85a50f..a00686f 100644
--- a/arch/sparc64/lib/PeeCeeI.c
+++ b/arch/sparc64/lib/PeeCeeI.c
@@ -55,7 +55,7 @@ void outsl(unsigned long __addr, const void *src, unsigned long count)
 		if ((((u64)src) & 0x3) == 0) {
 			u32 *p = (u32 *)src;
 			while (count--) {
-				u32 val = cpu_to_le32p(p);
+				u32 val = cpu_to_le32(*p);
 				outl(val, addr);
 				p++;
 			}
@@ -68,17 +68,17 @@ void outsl(unsigned long __addr, const void *src, unsigned long count)
 			switch (((u64)src) & 0x3) {
 			case 0x2:
 				count -= 1;
-				l = cpu_to_le16p(ps) << 16;
+				l = cpu_to_le16(*ps) << 16;
 				ps++;
 				pi = (u32 *)ps;
 				while (count--) {
-					l2 = cpu_to_le32p(pi);
+					l2 = cpu_to_le32(*pi);
 					pi++;
 					outl(((l >> 16) | (l2 << 16)), addr);
 					l = l2;
 				}
 				ps = (u16 *)pi;
-				l2 = cpu_to_le16p(ps);
+				l2 = cpu_to_le16(*ps);
 				outl(((l >> 16) | (l2 << 16)), addr);
 				break;
 
@@ -87,12 +87,12 @@ void outsl(unsigned long __addr, const void *src, unsigned long count)
 				pb = (u8 *)src;
 				l = (*pb++ << 8);
 				ps = (u16 *)pb;
-				l2 = cpu_to_le16p(ps);
+				l2 = cpu_to_le16(*ps);
 				ps++;
 				l |= (l2 << 16);
 				pi = (u32 *)ps;
 				while (count--) {
-					l2 = cpu_to_le32p(pi);
+					l2 = cpu_to_le32(*pi);
 					pi++;
 					outl(((l >> 8) | (l2 ...
From: David Miller
Date: Tuesday, May 20, 2008 - 2:16 pm

From: Harvey Harrison <harvey.harrison@gmail.com>

Can you provide some contextual information in the changelog
message?

Why are the cpu_to_*p() uses going away?  Do the normal cpu_to_*() now
transparently emit the special other-endian loads and stores some
cpus?

You should always describe such things in your changelog message so
people don't need to ask these kinds of questions.
--

From: Paul Mackerras
Date: Tuesday, May 20, 2008 - 6:13 pm

Please don't do this, because it means we don't get to use the
byte-reversing loads and stores on powerpc, and end up using several
instructions instead of one.

Paul.
--

Previous thread: [PATCH] Firmware loader driver for USB Apple iSight camera by Matthew Garrett on Tuesday, May 20, 2008 - 12:06 pm. (6 messages)

Next thread: [PATCH 2/2] byteorder: eliminate pointer bytorder api by Harvey Harrison on Tuesday, May 20, 2008 - 12:24 pm. (7 messages)