* [PATCH] ARM: davinci: Remove redundant casts
@ 2014-10-21 14:53 ` Rasmus Villemoes
0 siblings, 0 replies; 6+ messages in thread
From: Rasmus Villemoes @ 2014-10-21 14:53 UTC (permalink / raw)
To: Sekhar Nori, Russell King
Cc: davinci-linux-open-source, linux-arm-kernel, linux-kernel,
Rasmus Villemoes
These casts to char* are unnecessary and slightly confusing, since
both operands actually have type const char*.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
arch/arm/mach-davinci/board-da850-evm.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index fa11415..6b5a97d 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -452,8 +452,7 @@ static void da850_evm_ui_keys_init(unsigned gpio)
for (i = 0; i < DA850_N_UI_PB; i++) {
button = &da850_evm_ui_keys[i];
button->code = KEY_F8 - i;
- button->desc = (char *)
- da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
+ button->desc = da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
button->gpio = gpio + DA850_EVM_UI_EXP_PB8 + i;
}
}
@@ -628,15 +627,13 @@ static void da850_evm_bb_keys_init(unsigned gpio)
struct gpio_keys_button *button;
button = &da850_evm_bb_keys[0];
- button->desc = (char *)
- da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
+ button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
button->gpio = gpio + DA850_EVM_BB_EXP_USER_PB1;
for (i = 0; i < DA850_N_BB_USER_SW; i++) {
button = &da850_evm_bb_keys[i + 1];
button->code = SW_LID + i;
- button->desc = (char *)
- da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
+ button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
button->gpio = gpio + DA850_EVM_BB_EXP_USER_SW1 + i;
}
}
--
2.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: davinci: Remove redundant casts
@ 2014-10-21 14:53 ` Rasmus Villemoes
0 siblings, 0 replies; 6+ messages in thread
From: Rasmus Villemoes @ 2014-10-21 14:53 UTC (permalink / raw)
To: linux-arm-kernel
These casts to char* are unnecessary and slightly confusing, since
both operands actually have type const char*.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
arch/arm/mach-davinci/board-da850-evm.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index fa11415..6b5a97d 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -452,8 +452,7 @@ static void da850_evm_ui_keys_init(unsigned gpio)
for (i = 0; i < DA850_N_UI_PB; i++) {
button = &da850_evm_ui_keys[i];
button->code = KEY_F8 - i;
- button->desc = (char *)
- da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
+ button->desc = da850_evm_ui_exp[DA850_EVM_UI_EXP_PB8 + i];
button->gpio = gpio + DA850_EVM_UI_EXP_PB8 + i;
}
}
@@ -628,15 +627,13 @@ static void da850_evm_bb_keys_init(unsigned gpio)
struct gpio_keys_button *button;
button = &da850_evm_bb_keys[0];
- button->desc = (char *)
- da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
+ button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_PB1];
button->gpio = gpio + DA850_EVM_BB_EXP_USER_PB1;
for (i = 0; i < DA850_N_BB_USER_SW; i++) {
button = &da850_evm_bb_keys[i + 1];
button->code = SW_LID + i;
- button->desc = (char *)
- da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
+ button->desc = da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_SW1 + i];
button->gpio = gpio + DA850_EVM_BB_EXP_USER_SW1 + i;
}
}
--
2.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: davinci: Remove redundant casts
2014-10-21 14:53 ` Rasmus Villemoes
@ 2014-10-21 16:10 ` Sergei Shtylyov
-1 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-21 16:10 UTC (permalink / raw)
To: Rasmus Villemoes, Sekhar Nori, Russell King
Cc: davinci-linux-open-source, linux-kernel, linux-arm-kernel
Hello.
On 10/21/2014 06:53 PM, Rasmus Villemoes wrote:
> These casts to char* are unnecessary and slightly confusing, since
> both operands actually have type const char*.
Both operands of what? Typecast only has 1 operand. :-)
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: davinci: Remove redundant casts
@ 2014-10-21 16:10 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-10-21 16:10 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 10/21/2014 06:53 PM, Rasmus Villemoes wrote:
> These casts to char* are unnecessary and slightly confusing, since
> both operands actually have type const char*.
Both operands of what? Typecast only has 1 operand. :-)
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: davinci: Remove redundant casts
2014-10-21 16:10 ` Sergei Shtylyov
@ 2014-11-18 15:53 ` Sekhar Nori
-1 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2014-11-18 15:53 UTC (permalink / raw)
To: Sergei Shtylyov, Rasmus Villemoes, Russell King
Cc: linux-kernel, linux-arm-kernel
On Tuesday 21 October 2014 09:40 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 10/21/2014 06:53 PM, Rasmus Villemoes wrote:
>
>> These casts to char* are unnecessary and slightly confusing, since
>> both operands actually have type const char*.
>
> Both operands of what? Typecast only has 1 operand. :-)
Queuing this with this description:
"
Remove unnecessary casts to char*. Both operands of the
assignment actually have type const char*.
"
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: davinci: Remove redundant casts
@ 2014-11-18 15:53 ` Sekhar Nori
0 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2014-11-18 15:53 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 21 October 2014 09:40 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 10/21/2014 06:53 PM, Rasmus Villemoes wrote:
>
>> These casts to char* are unnecessary and slightly confusing, since
>> both operands actually have type const char*.
>
> Both operands of what? Typecast only has 1 operand. :-)
Queuing this with this description:
"
Remove unnecessary casts to char*. Both operands of the
assignment actually have type const char*.
"
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-18 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 14:53 [PATCH] ARM: davinci: Remove redundant casts Rasmus Villemoes
2014-10-21 14:53 ` Rasmus Villemoes
2014-10-21 16:10 ` Sergei Shtylyov
2014-10-21 16:10 ` Sergei Shtylyov
2014-11-18 15:53 ` Sekhar Nori
2014-11-18 15:53 ` Sekhar Nori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.