From: Dmitry Antipov <dmantipov@yandex.ru>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org,
ath10k@lists.infradead.org, Dmitry Antipov <dmantipov@yandex.ru>
Subject: [PATCH 3/3] [v2] wifi: ath10k: simplify ath10k_pci_pm_suspend()
Date: Wed, 23 Aug 2023 12:50:05 +0300 [thread overview]
Message-ID: <20230823095008.50515-3-dmantipov@yandex.ru> (raw)
In-Reply-To: <20230823095008.50515-1-dmantipov@yandex.ru>
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 <dmantipov@yandex.ru>
---
v2: adjust to match series
---
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)
--
2.41.0
next prev parent reply other threads:[~2023-08-23 9:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 9:50 [PATCH] [v2] wifi: ath10k: cleanup CE initialization Dmitry Antipov
2023-08-23 9:50 ` [PATCH 2/3] [v2] wifi: ath10k: simplify ath10k_peer_assoc_h_vht() Dmitry Antipov
2023-08-23 14:55 ` Jeff Johnson
2023-08-23 9:50 ` Dmitry Antipov [this message]
2023-08-23 14:57 ` [PATCH 3/3] [v2] wifi: ath10k: simplify ath10k_pci_pm_suspend() Jeff Johnson
2023-08-23 10:03 ` [lvc-project] [PATCH] [v2] wifi: ath10k: cleanup CE initialization Alexey Khoroshilov
2023-08-23 10:13 ` Antipov, Dmitriy
2023-08-25 7:47 ` Kalle Valo
2023-08-23 14:53 ` Jeff Johnson
2023-08-24 5:51 ` [PATCH 1/6] [v3] wifi: ath10k: cleanup CE ring initialization Dmitry Antipov
2023-08-24 5:51 ` [PATCH 2/6] [v3] wifi: ath10k: simplify ath10k_ce_init_pipe() Dmitry Antipov
2023-08-24 15:26 ` Jeff Johnson
2023-08-24 5:51 ` [PATCH 3/6] [v3] wifi: ath10k: cleanup CE pipes initialization Dmitry Antipov
2023-08-24 15:27 ` Jeff Johnson
2023-08-24 5:51 ` [PATCH 4/6] [v3] wifi: ath10k: do not ignore possible dma_alloc_coherent() error Dmitry Antipov
2023-08-24 15:27 ` Jeff Johnson
2023-08-24 5:51 ` [PATCH 5/6] [v3] wifi: ath10k: simplify ath10k_peer_assoc_h_vht() Dmitry Antipov
2023-08-24 5:51 ` [PATCH 6/6] [v3] wifi: ath10k: simplify ath10k_pci_pm_suspend() Dmitry Antipov
2023-08-24 15:26 ` [PATCH 1/6] [v3] wifi: ath10k: cleanup CE ring initialization Jeff Johnson
2023-09-20 13:23 ` Kalle Valo
2023-09-21 8:58 ` Dmitry Antipov
2023-09-21 9:33 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230823095008.50515-3-dmantipov@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=quic_jjohnson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).