From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/7] gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs
Date: Thu, 09 Dec 2010 07:59:25 +0100 [thread overview]
Message-ID: <4D007E4D.3070601@free.fr> (raw)
In-Reply-To: <4D00730F.1030807@free.fr>
Hi Chris,
Le 09/12/2010 07:11, Chris Moore a ?crit :
> Hi,
>
> Le 07/12/2010 18:39, Albert ARIBAUD a ?crit :
>> Le 07/12/2010 18:10, Prafulla Wadaskar a ?crit :
>>
>>>>> + val&= ~MFP_AF_MASK;
>>>> Do we need to do this& here? For val is only 0 here...
>>> This can be removed.
>> OTOH, with the&, this line makes no assumption about val, and thus will
>> work regardless of it. If the& is removed, and if later val is set to
>> non-zero before reaching this instruction, it will cause a bug.
>>
>> IOW, the& makes the statement more resilient.
>>
>
> If val really is zero then the result will always be zero :(
> Simply removing the & would give a different result.
> It would be better to remove the whole bloody line ;-)
>
> I haven't followed this thread but I suspect the original code was wrong.
Good point as to the removal if the removal must be done :)
I still think that the original is functionally more correct *if we are
not sure that val will always be zero.
I'll have a second look tonight.
> Cheers,
> Chris
Amicalement,
--
Albert.
next prev parent reply other threads:[~2010-12-09 6:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 17:06 [U-Boot] [PATCH v4 1/7] arm: Add Support for Marvell ARMADA 100 Familiy SoCs Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 2/7] gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs Prafulla Wadaskar
2010-12-07 15:23 ` Lei Wen
2010-12-07 17:10 ` Prafulla Wadaskar
2010-12-07 17:39 ` Albert ARIBAUD
2010-12-09 6:11 ` Chris Moore
2010-12-09 6:59 ` Albert ARIBAUD [this message]
2010-12-09 9:18 ` Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 3/7] add Multi Function Pin configuration support for ARMADA100 Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 5/7] Serial: Add UART support for Marvell ARMADA 100 SoCs Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 6/7] mv-common.h: Add support for ARMADA100 Platforms Prafulla Wadaskar
2010-12-07 15:32 ` Lei Wen
2010-12-07 16:58 ` Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 7/7] Armada100: Add Board Support for Marvell Aspenite-DB Prafulla Wadaskar
2010-12-07 17:06 ` [U-Boot] [PATCH v4 0/7] Add Marvell New Soc Support ARMADA100 Prafulla Wadaskar
2010-12-11 14:14 ` [U-Boot] [PATCH v4 7/7] Armada100: Add Board Support for Marvell Aspenite-DB Prafulla Wadaskar
2010-12-11 14:13 ` [U-Boot] [PATCH v4 5/7] Serial: Add UART support for Marvell ARMADA 100 SoCs Prafulla Wadaskar
2010-12-11 14:13 ` [U-Boot] [PATCH v4 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro Prafulla Wadaskar
2010-12-11 14:13 ` [U-Boot] [PATCH v4 3/7] add Multi Function Pin configuration support for ARMADA100 Prafulla Wadaskar
2010-12-08 2:32 ` [U-Boot] [PATCH v4 1/7] arm: Add Support for Marvell ARMADA 100 Familiy SoCs Eric Miao
2010-12-08 5:19 ` Prafulla Wadaskar
2010-12-11 14:12 ` Prafulla Wadaskar
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=4D007E4D.3070601@free.fr \
--to=albert.aribaud@free.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox