From patchwork Mon Apr 13 08:20:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 216026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD677C2BA19 for ; Mon, 13 Apr 2020 07:54:16 +0000 (UTC) Received: from vger.kernel.org (unknown [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8208206A1 for ; Mon, 13 Apr 2020 07:54:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8208206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729479AbgDMHyM (ORCPT ); Mon, 13 Apr 2020 03:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:37348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbgDMHyM (ORCPT ); Mon, 13 Apr 2020 03:54:12 -0400 Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5286C008651; Mon, 13 Apr 2020 00:54:11 -0700 (PDT) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2976A9A447D55784BA21; Mon, 13 Apr 2020 15:54:09 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Apr 2020 15:53:58 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot Subject: [PATCH] libertas: make lbs_process_event() void Date: Mon, 13 Apr 2020 16:20:22 +0800 Message-ID: <20200413082022.22380-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix the following coccicheck warning: drivers/net/wireless/marvell/libertas/cmdresp.c:225:5-8: Unneeded variable: "ret". Return "0" on line 355 Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/net/wireless/marvell/libertas/cmd.h | 2 +- drivers/net/wireless/marvell/libertas/cmdresp.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/cmd.h b/drivers/net/wireless/marvell/libertas/cmd.h index 80878561cb90..3c193074662b 100644 --- a/drivers/net/wireless/marvell/libertas/cmd.h +++ b/drivers/net/wireless/marvell/libertas/cmd.h @@ -76,7 +76,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv, /* Events */ -int lbs_process_event(struct lbs_private *priv, u32 event); +void lbs_process_event(struct lbs_private *priv, u32 event); /* Actual commands */ diff --git a/drivers/net/wireless/marvell/libertas/cmdresp.c b/drivers/net/wireless/marvell/libertas/cmdresp.c index b73d08381398..cb515c5584c1 100644 --- a/drivers/net/wireless/marvell/libertas/cmdresp.c +++ b/drivers/net/wireless/marvell/libertas/cmdresp.c @@ -220,9 +220,8 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len) return ret; } -int lbs_process_event(struct lbs_private *priv, u32 event) +void lbs_process_event(struct lbs_private *priv, u32 event) { - int ret = 0; struct cmd_header cmd; switch (event) { @@ -351,6 +350,4 @@ int lbs_process_event(struct lbs_private *priv, u32 event) netdev_alert(priv->dev, "EVENT: unknown event id %d\n", event); break; } - - return ret; }