Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp971388yba; Thu, 18 Apr 2019 12:45:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/1301lloCM88RNUFhnaNroNv7eXFvqHnpKM2s+EAjR4b62/mkh2U6AbXM4tTZNTbNrX+n X-Received: by 2002:a17:902:b210:: with SMTP id t16mr92649732plr.84.1555616749451; Thu, 18 Apr 2019 12:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555616749; cv=none; d=google.com; s=arc-20160816; b=WVP49DUTWnEfTDFzqj5yTVfRtEi2oDxkDLqQjeEL3tZefytgOQID18FTe6x86ewrcr TlgW9QxoXGIB9v61urRtGgvRNoQws++JlJXOUXrqyYywfi4CaxoGvtX5j6mAe3egX75w rU/Ng6ph98GRMgDGn1PImU5LX6hSptdmtfp7KZMMi4fDOyvwyi+o1zBtPFVYf9smvPVU CCwteXHBGO0l6+s88qBnykdCUEn6IhjA6jzrrmESzKY9j0h6Gp8dI1VVZLUJ8OJjsDdC kIc/FUuX/NgJ6sx9Md1ozogkwgk59Rmwacgz12jE7PUD9AB1UnwNgHiiu6xA27Pd/tUN fAaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Bx5KZfdXjm8ofYlrpIW9ivlLzCel7RPnKzTt4neA1m4=; b=QxllHgS3kphIh0LPAyChtDneYqpPD9Rw09Ly6qnI0IaGWQO2cw0QSyR68/QX3qc92M Te3shvi3p86SFh9LIPMtjyF6YRSnRxxLk9s8aNKgRqI2tdgMPA/7Si/2q+RGPWwBi9bF 7noIfTQdil7F8lslu0t2mx6POC38DfjA4Y7WkXAc84pcTwrmQE/fZowg8B/XQNvl2ToX k4/gk69Qtmlh25vk7EyBDDmI6lKJErs8pmiAFcTLKHxYSriBi7NNUb+rijGyDmF1/wDj bYYkGAWH8YC5jYBCeFsjQnwZoksiT8wk9EyWf3RsDsg7creC1J69GOme4Yq3elJkzth+ Gw+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=PDjG2y4A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ct3si1299086plb.387.2019.04.18.12.45.32; Thu, 18 Apr 2019 12:45:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=PDjG2y4A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390074AbfDRToR (ORCPT + 99 others); Thu, 18 Apr 2019 15:44:17 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36841 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389965AbfDRToQ (ORCPT ); Thu, 18 Apr 2019 15:44:16 -0400 Received: by mail-ot1-f68.google.com with SMTP id o74so2690283ota.3 for ; Thu, 18 Apr 2019 12:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bx5KZfdXjm8ofYlrpIW9ivlLzCel7RPnKzTt4neA1m4=; b=PDjG2y4A+ODJSC0q5bF1f9z9TQsnJEK6Z/nQLQt6t6m+YV8A+/CJ5zo+I9dRy7vnTK AqE2sG9BqaK/BTOKWz/xe3nFKoForFr8PjoeE2FbzLdBSRfk2/e4N5dKybQfA6JnEPB/ AZe0PZX3LzhwWkAR/sfZO16S6VWzJeyVNVYPNU4a+g2byBvhyoJsul3efRIdpnoSOJAL 8hYOGDhaGN/PRqpNUr+Hh0m2SYSu3TnUKRHCnDKXHcBzTllEoufAV5/stkq0bx8SkrSH 0PK3Lsxdp2SV/M1qIjVTsGYi/pxWmMcn3dpIJ9NTotVkZKiNIACd1DbS66zS1ie3Agk+ x6fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bx5KZfdXjm8ofYlrpIW9ivlLzCel7RPnKzTt4neA1m4=; b=G8xRr8HkqWTJyUfu/UmkVYSqMcf/Z9j/MvmUDR2LPziDbp7QadbI9YxivLtISmRVaL 8n3ZRdqpVxnhcCq5DkfsTkWc8iGfPKb3fL1EeDs+cVwhnt5zPeOuMABD50o37uj08pl8 tG37ZTtGQ6FPQGMcBbZM23pS4H8bDrra2WY7y9isqhSPJe5+VAdpQ6kKA/IKDqqvsZHW 5vHH/UGnQPoIKCx1bUR6XIG3VmKTPqfZNOiHpkmvAk7404BGX2nM9tWPwZHROFWslAep HU+fYWHftXSU+1qn8LSz/DeP8HT8N4llc4uHI2dyvjGTM+a8cy25l4+nS9ej3OtczXea KyZQ== X-Gm-Message-State: APjAAAXj4zhr+q5kSu46jo0RllLWEaFXNW2W3zvZmUqaHSrKuxVM7HZy tTeuop0yVdGAjBybslwPaMGOCAsjLpZFFUqBRCE= X-Received: by 2002:a9d:5e90:: with SMTP id f16mr56649724otl.86.1555616655912; Thu, 18 Apr 2019 12:44:15 -0700 (PDT) MIME-Version: 1.0 References: <20190411220056.19109-1-martin.blumenstingl@googlemail.com> <20190411220056.19109-5-martin.blumenstingl@googlemail.com> In-Reply-To: From: Martin Blumenstingl Date: Thu, 18 Apr 2019 21:44:05 +0200 Message-ID: Subject: Re: [PATCH 4/4] mtd: rawnand: meson: only initialize the RB completion once To: Liang Yang Cc: linux-amlogic@lists.infradead.org, linux-mtd@lists.infradead.org, richard@nod.at, miquel.raynal@bootlin.com, linux-arm-kernel@lists.infradead.org, marek.vasut@gmail.com, linux-kernel@vger.kernel.org, computersforpeace@gmail.com, dwmw2@infradead.org, bbrezillon@kernel.org, jianxin.pan@amlogic.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liang, On Mon, Apr 15, 2019 at 8:04 AM Liang Yang 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 > > --- > > 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 > Acked-by: Liang Yang thank you for reviewing and testing my patches! [...] > Tested-by:Liang Yang > Acked-by: Liang Yang 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. 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