Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Vicentiu Ciorbaru
>> My reasoning behind the patch is that the C standard does not require a >> specific cast of a void pointer in order to set it to the type of the >> member gpr_map of the struct snd_emu10k1_fx8010_code. I named it redundant >> because the compiler would cast to it anyway. > > That's correct as

Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Clemens Ladisch
Vicentiu Ciorbaru wrote: > On Sun, Mar 10, 2013 at 6:32 PM, Clemens Ladisch wrote: >> Vicentiu Ciorbaru wrote: >>> Removed redundant cast of kmalloc return pointer. >> >>> - (icode->gpr_map = (u_int32_t __user *) >>> - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), >>> -

Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Clemens Ladisch
Vicentiu Ciorbaru wrote: > Removed redundant cast of kmalloc return pointer. > - (icode->gpr_map = (u_int32_t __user *) > - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), > - GFP_KERNEL)) == NULL || > + (icode->gpr_map = kcalloc(512 + 256 + 256 +

[PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Vicentiu Ciorbaru
Removed redundant cast of kmalloc return pointer. Signed-off-by: Vicentiu Ciorbaru --- sound/pci/emu10k1/emufx.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 0275209..a0f7502 100644 ---

[PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Vicentiu Ciorbaru
Removed redundant cast of kmalloc return pointer. Signed-off-by: Vicentiu Ciorbaru cvicen...@gmail.com --- sound/pci/emu10k1/emufx.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 0275209..a0f7502 100644 ---

Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Clemens Ladisch
Vicentiu Ciorbaru wrote: Removed redundant cast of kmalloc return pointer. - (icode-gpr_map = (u_int32_t __user *) - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), - GFP_KERNEL)) == NULL || + (icode-gpr_map = kcalloc(512 + 256 + 256 + 2 *

Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Clemens Ladisch
Vicentiu Ciorbaru wrote: On Sun, Mar 10, 2013 at 6:32 PM, Clemens Ladisch clem...@ladisch.de wrote: Vicentiu Ciorbaru wrote: Removed redundant cast of kmalloc return pointer. - (icode-gpr_map = (u_int32_t __user *) - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), -

Re: [PATCH] emu10k1: Fix coccicheck warning

2013-03-10 Thread Vicentiu Ciorbaru
My reasoning behind the patch is that the C standard does not require a specific cast of a void pointer in order to set it to the type of the member gpr_map of the struct snd_emu10k1_fx8010_code. I named it redundant because the compiler would cast to it anyway. That's correct as far as the