Skip to contentSkip to conversation

mmc: sdhci_am654: Remove the unneeded result variable

PATCH In review [email protected] 3 participants 3 messages Aug 30, 2022 – Sep 1, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci_am654: Remove the unneeded result variable

From: ye xingchen <[email protected]>

Return the value cqhci_init() directly instead of storing it in another redundant variable.

---
 drivers/mmc/host/sdhci_am654.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/sdhci_am654.c +1 -4
index e7ced1496a07..8f1023480e12 100644
@@ -554,7 +554,6 @@ static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
 static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 {
 	struct cqhci_host *cq_host;
-	int ret;
 
 	cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
 			       GFP_KERNEL);
@@ -568,9 +567,7 @@ static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 
 	host->mmc->caps2 |= MMC_CAP2_CQE;
 
-	ret = cqhci_init(cq_host, host->mmc, 1);
-
-	return ret;
+	return cqhci_init(cq_host, host->mmc, 1);
 }
 
 static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · On 30/08/22 11:33, [email protected] wrote:

From: ye xingchen <[email protected]>

Return the value cqhci_init() directly instead of storing it in another redundant variable.

Quoted 27 lines
---
 drivers/mmc/host/sdhci_am654.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/sdhci_am654.c +1 -4
index e7ced1496a07..8f1023480e12 100644
@@ -554,7 +554,6 @@ static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
 static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 {
 	struct cqhci_host *cq_host;
-	int ret;
 
 	cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
 			       GFP_KERNEL);
@@ -568,9 +567,7 @@ static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 
 	host->mmc->caps2 |= MMC_CAP2_CQE;
 
-	ret = cqhci_init(cq_host, host->mmc, 1);
-
-	return ret;
+	return cqhci_init(cq_host, host->mmc, 1);
 }
 
 static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
#2 lore raw
In reply to [email protected]
Quoted 8 lines · On Tue, 30 Aug 2022 at 10:33, <[email protected]> wrote:

From: ye xingchen <[email protected]>

Return the value cqhci_init() directly instead of storing it in another redundant variable.

Applied for next, thanks!

Kind regards
Uffe

Quoted 29 lines
---
 drivers/mmc/host/sdhci_am654.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/sdhci_am654.c +1 -5
index e7ced1496a07..8f1023480e12 100644
@@ -554,7 +554,6 @@ static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
 static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 {
        struct cqhci_host *cq_host;
-       int ret;
 
        cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
                               GFP_KERNEL);
@@ -568,9 +567,7 @@ static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 
        host->mmc->caps2 |= MMC_CAP2_CQE;
 
-       ret = cqhci_init(cq_host, host->mmc, 1);
-
-       return ret;
+       return cqhci_init(cq_host, host->mmc, 1);
 }
 
 static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
--

2.25.1