All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Alexander Dahl <ada@thorsis.com>
Cc: u-boot@lists.denx.de,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Eugen Hristev <eugen.hristev@collabora.com>,
	Igor Prusov <ivprusov@salutedevices.com>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Sean Anderson <seanga2@gmail.com>, Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] mtd: nand: raw: atmel: remove unnecessary return value
Date: Fri, 9 Aug 2024 15:05:02 +0200	[thread overview]
Message-ID: <ZrYT_k1xsQV46j2G@gmail.com> (raw)
In-Reply-To: <20240809-challenge-causation-20cf58794b33@thorsis.com>

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

Hello Alexander,

Thanks for fast response!

On Fri, Aug 09, 2024 at 02:25:04PM +0200, Alexander Dahl wrote:
> Hello Marcus,
> 
> Am Fri, Aug 09, 2024 at 02:15:43PM +0200 schrieb Marcus Folkesson:
> > The condition 'ret' is always true as it is never set to other than
> > -EIO.
> 
> Technically, you're right.
> 
> I quickly compared with the same driver in Linux.  That has some
> additional lines for DMA transfers which probably got removed when
> porting the driver.

Yes, I thought is was something like that.
> 
> Does the code before your patch throw compiler warnings?  If not, I

Not the compiler, but vim-ale (lint engine) is yelling loudly at me.

> would keep it as is.  The compiler will probably optimize it away
> anyway, and it would make future ports from Linux easier.

I understand your reasoning but not sure I agree.

I don't think it significantly complicates any porting and the code becomes cleaner.

I also think that the porting become less error-prone because it becomes a 
conscious choice to introduce and use ret if needed.

That is what I think, but I don't really have a very strong opinion about it.

> 
> Greets
> Alex
> 

Best regards,
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-08-10  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 12:15 [PATCH] mtd: nand: raw: atmel: remove unnecessary return value Marcus Folkesson
2024-08-09 12:25 ` Alexander Dahl
2024-08-09 12:36   ` Michael Nazzareno Trimarchi
2024-08-09 13:05   ` Marcus Folkesson [this message]
2024-08-30  6:59 ` Marcus Folkesson
2024-08-30  7:05   ` Michael Nazzareno Trimarchi
2024-12-10  7:08     ` Marcus Folkesson
2024-12-10  7:12       ` Michael Nazzareno Trimarchi

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=ZrYT_k1xsQV46j2G@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=ada@thorsis.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=eugen.hristev@collabora.com \
    --cc=ivprusov@salutedevices.com \
    --cc=michael@amarulasolutions.com \
    --cc=seanga2@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.