* [PATCH] Cypress WestBridge OMAP3430 Kernel Hal: Remove unneeded local variables from alloc functions
@ 2010-11-07 6:37 Jesper Juhl
2010-11-08 18:54 ` David Cross
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2010-11-07 6:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, David Cross
Hi,
In
drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c
the local variables 'ret_p' are not needed and should just go away.
I have no way to test this code, but I believe the change is obviously
correct. Please consider it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
cyashalomap_kernel.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c
index a678029..ad0c61d 100644
--- a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c
+++ b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c
@@ -2127,10 +2127,7 @@ void cy_as_hal_pll_lock_loss_handler(cy_as_hal_device_tag tag)
*/
void *cy_as_hal_alloc(uint32_t cnt)
{
- void *ret_p;
-
- ret_p = kmalloc(cnt, GFP_ATOMIC);
- return ret_p;
+ return kmalloc(cnt, GFP_ATOMIC);
}
/*
@@ -2150,10 +2147,7 @@ void cy_as_hal_free(void *mem_p)
*/
void *cy_as_hal_c_b_alloc(uint32_t cnt)
{
- void *ret_p;
-
- ret_p = kmalloc(cnt, GFP_ATOMIC);
- return ret_p;
+ return kmalloc(cnt, GFP_ATOMIC);
}
/*
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Plain text mails only, please http://www.expita.com/nomime.html
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] Cypress WestBridge OMAP3430 Kernel Hal: Remove unneeded local variables from alloc functions
2010-11-07 6:37 [PATCH] Cypress WestBridge OMAP3430 Kernel Hal: Remove unneeded local variables from alloc functions Jesper Juhl
@ 2010-11-08 18:54 ` David Cross
0 siblings, 0 replies; 2+ messages in thread
From: David Cross @ 2010-11-08 18:54 UTC (permalink / raw)
To: 'Jesper Juhl', linux-kernel; +Cc: 'Greg Kroah-Hartman'
> In
> drivers/staging/westbridge/astoria/arch/arm/mach->
omap2/cyashalomap_kernel.c
> the local variables 'ret_p' are not needed and should just go away.
> I have no way to test this code, but I believe the change is obviously
> correct. Please consider it.
I agree. ACK. thanks for the review.
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
> cyashalomap_kernel.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
> diff --git
a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.
c
b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.
c
> index a678029..ad0c61d 100644
> ---
a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.
c
> +++
b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.
c
> @@ -2127,10 +2127,7 @@ void
cy_as_hal_pll_lock_loss_handler(cy_as_hal_device_tag tag)
> */
> void *cy_as_hal_alloc(uint32_t cnt)
> {
> - void *ret_p;
> -
> - ret_p = kmalloc(cnt, GFP_ATOMIC);
> - return ret_p;
> + return kmalloc(cnt, GFP_ATOMIC);
> }
>
> /*
> @@ -2150,10 +2147,7 @@ void cy_as_hal_free(void *mem_p)
> */
> void *cy_as_hal_c_b_alloc(uint32_t cnt)
> {
> - void *ret_p;
> -
> - ret_p = kmalloc(cnt, GFP_ATOMIC);
> - return ret_p;
> + return kmalloc(cnt, GFP_ATOMIC);
> }
>
> /*
>
>
> --
> Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
> Plain text mails only, please http://www.expita.com/nomime.html
> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-08 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-07 6:37 [PATCH] Cypress WestBridge OMAP3430 Kernel Hal: Remove unneeded local variables from alloc functions Jesper Juhl
2010-11-08 18:54 ` David Cross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).