mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: rohan1sj@cadence.com, Ulf Hansson <ulf.hansson@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Milind Parab <mparab@cadence.com>,
	Swapnil Jakhade <sjakhade@cadence.com>,
	Manikandan Pillai <mpillai@cadence.com>
Subject: Re: [PATCH 2/2] mmc: cqe: Add CQE support for cadence mmc driver
Date: Tue, 7 Apr 2026 13:30:28 +0200	[thread overview]
Message-ID: <ef40135f-0ea6-44e5-8c34-34169bb357d3@oss.qualcomm.com> (raw)
In-Reply-To: <20260407-cdns_sdhci_cqe-support-v1-2-13efc0810631@cadence.com>

On 07/04/2026 13:18, rohan1sj via B4 Relay wrote:
> +static int sdhci_cdns_cqe_add_host(struct sdhci_host *host, struct platform_device *pdev)
> +{
> +	struct cqhci_host *cq_host;
> +	bool dma64;
> +	int ret;
> +
> +	/* setup SDHCI host first */
> +	ret = sdhci_setup_host(host);
> +
> +	if (ret)
> +		return ret;
> +
> +	/* Init CQE */
> +	cq_host = cqhci_pltfm_init(pdev);
> +	if (IS_ERR(cq_host)) {
> +		ret = PTR_ERR(cq_host);
> +		goto cleanup;
> +	}
> +
> +	dma64 = host->flags & SDHCI_USE_64_BIT_DMA;
> +	if (dma64)
> +		cq_host->caps |= CQHCI_TASK_DESC_SZ_128;
> +
> +	cq_host->ops = &sdhci_cdns_cqhci_ops;
> +
> +	host->mmc->caps2 |= MMC_CAP2_CQE | MMC_CAP2_CQE_DCMD;
> +
> +	/* Finally initialize CQHCI */
> +	ret = cqhci_init(cq_host, host->mmc, dma64);
> +	if (ret) {
> +		dev_err(mmc_dev(host->mmc), "Failed to initialize CQHCI: %d\n", ret);

So here error msg

> +		goto cleanup;
> +	}
> +
> +	/* add host to MMC subsystem */
> +	ret = __sdhci_add_host(host);
> +	if (ret)
> +		goto cleanup;
> +
> +	dev_info(mmc_dev(host->mmc), "CQE init: success\n");

dev_dbg

This does not look like useful printk message. Drivers should be silent
on success:
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/coding-style.rst#L913
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/debugging/driver_development_debugging_guide.rst#L79


> +	return 0;
> +
> +cleanup:
> +	dev_err(mmc_dev(host->mmc), "CQE init: failed for %s\n", mmc_hostname(host->mmc));

And here also error message. Why twice?

And if it is probe path, why aren't you using dev_err_probe()?

Best regards,
Krzysztof


  reply	other threads:[~2026-04-07 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 11:18 [PATCH 0/2] CQE support for cadence eMMC host controller rohan1sj via B4 Relay
2026-04-07 11:18 ` [PATCH 1/2] mmc: cqe: Add CQE DT support for cadence controller rohan1sj via B4 Relay
2026-04-07 11:30   ` Krzysztof Kozlowski
2026-04-07 11:18 ` [PATCH 2/2] mmc: cqe: Add CQE support for cadence mmc driver rohan1sj via B4 Relay
2026-04-07 11:30   ` Krzysztof Kozlowski [this message]
2026-05-05  9:51   ` Adrian Hunter

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=ef40135f-0ea6-44e5-8c34-34169bb357d3@oss.qualcomm.com \
    --to=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=adrian.hunter@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mparab@cadence.com \
    --cc=mpillai@cadence.com \
    --cc=robh@kernel.org \
    --cc=rohan1sj@cadence.com \
    --cc=sjakhade@cadence.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yamada.masahiro@socionext.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

all inboxes | Powered by JetHome®