From patchwork Mon Aug 17 02:05:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 7022811 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35DE99F358 for ; Mon, 17 Aug 2015 02:05:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69B762063A for ; Mon, 17 Aug 2015 02:05:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 879D320634 for ; Mon, 17 Aug 2015 02:05:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbbHQCFd (ORCPT ); Sun, 16 Aug 2015 22:05:33 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34815 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753134AbbHQCFc (ORCPT ); Sun, 16 Aug 2015 22:05:32 -0400 Received: by paccq16 with SMTP id cq16so53590441pac.1 for ; Sun, 16 Aug 2015 19:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DdSdgdXiFpeWPuRN/eQ0zD6SFiSq2Ub3MEaWPKkWfZk=; b=apyap75Avgiw3CZvhzDVLazd7+L6ZJDPw0eM/qaumAm69doMtS5FaP9dklB60XcIYg 7btjCew1whZxtS2M/6KVPDbvg6RYmV2Npnh6MKbAe3cYuorwGW+YTCWbJ/9xlhFxcINb prM77N7BO0GpW+CmIEGvpgZvHNDuLjt3sUZAwFREQxsQdklhbLklUuYyhhbt7sdanLk3 5V6pn7ymPjUEUGl1tzvVsVUlXmvgXj/cUNjhI5nssmoYipCtmLU3SIG8k1l/HdnGx460 CtzlSry2kqyEnqdSZz47JFNgfWuWmqWsjWGn/t27B5mivcas2a5qbunOXGram+EHKhkh eTbg== X-Received: by 10.66.161.105 with SMTP id xr9mr114042253pab.50.1439777131969; Sun, 16 Aug 2015 19:05:31 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id tt8sm12609611pbc.49.2015.08.16.19.05.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Aug 2015 19:05:31 -0700 (PDT) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, rachel.kim@atmel.com, dean.lee@atmel.com, chris.park@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH 4/6] staging: wilc1000: remove unused codes of gps8ConfigPacket Date: Mon, 17 Aug 2015 11:05:13 +0900 Message-Id: <1439777115-25861-4-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1439777115-25861-1-git-send-email-chaehyun.lim@gmail.com> References: <1439777115-25861-1-git-send-email-chaehyun.lim@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes unused codes of gps8ConfigPacket declared by global variable. It is allocated and freed memory within CoreConfiguratorInit and CoreConfiguratorDeInit. There is no used anywhere except within two functions. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/coreconfigurator.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 7c129aa..4a6b975 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -167,7 +167,6 @@ extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length); static struct semaphore SemHandleSendPkt; static struct semaphore SemHandlePktResp; -static s8 *gps8ConfigPacket; static tstrConfigPktInfo gstrConfigPktInfo; @@ -674,17 +673,8 @@ s32 CoreConfiguratorInit(void) sema_init(&SemHandleSendPkt, 1); sema_init(&SemHandlePktResp, 0); - gps8ConfigPacket = WILC_MALLOC(MAX_PACKET_BUFF_SIZE); - if (gps8ConfigPacket == NULL) { - PRINT_ER("failed in gps8ConfigPacket allocation\n"); - s32Error = WILC_NO_MEM; - goto _fail_; - } - - memset((void *)gps8ConfigPacket, 0, MAX_PACKET_BUFF_SIZE); memset((void *)(&gstrConfigPktInfo), 0, sizeof(tstrConfigPktInfo)); -_fail_: return s32Error; } @@ -1956,11 +1946,6 @@ s32 CoreConfiguratorDeInit(void) PRINT_D(CORECONFIG_DBG, "CoreConfiguratorDeInit()\n"); - if (gps8ConfigPacket != NULL) { - - kfree(gps8ConfigPacket); - gps8ConfigPacket = NULL; - } return s32Error; }