From patchwork Tue Apr 19 00:35:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8876181 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 1322EBF29F for ; Tue, 19 Apr 2016 00:35:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 302D020211 for ; Tue, 19 Apr 2016 00:35:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EADDC201FA for ; Tue, 19 Apr 2016 00:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526AbcDSAfl (ORCPT ); Mon, 18 Apr 2016 20:35:41 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36387 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbcDSAfk (ORCPT ); Mon, 18 Apr 2016 20:35:40 -0400 Received: by mail-pf0-f195.google.com with SMTP id p185so95510pfb.3 for ; Mon, 18 Apr 2016 17:35:40 -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; bh=PJb+5oDS5niYCDpYN8g8gzX5KYeQE8tDpkEgz/cnmVA=; b=oIY80kOdUvlCXbFytsWfYD+WOETiIQ6LLsRiTVfS8rYM7u6/fSSvsvjnbEtGS+TqGo vdsj1YqUi4ovFe8m5Kgc/KrnrUp2P+sCROQEhsgxwhpEuUE6Up6fTxi3E7Y76biTD9Yv 20OVJdVJTt8FYqajGahQIe1HL6qgoSscASyQ1mSLUq+a2sfERl9NBa2hEy5fr3TlH6aB Ggu1f9gmNCQjSwNje+TIFTcED/AAXcKj3ZaRpI9zEOVO9ocgYm67gWBbadQrfBCwFFAe 4FPh3wON0sFfKgv3obVaiBs5Y1nCprx7axjwSRiE7+Xaha2s8C3O71R64LLMeUvgM7OM 2qsw== 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; bh=PJb+5oDS5niYCDpYN8g8gzX5KYeQE8tDpkEgz/cnmVA=; b=YQ24QPEg2gnCeEh9dH0cH90lWlG7EvnIavW8JfteEazNKg+4agejdi94WKafiZ53pi Z7sX37z9qoeMRT/z5K/PlFggU0rqiB7tbj0Xe9CiZaHBiWuZe9gAoRSrRgvAMRQnI9/8 ZOpJYI3omIpdfN8YK2VogaI4nZ/qwl4E3R9PKvGExuJQtILMGr72iuhrTcwWzrJDpFcV 10hirMdK+NtUKbfhMbD4tUHG4gvhWLDt1KwYVZ+a0fkqKQRhyPP8N5O4PLpQszFStWxA bjdMJrqVYhktcS6YnAxo/VSpvQWF3t9NdtZnrvAKLlJ0jKGr1k4N8cWd/2+IL/GjB+tG rSEQ== X-Gm-Message-State: AOPr4FXHg0XaZCWt5pZp9XUur3WH4+LoT24HMT+QF6uMPjS5efgRUwC+L5muk5l6D7v/LA== X-Received: by 10.98.89.22 with SMTP id n22mr60221pfb.55.1461026139869; Mon, 18 Apr 2016 17:35:39 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id i67sm21246905pfb.56.2016.04.18.17.35.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Apr 2016 17:35:39 -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 1/3] staging: wilc1000: change handle_set_ip_address's return type to void Date: Tue, 19 Apr 2016 09:35:29 +0900 Message-Id: <1461026131-5841-1-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.8.0 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_set_ip_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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index ac620fb..87c8789 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -349,7 +349,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif, netdev_err(vif->ndev, "Failed to set driver handler\n"); } -static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx) +static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx) { s32 result = 0; struct wid wid; @@ -370,12 +370,8 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx) host_int_get_ipaddress(vif, firmware_ip_addr, idx); - if (result) { + if (result) netdev_err(vif->ndev, "Failed to set IP address\n"); - return -EINVAL; - } - - return result; } static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)