mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
	Conor Dooley - M52691 <Conor.Dooley@microchip.com>,
	Prajna Rajendra Kumar - M74368
	<prajna.rajendrakumar@microchip.com>
Subject: Re: [PATCH v2 3/6] spi: microchip-core: Replace dead code (-ENOMEM error message)
Date: Thu, 27 Nov 2025 15:58:59 +0000	[thread overview]
Message-ID: <d7bc73f8-c103-4b54-a6f0-ed0c72371349@microchip.com> (raw)
In-Reply-To: <20251126075558.2035012-4-andriy.shevchenko@linux.intel.com>

On 26/11/2025 07:54, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> First of all, the convention in the kernel that we do not issue
> error messages for -ENOMEM. Second, it's ignored by dev_err_probe().
> Replace dead code by a simple return statement.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
> ---
>   drivers/spi/spi-microchip-core-spi.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-microchip-core-spi.c b/drivers/spi/spi-microchip-core-spi.c
> index f8184b711272..8ea382c6fee7 100644
> --- a/drivers/spi/spi-microchip-core-spi.c
> +++ b/drivers/spi/spi-microchip-core-spi.c
> @@ -293,8 +293,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
>
>          host = devm_spi_alloc_host(&pdev->dev, sizeof(*spi));
>          if (!host)
> -               return dev_err_probe(&pdev->dev, -ENOMEM,
> -                                    "unable to allocate host for SPI controller\n");
> +               return -ENOMEM;
>
>          platform_set_drvdata(pdev, host);
>
> --
> 2.50.1
>


  reply	other threads:[~2025-11-27 15:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26  7:54 [PATCH v2 0/6] spi: microchip-core: Code improvements Andy Shevchenko
2025-11-26  7:54 ` [PATCH v2 1/6] spi: microchip-core: use min() instead of min_t() Andy Shevchenko
2025-11-26  9:22   ` david laight
2025-11-27 15:55     ` Prajna Rajendra Kumar
2025-11-26  7:54 ` [PATCH v2 2/6] spi: microchip-core: Refactor FIFO read and write handlers Andy Shevchenko
2025-11-26  9:21   ` david laight
2025-11-26 11:17     ` Andy Shevchenko
2025-11-26 12:05     ` Mark Brown
2025-11-26 12:13       ` Andy Shevchenko
2025-11-27 16:08         ` Prajna Rajendra Kumar
2025-11-27 16:49           ` Andy Shevchenko
2025-11-27 16:50             ` Andy Shevchenko
2025-11-27 18:05             ` Conor Dooley
2025-11-27 19:01               ` Andy Shevchenko
2025-11-26  7:54 ` [PATCH v2 3/6] spi: microchip-core: Replace dead code (-ENOMEM error message) Andy Shevchenko
2025-11-27 15:58   ` Prajna Rajendra Kumar [this message]
2025-11-26  7:54 ` [PATCH v2 4/6] spi: microchip-core: Utilise temporary variable for struct device Andy Shevchenko
2025-11-27 15:59   ` Prajna Rajendra Kumar
2025-11-26  7:54 ` [PATCH v2 5/6] spi: microchip-core: Use SPI_MODE_X_MASK Andy Shevchenko
2025-11-27 16:00   ` Prajna Rajendra Kumar
2025-11-26  7:54 ` [PATCH v2 6/6] spi: microchip-core: Remove unneeded PM related macro Andy Shevchenko
2025-11-27 16:01   ` Prajna Rajendra Kumar
2025-11-28 18:01 ` (subset) [PATCH v2 0/6] spi: microchip-core: Code improvements Mark Brown

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=d7bc73f8-c103-4b54-a6f0-ed0c72371349@microchip.com \
    --to=prajna.rajendrakumar@microchip.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.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

all inboxes | Powered by JetHome®