* [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc()
@ 2015-06-16 7:09 Abdul, Hussain (H.)
2015-06-17 2:18 ` gregkh
0 siblings, 1 reply; 5+ messages in thread
From: Abdul, Hussain (H.) @ 2015-06-16 7:09 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Ravindran, Madhusudhanan (M.),
Dighe, Niranjan (N.),
johnny.kim, rachel.kim, dean.lee, chris.park, linux-wireless
From: Abdul Hussain <habdul@visteon.com>
This patch removes casting the values returned by memory allocation functions.
Signed-off-by: Abdul Hussain <habdul@visteon.com>
---
drivers/staging/wilc1000/linux_mon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index d5860ce..8cba13c 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -247,7 +247,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
nic = netdev_priv(dev);
netif_stop_queue(dev);
- mgmt_tx = (struct tx_complete_mon_data *)kmalloc(sizeof(struct tx_complete_mon_data), GFP_ATOMIC);
+ mgmt_tx = kmalloc(sizeof(struct tx_complete_mon_data), GFP_ATOMIC);
if (mgmt_tx == NULL) {
PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
return WILC_FAIL;
@@ -258,7 +258,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
len += sizeof(struct tx_complete_mon_data *);
#endif
- mgmt_tx->buff = (char *)kmalloc(len, GFP_ATOMIC);
+ mgmt_tx->buff = kmalloc(len, GFP_ATOMIC);
if (mgmt_tx->buff == NULL) {
PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
return WILC_FAIL;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc()
2015-06-16 7:09 [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc() Abdul, Hussain (H.)
@ 2015-06-17 2:18 ` gregkh
2015-06-17 4:42 ` Abdul, Hussain (H.)
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2015-06-17 2:18 UTC (permalink / raw)
To: Abdul, Hussain (H.)
Cc: devel, Dighe, Niranjan (N.),
chris.park, Ravindran, Madhusudhanan (M.),
linux-wireless, linux-kernel, johnny.kim, rachel.kim, dean.lee
On Tue, Jun 16, 2015 at 07:09:56AM +0000, Abdul, Hussain (H.) wrote:
> From: Abdul Hussain <habdul@visteon.com>
>
> This patch removes casting the values returned by memory allocation functions.
>
> Signed-off-by: Abdul Hussain <habdul@visteon.com>
> ---
> drivers/staging/wilc1000/linux_mon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Does not apply :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc()
2015-06-17 2:18 ` gregkh
@ 2015-06-17 4:42 ` Abdul, Hussain (H.)
0 siblings, 0 replies; 5+ messages in thread
From: Abdul, Hussain (H.) @ 2015-06-17 4:42 UTC (permalink / raw)
To: gregkh
Cc: devel, Dighe, Niranjan (N.),
chris.park, Ravindran, Madhusudhanan (M.),
linux-wireless, linux-kernel, johnny.kim, rachel.kim, dean.lee
On Wednesday 17 June 2015 07:48 AM, gregkh@linuxfoundation.org wrote:
> On Tue, Jun 16, 2015 at 07:09:56AM +0000, Abdul, Hussain (H.) wrote:
>> From: Abdul Hussain <habdul@visteon.com>
>>
>> This patch removes casting the values returned by memory allocation functions.
>>
>> Signed-off-by: Abdul Hussain <habdul@visteon.com>
>> ---
>> drivers/staging/wilc1000/linux_mon.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
> Does not apply :(
>
Greg,
I will verify and resend the patch.
Thanks,
Abdul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc()
2015-06-16 7:10 Abdul, Hussain (H.)
@ 2015-06-17 2:18 ` gregkh
0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2015-06-17 2:18 UTC (permalink / raw)
To: Abdul, Hussain (H.)
Cc: devel, Dighe, Niranjan (N.),
chris.park, Ravindran, Madhusudhanan (M.),
linux-wireless, linux-kernel, johnny.kim, rachel.kim, dean.lee
On Tue, Jun 16, 2015 at 07:10:28AM +0000, Abdul, Hussain (H.) wrote:
> From: Abdul Hussain <habdul@visteon.com>
>
> This patch removes casting the values returned by memory allocation functions.
>
> Signed-off-by: Abdul Hussain <habdul@visteon.com>
> ---
> drivers/staging/wilc1000/linux_wlan.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Does not apply :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc()
@ 2015-06-16 7:10 Abdul, Hussain (H.)
2015-06-17 2:18 ` gregkh
0 siblings, 1 reply; 5+ messages in thread
From: Abdul, Hussain (H.) @ 2015-06-16 7:10 UTC (permalink / raw)
To: gregkh
Cc: devel, linux-kernel, Ravindran, Madhusudhanan (M.),
Dighe, Niranjan (N.),
johnny.kim, rachel.kim, dean.lee, chris.park, linux-wireless
From: Abdul Hussain <habdul@visteon.com>
This patch removes casting the values returned by memory allocation functions.
Signed-off-by: Abdul Hussain <habdul@visteon.com>
---
drivers/staging/wilc1000/linux_wlan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 5f87148..c1e9272 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -580,7 +580,7 @@ static void linux_wlan_dbg(uint8_t *buff)
static void *linux_wlan_malloc_atomic(uint32_t sz)
{
char *pntr = NULL;
- pntr = (char *)kmalloc(sz, GFP_ATOMIC);
+ pntr = kmalloc(sz, GFP_ATOMIC);
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
return (void *)pntr;
@@ -588,7 +588,7 @@ static void *linux_wlan_malloc_atomic(uint32_t sz)
static void *linux_wlan_malloc(uint32_t sz)
{
char *pntr = NULL;
- pntr = (char *)kmalloc(sz, GFP_KERNEL);
+ pntr = kmalloc(sz, GFP_KERNEL);
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", sz, pntr);
return (void *)pntr;
}
@@ -605,7 +605,7 @@ void linux_wlan_free(void *vp)
static void *internal_alloc(uint32_t size, uint32_t flag)
{
char *pntr = NULL;
- pntr = (char *)kmalloc(size, flag);
+ pntr = kmalloc(size, flag);
PRINT_D(MEM_DBG, "Allocating %d bytes at address %p\n", size, pntr);
return (void *)pntr;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-17 4:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 7:09 [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc() Abdul, Hussain (H.)
2015-06-17 2:18 ` gregkh
2015-06-17 4:42 ` Abdul, Hussain (H.)
2015-06-16 7:10 Abdul, Hussain (H.)
2015-06-17 2:18 ` gregkh
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.