Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
	tools@linux.kernel.org, kernel-janitors@vger.kernel.org
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Mark Brown <broonie@kernel.org>, Vinod Koul <vkoul@kernel.org>,
	Dan Carpenter <error27@gmail.com>,
	linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, smatch@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH] spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan()
Date: Thu, 15 Jun 2023 18:12:03 +0300	[thread overview]
Message-ID: <b82b8041-7bc5-433c-98bc-4ac6fcf5ae9d@kadam.mountain> (raw)
In-Reply-To: <20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-v1-1-6da9bf2db4a4@linaro.org>

Added the kernel-janitors mailing list to the CC.

On Thu, Jun 15, 2023 at 11:23:17AM +0200, Neil Armstrong wrote:
> Now spi_geni_grab_gpi_chan() errors are correctly reported, the
> -EPROBE_DEFER error should be returned from probe in case the
> GPI dma driver is built as module and/or not probed yet.
> 
> Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma")
> Fixes: 6532582c353f ("spi: spi-geni-qcom: fix error handling in spi_geni_grab_gpi_chan()")
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>

In olden days the kernel janitors list used to have a TODO list of
random tasks that a newbie could take on.  People loved the idea of a
TODO list but no one ever maintained it so in practice it was useless
after the first year.  I've create a new KTODO tag so we can
automatically create KTODO lists.  The idea is you write a one line
summary that starts with KTODO and the subsystem prefix like so:

KTODO: static analysis: Ensure that -EPROBE_DEFER is always propogated

Then people can use lei[1] to search for the tag and get the latest
TODO list.  Here is the command to search for all the KTODO items added
in the last six months.

lei q https://lore.kernel.org/all/ -o ~/Mail/KTODO --dedupe=mid 'KTODO AND rt:6.month.ago..'

The KTODO entry should have a short summary.  People can download thread
for more context if they want.  Here is the short summary:

The -EPROBE_DEFER error code is special and needs to propogated to the
callers.  If you have code like:

	err = returns_eprobe_defer();
	if (err)
		return -EINVAL;

Then that is a bug because it's returning -EINVAL instead return err;
Use static analysis to prevent this.

regards,
dan carpenter

[1] https://lpc.events/event/11/contributions/983/attachments/759/1421/Doing%20more%20with%20lore%20and%20b4.pdf


       reply	other threads:[~2023-06-15 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-v1-1-6da9bf2db4a4@linaro.org>
2023-06-15 15:12 ` Dan Carpenter [this message]
2023-06-16 11:18   ` [PATCH] spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan() Dan Carpenter

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=b82b8041-7bc5-433c-98bc-4ac6fcf5ae9d@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=smatch@vger.kernel.org \
    --cc=tools@linux.kernel.org \
    --cc=vkoul@kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).