From patchwork Mon May 2 10:47:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8990961 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBD8EBF29F for ; Mon, 2 May 2016 10:48:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E363C201FA for ; Mon, 2 May 2016 10:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D88B200E1 for ; Mon, 2 May 2016 10:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753606AbcEBKsW (ORCPT ); Mon, 2 May 2016 06:48:22 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32846 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753587AbcEBKsU (ORCPT ); Mon, 2 May 2016 06:48:20 -0400 Received: by mail-pf0-f196.google.com with SMTP id e190so20540169pfe.0 for ; Mon, 02 May 2016 03:48:20 -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=HKTjt2q6VtbFWETeZqKej0p8W/jPiQW1jBszqvPLDfA=; b=dpRn1x/exKttgg0W5FNJs6IA57KSCf+lSzJGtYhRF6ltssFbTCyaGMhTPi6wTWrcHk COdRcyBHVhd9izBnj2c4OXgBmDgerMFd9PTa1SjX+2kN87JOcVoMCCYVYD3LDGWaEMcM JV7gFHxXjRY2mTQxQqB1K4cK0q0dynId92Ou4sJ1GghaVaZwQhFI/K6bKnLtYWBTdA81 2MoP0caAc7X78YI2ClB7K/6yxryq/GRekbw1y+4Qv43CjMVSY8/QK0TTP27yvizPiLEn gAwNl6YfIbpir+k8T5KPema8UJqNZobTnawzHiFvraehn9ZKtOXRl8RPnFA947WsgErN pRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HKTjt2q6VtbFWETeZqKej0p8W/jPiQW1jBszqvPLDfA=; b=YTMnL07JrGxn2UjgZ8fYG6aULBaBhyjWLpf9BSoSwmvOi66V9MP3DiBFYeuk29eG1F 5sClFbqdTsm6hSV447RCq9D3uZ4914QsRnIa5GygiEoupLnYWoGCdFTFL0xSiDuokdHC oeqbAsmoQmyL+oM2tjUVDHX64Hoe8zojxkakUbGvpl4L4CKcPMsEv/x/5LW0gFCkiW11 vQy46MaKrNii1gbJA8ceWcQ4Dr4zNTAf9iXHb7J47fNqyBU0tdBz6YN8uh1B3O3n+JED PJ56FWAx61XwGI6s0n2AM+JH/iJ2TU3+hNZT4AKia9hZXxQ/FYU+K92kmVztyGMcbd1t cGxg== X-Gm-Message-State: AOPr4FUMBy3rA1Z6tCpu2Hzk2n03ZHuR+9X23l3rNBgunWoCfxEqc0tML72oid93RmHkrw== X-Received: by 10.98.34.141 with SMTP id p13mr50700642pfj.156.1462186100035; Mon, 02 May 2016 03:48:20 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id fn3sm44570688pab.20.2016.05.02.03.48.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 May 2016 03:48:19 -0700 (PDT) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, austin.shin@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH 5/7] staging: wilc1000: change handle_get_mac_address's return type to void Date: Mon, 2 May 2016 19:47:53 +0900 Message-Id: <1462186075-8549-5-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1462186075-8549-1-git-send-email-chaehyun.lim@gmail.com> References: <1462186075-8549-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.8 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 When handle_get_mac_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8a269fd..23bbaa8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -398,8 +398,8 @@ static void handle_get_ip_address(struct wilc_vif *vif, u8 idx) netdev_err(vif->ndev, "Failed to get IP address\n"); } -static s32 handle_get_mac_address(struct wilc_vif *vif, - struct get_mac_addr *get_mac_addr) +static void handle_get_mac_address(struct wilc_vif *vif, + struct get_mac_addr *get_mac_addr) { s32 result = 0; struct wid wid; @@ -412,13 +412,9 @@ static s32 handle_get_mac_address(struct wilc_vif *vif, result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1, wilc_get_vif_idx(vif)); - if (result) { + if (result) netdev_err(vif->ndev, "Failed to get mac address\n"); - result = -EFAULT; - } complete(&hif_wait_response); - - return result; } static s32 handle_cfg_param(struct wilc_vif *vif,