Skip to contentSkip to conversation

linux-next: build warnings after merge of the input tree

PATCH New Stephen Rothwell 2 participants 2 messages May 20, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Dmitry,

After merging the input tree, today's linux-next build (powerpc allyesconfig) produced these warnings:

drivers/input/touchscreen/atmel_mxt_ts.c: In function 'mxt_read_t9_resolution':
drivers/input/touchscreen/atmel_mxt_ts.c:1043:2: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [enabled by default]
le16_to_cpus(range.x);
^
In file included from include/linux/swab.h:4:0,
from include/uapi/linux/byteorder/big_endian.h:12,
from include/linux/byteorder/big_endian.h:4,
from arch/powerpc/include/uapi/asm/byteorder.h:13,
from include/asm-generic/bitops/le.h:5,
from arch/powerpc/include/asm/bitops.h:279,
from include/linux/bitops.h:33,
from include/linux/kernel.h:10,
from include/asm-generic/bug.h:13,
from arch/powerpc/include/asm/bug.h:127,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/input/touchscreen/atmel_mxt_ts.c:16:
include/uapi/linux/swab.h:223:20: note: expected '__u16 *' but argument is of type 'u16'
static inline void __swab16s(__u16 *p)

                    ^

drivers/input/touchscreen/atmel_mxt_ts.c:1044:2: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [enabled by default]
le16_to_cpus(range.y);
^
In file included from include/linux/swab.h:4:0,
from include/uapi/linux/byteorder/big_endian.h:12,
from include/linux/byteorder/big_endian.h:4,
from arch/powerpc/include/uapi/asm/byteorder.h:13,
from include/asm-generic/bitops/le.h:5,
from arch/powerpc/include/asm/bitops.h:279,
from include/linux/bitops.h:33,
from include/linux/kernel.h:10,
from include/asm-generic/bug.h:13,
from arch/powerpc/include/asm/bug.h:127,
from include/linux/bug.h:4,
from include/linux/thread_info.h:11,
from include/asm-generic/preempt.h:4,
from arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from drivers/input/touchscreen/atmel_mxt_ts.c:16:
include/uapi/linux/swab.h:223:20: note: expected '__u16 *' but argument is of type 'u16'
static inline void __swab16s(__u16 *p)

                    ^

Introduced by commit de22385758fa ("Input: atmel_mxt_ts - read screen config from chip").

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw

PATCH 1/1 Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution

From: Nick Dyer <[email protected]>

Stephen Rothwell reports this build error:

drivers/input/touchscreen/atmel_mxt_ts.c: In function 'mxt_read_t9_resolution':
drivers/input/touchscreen/atmel_mxt_ts.c:1043:2: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [enabled by default]
le16_to_cpus(range.x);
^

I believe this is a correct fix.

---
 drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/touchscreen/atmel_mxt_ts.c +2 -2
index d8ea3ed..97495c7 100644
@@ -1040,8 +1040,8 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
 	if (error)
 		return error;
 
-	le16_to_cpus(range.x);
-	le16_to_cpus(range.y);
+	le16_to_cpus(&range.x);
+	le16_to_cpus(&range.y);
 
 	error =  __mxt_read_reg(client,
 				object->start_address + MXT_T9_ORIENT,
Signature · 1 line
1.8.3.2