Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756088AbbFPHKF (ORCPT ); Tue, 16 Jun 2015 03:10:05 -0400 Received: from mail-db3on0118.outbound.protection.outlook.com ([157.55.234.118]:55068 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752876AbbFPHJ7 convert rfc822-to-8bit (ORCPT ); Tue, 16 Jun 2015 03:09:59 -0400 From: "Abdul, Hussain (H.)" To: "gregkh@linuxfoundation.org" CC: "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "Ravindran, Madhusudhanan (M.)" , "Dighe, Niranjan (N.)" , "johnny.kim@atmel.com" , "rachel.kim@atmel.com" , "dean.lee@atmel.com" , "chris.park@atmel.com" , "linux-wireless@vger.kernel.org" Subject: [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc() Thread-Topic: [PATCH] Staging: wilc1000: Remove casting the values returned by kmalloc() Thread-Index: AQHQqANzGty6SAb2AUahpHgiJY9PxA== Date: Tue, 16 Jun 2015 07:09:56 +0000 Message-ID: <1434438514-5247-1-git-send-email-habdul@visteon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 1.9.1 authentication-results: linuxfoundation.org; dkim=none (message not signed) header.d=none; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [74.112.167.117] x-microsoft-exchange-diagnostics: 1;DB5PR06MB1109;3:YfJRvWYxnZ5LsgxaAdLla5mbTWvOweJVs2uGce4B1ErMeBNrT4D+t98axivi8quBXuMKtsGhyPFy8ATMVtIUrhpJL/sTXLpMVMn6OtGOOgKtCL5EtRztUKYMkpElEFfAW4PdaYmOKUnNg/p/X6zqlg==;10:LLAKn32EnfOaNLf1/IH63hhzr0bQSyhKKy7nNAMl1igygDfUzcHmo3uqw0nGCzHqixX1sEPTd00JAOlyge1TJA8+E3eTNOj9EnNFOGqXuxE=;6:xhMlzzvFmpPcoY7gC+PWsQrLpqjO3EePLl6ypEjIt0kwjH0K1/seKkv51o5ocahc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR06MB1109; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:DB5PR06MB1109;BCL:0;PCL:0;RULEID:;SRVR:DB5PR06MB1109; x-forefront-prvs: 06098A2863 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(110136002)(5001920100001)(189998001)(2501003)(5002640100001)(229853001)(50226001)(40100003)(33646002)(122556002)(92566002)(36756003)(62966003)(106116001)(2351001)(77156002)(5001960100002)(50986999)(87936001)(2656002)(46102003)(102836002)(19580395003)(19580405001)(77096005)(86362001)(66066001)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR06MB1109;H:DB5PR06MB1112.eurprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2015 07:09:56.4372 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR06MB1109 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 38 From: Abdul Hussain This patch removes casting the values returned by memory allocation functions. Signed-off-by: Abdul Hussain --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/