Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbbFPHKh (ORCPT ); Tue, 16 Jun 2015 03:10:37 -0400 Received: from mail-db3on0132.outbound.protection.outlook.com ([157.55.234.132]:4672 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752824AbbFPHKa convert rfc822-to-8bit (ORCPT ); Tue, 16 Jun 2015 03:10:30 -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: AQHQqAOFkMp7EGitnEOwqVWtQFq4nQ== Date: Tue, 16 Jun 2015 07:10:28 +0000 Message-ID: <1434438549-5340-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:LfZ+6yb2S93FGnJX3uPUjFPHJLCKFnnz6ryB5QH4mShZM41XexFNyG4SIXIzxvv26x1BiBewek99fhMjNNSziGP4juCwBWCwflEtCpUuhskCACxwsKe6zVlUHH6fTUSpcrXnE0Kq/caA4uji8fbkHA==;10:AX28y1AYUS2pyuzu78zLu2ylgLuVy7DIuUYggS+Rd3qlMlOdfyBqZ86EHr/k2PHDOUg2bhys7vln86uyHZXFoj/Pr58TrDITEaenPmd6sCA=;6:GIrwiw0vpBxe/MUwp6LwLXiZobTl23pdmwd0nqhyvrMJLmMNta/ap5TGRtFPw0Ip 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:10:28.0479 (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: 1658 Lines: 47 From: Abdul Hussain This patch removes casting the values returned by memory allocation functions. Signed-off-by: Abdul Hussain --- 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 -- 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/