All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@collabora.com>
To: Mark Brown <broonie@kernel.org>
Cc: Sanjay R Mehta <sanju.mehta@amd.com>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com,
	Lucas Tanure <tanureal@opensource.cirrus.com>,
	Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: Re: [PATCH 3/3] spi: amd: Add support for version AMDI0062
Date: Wed, 9 Feb 2022 14:29:53 -0300	[thread overview]
Message-ID: <233fa514-0cce-094d-183b-601aaa46df0d@collabora.com> (raw)
In-Reply-To: <YgP5o0pBL/DuZsn4@sirena.org.uk>

Às 14:28 de 09/02/22, Mark Brown escreveu:
> On Wed, Feb 09, 2022 at 02:18:59PM -0300, André Almeida wrote:
>> Às 14:14 de 09/02/22, Mark Brown escreveu:
> 
>>>> +
>>>> +	if (amd_spi->version == AMD_SPI_V2)
>>>> +		amd_spi_clear_chip(amd_spi, message->spi->chip_select);
>>>>  	spi_finalize_current_message(master);
>>>>  
>>>>  	return 0;
> 
>>> Why is this one not a switch statement - what happens with v3?
> 
>> A switch statement should work as well, but currently v1 does nothing
>> and there's no v3 for now. I think we can change for a switch if v3
>> requires to do something here as well.
> 
> Please write it in an extensible fashion now so people aren't tempted to
> add an if/else tree.

Got it, I will fix it for the next patch version, thanks!

      reply	other threads:[~2022-02-09 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 16:57 [PATCH 0/3] spi: amd: Add support for new controller version André Almeida
2022-02-09 16:57 ` [PATCH 1/3] spi: amd: Use iopoll for busy waiting André Almeida
2022-02-09 16:57 ` [PATCH 2/3] spi: amd: Remove needless rom_addr variable André Almeida
2022-02-09 16:57 ` [PATCH 3/3] spi: amd: Add support for version AMDI0062 André Almeida
2022-02-09 17:14   ` Mark Brown
2022-02-09 17:18     ` André Almeida
2022-02-09 17:28       ` Mark Brown
2022-02-09 17:29         ` André Almeida [this message]

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=233fa514-0cce-094d-183b-601aaa46df0d@collabora.com \
    --to=andrealmeid@collabora.com \
    --cc=Nehal-Bakulchandra.shah@amd.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sanju.mehta@amd.com \
    --cc=tanureal@opensource.cirrus.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 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.