Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
From: Liang Yang <liang.yang@amlogic.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: jianxin.pan@amlogic.com, bbrezillon@kernel.org, richard@nod.at,
	linux-kernel@vger.kernel.org, marek.vasut@gmail.com,
	linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
	linux-amlogic@lists.infradead.org, computersforpeace@gmail.com,
	dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/4] mtd: rawnand: meson: only initialize the RB completion once
Date: Fri, 19 Apr 2019 11:52:52 +0800
Message-ID: <8ff232c3-f325-5b91-4de1-a39e63939df2@amlogic.com> (raw)
In-Reply-To: <CAFBinCB9Z_H4wX3_g2hVL-XnS6Oq-KtPHa4Z1ws79FGp5jCapQ@mail.gmail.com>

Hi Martin,

On 2019/4/19 3:44, Martin Blumenstingl wrote:
> Hi Liang,
> 
> On Mon, Apr 15, 2019 at 8:04 AM Liang Yang <liang.yang@amlogic.com> wrote:
>>
>>
>> On 2019/4/12 6:00, Martin Blumenstingl wrote:
>>> Documentation/scheduler/completion.txt states:
>>>     Calling init_completion() on the same completion object twice is
>>>     most likely a bug as it re-initializes the queue to an empty queue and
>>>     enqueued tasks could get "lost" - use reinit_completion() in that case,
>>>     but be aware of other races.
>>>
>>> Initialize nfc->completion in meson_nfc_probe using init_completion and
>>> change the call in meson_nfc_queue_rb to reinit_completion so the logic
>>> matches what the documentation suggests.
>>>
>>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>>> ---
>>>    drivers/mtd/nand/raw/meson_nand.c | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
>>> index 57cc4bd3f665..ea57ddcec41e 100644
>>> --- a/drivers/mtd/nand/raw/meson_nand.c
>>> +++ b/drivers/mtd/nand/raw/meson_nand.c
>>> @@ -400,7 +400,7 @@ static int meson_nfc_queue_rb(struct meson_nfc *nfc, int timeout_ms)
>>>        cfg |= NFC_RB_IRQ_EN;
>>>        writel(cfg, nfc->reg_base + NFC_REG_CFG);
>>>
>>> -     init_completion(&nfc->completion);
>>> +     reinit_completion(&nfc->completion);
>> Tested-by:Liang Yang <liang.yang@amlogic.com>
>> Acked-by: Liang Yang <liang.yang@amlogic.com>
> thank you for reviewing and testing my patches!
> 
> [...]
>> Tested-by:Liang Yang <liang.yang@amlogic.com>
>> Acked-by: Liang Yang <liang.yang@amlogic.com>
> please consider the following note for future code-reviews:
> most maintainers take the patch from patchwork and apply it to their git tree.
> however, patchwork is not smart enough to detect when the same
> Tested-by/Acked-by is sent multiple times.
> this results in the same Tested-by/Acked-by being listed multiple
> times in the final commit: [0]
> 
> what I do instead is to reply with one set of Tested-by/Acked-by
> (below the author's Signed-off-by) which is then valid for the whole
> patch.
> There's no problem to have Tested-by and Acked-by at the same time,
> the issue only shows up if you send Acked-by (or any other tag) for
> the same patch multiple times.
> 
Thanks. Well, I known about it now.

> 
> Have a great day!
> Regards,
> Martin
> 
> 
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/commit/?h=nand/next&id=39e01956e2f70ff9f0e97db1a69c9847aa1d5d8b
> 
> .
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 22:00 [PATCH 0/4] meson-nand: small code improvements Martin Blumenstingl
2019-04-11 22:00 ` [PATCH 1/4] mtd: rawnand: meson: use struct_size macro Martin Blumenstingl
2019-04-15  6:01   ` Liang Yang
2019-04-11 22:00 ` [PATCH 2/4] mtd: rawnand: meson: use of_property_count_elems_of_size helper Martin Blumenstingl
2019-04-15  6:02   ` Liang Yang
2019-04-11 22:00 ` [PATCH 3/4] mtd: rawnand: meson: use a void pointer for meson_nfc_dma_buffer_setup Martin Blumenstingl
2019-04-15  6:03   ` Liang Yang
2019-04-11 22:00 ` [PATCH 4/4] mtd: rawnand: meson: only initialize the RB completion once Martin Blumenstingl
2019-04-15  6:04   ` Liang Yang
2019-04-18 19:44     ` Martin Blumenstingl
2019-04-19  3:52       ` Liang Yang [this message]
2019-04-19  9:00       ` Miquel Raynal
2019-04-18 16:22 ` [PATCH 0/4] meson-nand: small code improvements Miquel Raynal

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=8ff232c3-f325-5b91-4de1-a39e63939df2@amlogic.com \
    --to=liang.yang@amlogic.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jianxin.pan@amlogic.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    /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

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git