From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Simon Horman <horms+renesas@verge.net.au>,
linux-renesas-soc@vger.kernel.org,
Dirk Behme <dirk.behme@gmail.com>
Subject: Re: [PATCH v2 01/10] boot-mode-reg: Add core
Date: Wed, 11 May 2016 10:41:32 +0200 [thread overview]
Message-ID: <CAMuHMdUREdcanmHgp2Q6tq53-G28Eh-mvxX+GK-t6RDeXZLCOw@mail.gmail.com> (raw)
In-Reply-To: <40fe97f4-43e4-6a4a-6c26-d76d6f44138f@de.bosch.com>
Hi Dirk,
On Wed, May 11, 2016 at 10:39 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 11.05.2016 09:54, Geert Uytterhoeven wrote:
>> On Wed, May 11, 2016 at 7:29 AM, Dirk Behme <dirk.behme@de.bosch.com>
>> wrote:
>>>
>>> --- /dev/null
>>> +++ b/drivers/misc/boot-mode-reg/core.c
>>
>>> +/**
>>> + * boot_mode_reg_set() - record boot mode register value
>>> + * @mode: implementation-dependent boot mode register value
>>> + *
>>> + * Records the boot mode register value which may subsequently
>>> + * be retrieved using boot_mode_reg_get().
>>> + *
>>> + * return: 0 on success
>>> + */
>>> +int boot_mode_reg_set(u32 mode)
>>> +{
>>> + int err = -EBUSY;
>>> +
>>> + mutex_lock(&boot_mode_mutex);
>>> + if (!boot_mode_is_set) {
>>
>> You've dropped the check for calling this function a subsequent time with
>> a different value of mode?
>
> Sometimes inverting 'complex' if statements is not that easy ;)
>
> You mean
>
> if (!boot_mode_is_set || boot_mode != mode)
No, De Morgan says
if (!boot_mode_is_set || boot_mode == mode)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2016-05-11 8:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 5:29 [PATCH v2 00/10] ARM: renesas RCar: Add boot-mode-reg core support Dirk Behme
2016-05-11 5:29 ` [PATCH v2 01/10] boot-mode-reg: Add core Dirk Behme
2016-05-11 7:54 ` Geert Uytterhoeven
2016-05-11 8:39 ` Dirk Behme
2016-05-11 8:41 ` Geert Uytterhoeven [this message]
2016-05-11 8:55 ` Dirk Behme
2016-05-11 9:12 ` Geert Uytterhoeven
2016-05-11 5:29 ` [PATCH v2 02/10] boot-mode-reg: Add R-Car driver Dirk Behme
2016-05-11 5:29 ` [PATCH v2 03/10] arm: renesas: rcar-gen2: Obtain MD pin value using boot-mode-reg Dirk Behme
2016-05-11 5:29 ` [PATCH v2 04/10] arm: renesas: r8a7791: " Dirk Behme
2016-05-11 5:29 ` [PATCH v2 05/10] clk: renesas: rcar-gen2: " Dirk Behme
2016-05-11 5:29 ` [PATCH v2 06/10] arm: renesas: rcar-gen2: Remove unused rcar_gen2_read_mode_pins() Dirk Behme
2016-05-11 5:29 ` [PATCH v2 07/10] arm: renesas: rcar-gen3: Make boot-mode-reg Gen3 compatible Dirk Behme
2016-05-11 5:29 ` [PATCH v2 08/10] clk: renesas: rcar-gen3: Obtain MD pin value using boot-mode-reg Dirk Behme
2016-05-11 5:29 ` [PATCH v2 09/10] ARM: dts: r8a779x: Add reset module support Dirk Behme
2016-05-11 8:06 ` Geert Uytterhoeven
2016-05-11 11:56 ` Dirk Behme
2016-05-11 12:13 ` Geert Uytterhoeven
2016-05-11 13:36 ` Dirk Behme
2016-05-11 13:51 ` Geert Uytterhoeven
2016-05-11 14:22 ` Dirk Behme
2016-05-11 5:29 ` [PATCH v2 10/10] boot-mode-reg: Convert to device tree Dirk Behme
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=CAMuHMdUREdcanmHgp2Q6tq53-G28Eh-mvxX+GK-t6RDeXZLCOw@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=dirk.behme@de.bosch.com \
--cc=dirk.behme@gmail.com \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=linux-renesas-soc@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 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.