All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/1] Revert "spi: fsl_qspi: Use GENMASK"
Date: Mon, 14 Dec 2015 12:21:23 +0100	[thread overview]
Message-ID: <566EA633.1000001@denx.de> (raw)
In-Reply-To: <201512111624.46826.marex@denx.de>

Hi Jagan, Marek, Troy,

On 11/12/2015 16:24, Marek Vasut wrote:
> On Friday, December 11, 2015 at 03:59:14 PM, Jagan Teki wrote:
>> On 11 December 2015 at 02:57, Troy Kisky <troy.kisky@boundarydevices.com> 
> wrote:
>>> If GENMASK is REALLY desired, it should be GENMASK(23,0)
>>> But since GENMASK is obviously more confusing, let's just revert.
>>>
>>> This reverts commit bad490a24212c068c5b718b9189f47ea4075d078.
>>
>> Sorry, just fix genmask why revert? because driver author has no
>> complaint on this, please don't just say simply "more confusing" more
>> over I usually prefer reverting bug fix patches.
> 
> I also agree this GENMASK() crap is confusing.
> 

IMHO it is easier for me to check directly the mask, as relying to a
macro. But this is only my personal opinion.

On the other side, the GENMASK macro is taken from the kernel and it is
used by several SOCs, in U-Boot too. Maybe we like to see directly the
mask, but several users like use it and I should accept it. Both
solutions (fixing GENMASK or revert it) are fine with me.

Today a new patch was sent :

	http://patchwork.ozlabs.org/patch/556361/

same issue, fixing the GENMASK().

Troy's patch was assigned to me, but it belongs to SPI's custodian, so I
move it to Jagan.


Best regards,
Stefano Babic

>>> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
>>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>>>
>>> ---
>>> v2: add sign off/ reviewed by
>>> ---
>>>
>>>  drivers/spi/fsl_qspi.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
>>> index ed39114..dd7048a 100644
>>> --- a/drivers/spi/fsl_qspi.c
>>> +++ b/drivers/spi/fsl_qspi.c
>>> @@ -24,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
>>>
>>>  #define TX_BUFFER_SIZE         0x40
>>>  #endif
>>>
>>> -#define OFFSET_BITS_MASK       GENMASK(24, 0)
>>> +#define OFFSET_BITS_MASK       0x00ffffff
>>>
>>>  #define FLASH_STATUS_WEL       0x02
>>>
>>> --
>>> 2.5.0
>>
>> thanks!
> 
> Best regards,
> Marek Vasut
> 


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

      parent reply	other threads:[~2015-12-14 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 21:27 [U-Boot] [PATCH V2 1/1] Revert "spi: fsl_qspi: Use GENMASK" Troy Kisky
2015-12-11 14:59 ` Jagan Teki
2015-12-11 15:24   ` Marek Vasut
2015-12-11 15:28     ` Fabio Estevam
2015-12-11 15:41       ` Jagan Teki
2015-12-11 18:54         ` Marek Vasut
2015-12-14 11:21     ` Stefano Babic [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=566EA633.1000001@denx.de \
    --to=sbabic@denx.de \
    --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.