From patchwork Tue Aug 22 15:54:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 716875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1E99EE4996 for ; Tue, 22 Aug 2023 15:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232272AbjHVP4l (ORCPT ); Tue, 22 Aug 2023 11:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237442AbjHVP4k (ORCPT ); Tue, 22 Aug 2023 11:56:40 -0400 Received: from forward101c.mail.yandex.net (forward101c.mail.yandex.net [178.154.239.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B48CE6 for ; Tue, 22 Aug 2023 08:56:17 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:1d9d:0:640:49d1:0]) by forward101c.mail.yandex.net (Yandex) with ESMTP id 8141860080; Tue, 22 Aug 2023 18:56:09 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 4uL3vjKWqKo0-Nx2X9gnO; Tue, 22 Aug 2023 18:56:08 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1692719768; bh=rVXkd8OYRs+EPlwMCcIMTR9cyotrLl0sPBMwsp7sYvw=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=Vhr0MN4ORiARkkPlP3ddijC7m5TutfSgd62hj+OYfuNxXZclSBY3+uWuT1+L+zsLn 2SfR+cKU46I138UqwwujEfe+qihRfF550mZCHc/mCogrU/rikNY0js3b89G55TiHw2 gf9OsXPHRArNZW3YlVd7nSK2tHq2uGZDRjJbNz8Q= Authentication-Results: mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Jeff Johnson Cc: Kalle Valo , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, Dmitry Antipov Subject: [PATCH 3/3] wifi: ath10k: simplify ath10k_pci_pm_suspend() Date: Tue, 22 Aug 2023 18:54:26 +0300 Message-ID: <20230822155532.95983-3-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230822155532.95983-1-dmantipov@yandex.ru> References: <20230822155532.95983-1-dmantipov@yandex.ru> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Since 'ath10k_pci_suspend()' always returns 0, it may be converted to 'void' and 'ath10k_pci_pm_suspend()' may be simplified accordingly. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov --- drivers/net/wireless/ath/ath10k/pci.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index f6988075cd83..16037e77264b 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -2871,7 +2871,7 @@ static int ath10k_pci_hif_suspend(struct ath10k *ar) return 0; } -static int ath10k_pci_suspend(struct ath10k *ar) +static void ath10k_pci_suspend(struct ath10k *ar) { /* The grace timer can still be counting down and ar->ps_awake be true. * It is known that the device may be asleep after resuming regardless @@ -2879,8 +2879,6 @@ static int ath10k_pci_suspend(struct ath10k *ar) * device is asleep before proceeding. */ ath10k_pci_sleep_sync(ar); - - return 0; } static int ath10k_pci_hif_resume(struct ath10k *ar) @@ -3734,13 +3732,9 @@ MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table); static __maybe_unused int ath10k_pci_pm_suspend(struct device *dev) { struct ath10k *ar = dev_get_drvdata(dev); - int ret; - ret = ath10k_pci_suspend(ar); - if (ret) - ath10k_warn(ar, "failed to suspend hif: %d\n", ret); - - return ret; + ath10k_pci_suspend(ar); + return 0; } static __maybe_unused int ath10k_pci_pm_resume(struct device *dev)