remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
/* Allocate log structure plus actual signal. */
- logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
+ logptr = kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
if (logptr == NULL) {
printk(KERN_ERR
}
/* Allocate log structure plus actual signal. */
- logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + length, GFP_ATOMIC);
+ logptr = kmalloc(sizeof(udi_log_t) + length, GFP_ATOMIC);
if (logptr == NULL) {
unifi_error(priv, "Failed to allocate %d bytes for an SME message\n",
sizeof(udi_log_t) + length);
rx_buffered_packets_t *rx_q_item;
struct list_head *rx_list;
- rx_q_item = (rx_buffered_packets_t *)kmalloc(sizeof(rx_buffered_packets_t),
+ rx_q_item = kmalloc(sizeof(rx_buffered_packets_t),
GFP_KERNEL);
if (rx_q_item == NULL) {
unifi_error(priv, "%s: Failed to allocate %d bytes for rx packet record\n",
sdio_func_id(func), instance);
/* Allocate context */
- sdio_ctx = (CsrSdioFunction *)kmalloc(sizeof(CsrSdioFunction),
- GFP_KERNEL);
+ sdio_ctx = kmalloc(sizeof(CsrSdioFunction), GFP_KERNEL);
if (sdio_ctx == NULL) {
sdio_release_host(func);
return -ENOMEM;
}
/* Allocate log structure plus actual signal. */
- logptr = (udi_log_t *)kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
+ logptr = kmalloc(sizeof(udi_log_t) + total_len, GFP_KERNEL);
if (logptr == NULL) {
unifi_error(priv,
- tx_q_item = (tx_buffered_packets_t *)kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
+ tx_q_item = kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
if (tx_q_item == NULL) {
unifi_error(priv,
"Failed to allocate %d bytes for tx packet record\n",
{
tx_buffered_packets_t *send_cfm_list_item = NULL;
- send_cfm_list_item = (tx_buffered_packets_t *) kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
+ send_cfm_list_item = kmalloc(sizeof(tx_buffered_packets_t), GFP_ATOMIC);
if(send_cfm_list_item == NULL){
unifi_warning(priv, "%s: Failed to allocate memory for new list item \n");