From patchwork Sun Jun 12 23:28:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 9171781 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0EB6B60573 for ; Sun, 12 Jun 2016 23:28:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0058D20855 for ; Sun, 12 Jun 2016 23:28:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E902321C9A; Sun, 12 Jun 2016 23:28:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 676E020855 for ; Sun, 12 Jun 2016 23:28:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbcFLX21 (ORCPT ); Sun, 12 Jun 2016 19:28:27 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33218 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753090AbcFLX20 (ORCPT ); Sun, 12 Jun 2016 19:28:26 -0400 Received: by mail-pa0-f67.google.com with SMTP id ts6so2103345pac.0 for ; Sun, 12 Jun 2016 16:28:26 -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=4K4yfKMc5CrkXrGCbsZndDe6sXKdmDbILe+HcbkGTjU=; b=irEEKrleAw2WxkCnyq0whJ31Kak8mR4G8/QbYM92fkRS9UNovDlYsVVUht/ySnPtCY YesEqIC8VxTJtPpHjrlammkuOmdHy0yJW8Cjq0HDU8jzYsB8W8cntgb57F6a/JToJqcj 4jV4NGGF8PfjmCjwFpIz8pdMdIqcyf3zwls+87qi7SkRlWOCTRsBADSKssEbJngB928/ zuEVWL4QzCfdwvzUdD6Tg9GIsRMRt+mss6fY/fvI/Ipn31kLOcGtKgWyXYH7flsAVjhC TNCAr8OJiBRzjjWHxz+MrZq1Yixi4bDkLcRcqOfTjddvQ31I3nd+90TVc49gQTT6l8H8 9U5w== 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=4K4yfKMc5CrkXrGCbsZndDe6sXKdmDbILe+HcbkGTjU=; b=kkBgNSUAx/FmqBbuWC+bZnezUMKnRs9wS9YtbfB+Hs8Tui0tZFRRpsEDwtGQyfGI7T YEYJhSJPsgKFz3JZbYSZ8tZMYqIvifJvKqh9l2QGJ2rlFZ2J/RTpOdbSInFasSgGkVaL fgh64+bc7nKue3JZrWoYxZyBiD4HZJnZdvbixjLs2TYXLgz87Zzgx2PCJhgXdT6PAteV 7uYJBkFYeR7KNgaTlYp6UT1Ac9+n0TcQtwiRVKfqsgptTcKiC+NkCcVlxEbncp1GPprw b7tnO6udVp9ZtMs+C90GH8rtUpzU98Q10Np25TFK6ug1HBey3faxts+JT8tXaZhTyUdh ZIEA== X-Gm-Message-State: ALyK8tJzOUEe3Ki8LDWo7Ikslfxp9CQRYzTobPKNBOss2Nb/FKGM8B8GwZZBJ96tGOZCUQ== X-Received: by 10.66.27.80 with SMTP id r16mr18379096pag.102.1465774105623; Sun, 12 Jun 2016 16:28:25 -0700 (PDT) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id d24sm32400154pfb.90.2016.06.12.16.28.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jun 2016 16:28:24 -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/6] staging: wilc1000: change handle_cfg_param's return type to void Date: Mon, 13 Jun 2016 08:28:10 +0900 Message-Id: <20160612232815.12112-1-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.8.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When handle_cfg_param 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. Signed-off-by: Chaehyun Lim --- drivers/staging/wilc1000/host_interface.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 9535842..aeb355e 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -417,8 +417,8 @@ static void handle_get_mac_address(struct wilc_vif *vif, complete(&hif_wait_response); } -static s32 handle_cfg_param(struct wilc_vif *vif, - struct cfg_param_attr *cfg_param_attr) +static void handle_cfg_param(struct wilc_vif *vif, + struct cfg_param_attr *cfg_param_attr) { s32 result = 0; struct wid wid_list[32]; @@ -436,7 +436,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.bss_type = (u8)cfg_param_attr->bss_type; } else { netdev_err(vif->ndev, "check value 6 over\n"); - result = -EINVAL; goto unlock; } i++; @@ -452,7 +451,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.auth_type = (u8)cfg_param_attr->auth_type; } else { netdev_err(vif->ndev, "Impossible value\n"); - result = -EINVAL; goto unlock; } i++; @@ -467,7 +465,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.auth_timeout = cfg_param_attr->auth_timeout; } else { netdev_err(vif->ndev, "Range(1 ~ 65535) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -481,7 +478,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.power_mgmt_mode = (u8)cfg_param_attr->power_mgmt_mode; } else { netdev_err(vif->ndev, "Invalid power mode\n"); - result = -EINVAL; goto unlock; } i++; @@ -496,7 +492,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.short_retry_limit = cfg_param_attr->short_retry_limit; } else { netdev_err(vif->ndev, "Range(1~256) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -511,7 +506,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.long_retry_limit = cfg_param_attr->long_retry_limit; } else { netdev_err(vif->ndev, "Range(1~256) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -526,7 +520,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.frag_threshold = cfg_param_attr->frag_threshold; } else { netdev_err(vif->ndev, "Threshold Range fail\n"); - result = -EINVAL; goto unlock; } i++; @@ -541,7 +534,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.rts_threshold = cfg_param_attr->rts_threshold; } else { netdev_err(vif->ndev, "Threshold Range fail\n"); - result = -EINVAL; goto unlock; } i++; @@ -555,7 +547,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.preamble_type = cfg_param_attr->preamble_type; } else { netdev_err(vif->ndev, "Preamle Range(0~2) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -569,7 +560,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.short_slot_allowed = (u8)cfg_param_attr->short_slot_allowed; } else { netdev_err(vif->ndev, "Short slot(2) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -583,7 +573,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.txop_prot_disabled = (u8)cfg_param_attr->txop_prot_disabled; } else { netdev_err(vif->ndev, "TXOP prot disable\n"); - result = -EINVAL; goto unlock; } i++; @@ -598,7 +587,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.beacon_interval = cfg_param_attr->beacon_interval; } else { netdev_err(vif->ndev, "Beacon interval(1~65535)fail\n"); - result = -EINVAL; goto unlock; } i++; @@ -613,7 +601,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.dtim_period = cfg_param_attr->dtim_period; } else { netdev_err(vif->ndev, "DTIM range(1~255) fail\n"); - result = -EINVAL; goto unlock; } i++; @@ -627,7 +614,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.site_survey_enabled = (u8)cfg_param_attr->site_survey_enabled; } else { netdev_err(vif->ndev, "Site survey disable\n"); - result = -EINVAL; goto unlock; } i++; @@ -642,7 +628,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.site_survey_scan_time = cfg_param_attr->site_survey_scan_time; } else { netdev_err(vif->ndev, "Site scan time(1~65535) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -657,7 +642,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.active_scan_time = cfg_param_attr->active_scan_time; } else { netdev_err(vif->ndev, "Active time(1~65535) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -672,7 +656,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.passive_scan_time = cfg_param_attr->passive_scan_time; } else { netdev_err(vif->ndev, "Passive time(1~65535) over\n"); - result = -EINVAL; goto unlock; } i++; @@ -694,7 +677,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, hif_drv->cfg_values.curr_tx_rate = (u8)curr_tx_rate; } else { netdev_err(vif->ndev, "out of TX rate\n"); - result = -EINVAL; goto unlock; } i++; @@ -708,7 +690,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif, unlock: mutex_unlock(&hif_drv->cfg_values_lock); - return result; } static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)