* Re: [PATCH] Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution
[not found] <1400578011-20635-1-git-send-email-nick.dyer@itdev.co.uk>
@ 2014-05-27 2:09 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-05-27 2:09 UTC (permalink / raw)
Cc: sfr, linux-next, linux-kernel, Nick Dyer
On Tue, May 20, 2014 at 10:26:51AM +0100, Nick Dyer wrote:
> 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.
>
> Signed-off-by: Nick Dyer <nick.dyer@itdev•co.uk>
> ---
> drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index d8ea3ed..97495c7 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -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,
> --
> 1.8.3.2
>
Thank you, I folded it into the offending patch.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
* linux-next: build warnings after merge of the input tree
@ 2014-05-20 7:45 Stephen Rothwell
2014-05-20 9:54 ` [PATCH] Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution nick.dyer
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2014-05-20 7:45 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-next, linux-kernel, Nick Dyer
[-- Attachment #1: Type: text/plain, Size: 3402 bytes --]
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").
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution
2014-05-20 7:45 linux-next: build warnings after merge of the input tree Stephen Rothwell
@ 2014-05-20 9:54 ` nick.dyer
0 siblings, 0 replies; 2+ messages in thread
From: nick.dyer @ 2014-05-20 9:54 UTC (permalink / raw)
To: sfr, dmitry.torokhov; +Cc: linux-next, linux-kernel, Nick Dyer
From: Nick Dyer <nick.dyer@itdev•co.uk>
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.
Signed-off-by: Nick Dyer <nick.dyer@itdev•co.uk>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index d8ea3ed..97495c7 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -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,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-27 2:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1400578011-20635-1-git-send-email-nick.dyer@itdev.co.uk>
2014-05-27 2:09 ` [PATCH] Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution Dmitry Torokhov
2014-05-20 7:45 linux-next: build warnings after merge of the input tree Stephen Rothwell
2014-05-20 9:54 ` [PATCH] Input: atmel_mxt_ts - fix build error in mxt_read_t9_resolution nick.dyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox