Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2144762yba; Fri, 19 Apr 2019 13:04:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxBG6i9jeQA2kvdISjyiasKXtdMlo6N4y9loaokXZ+L8gvfj7vCMfstVOXPEdlgnsMOoZB X-Received: by 2002:a65:51c8:: with SMTP id i8mr5604184pgq.175.1555704247512; Fri, 19 Apr 2019 13:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555704247; cv=none; d=google.com; s=arc-20160816; b=frDhW5B1clCVpOWWjXu133RENOBM7JY/YCTSmohc2sHDTcOtm+b6bwU2OGl2hbFbg4 S0lMm7pDk/cUsCAQO7HJV8C7+0BUBa3FXI2plK+E5lbNkVW5MmdSyot3JwzdamA3PnWy yyQgXSSNfrhDDMJwxq6oSNzfpqIl5dFGzYjcYwMrKw04oKhuu3T7WQkr3vijFM2rexxa PHjugDngnt8D20JCVSCig5Mn0EBI96q6vJsoXayIU30e40Iio8c4mOOu88THF9ksDAVD BVvMWXAa0AM+fGyF55Vs1r95lQUfloqy9KM6riyzDXcJp691Ww4WK9JWszhFKYrMZ3OX orFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Rus2tgghhd5BphDJcYqUpdeTRsM3Vhqdl22Dhqes1l0=; b=tVB/NeLapd7C//+EkdVmMO+nBo4HAXmSRvJMjnvA6sduw3TxB3f8dmaKDT9lUHIusF ec24KxiNgS/imdfur/9x8zl8ijImTL4OkzpmYEJ1i51rDb9vXOuX+N6TYpYGSwEu0AFN 0Edq5ZsZduR6rqbrv4kJTQQZAv/4tLBh4hJbOO0Vmw86mrOAcgu1ASuEme64TvTCbBBB KAS2Agurqpu7Pc1gDJTb9A86unw6AmqCrrseCQnDQC3UMDZe38WQlew37Q/h4ycfKjR+ GJnIriBwfC1PyPKc9fN2aNpIAICwkCl1sipGtUj7uddmNWwuSn6RfdbqAQ+Gjp66pp5u iRFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si6019347pgl.36.2019.04.19.13.03.52; Fri, 19 Apr 2019 13:04:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727528AbfDSUCh convert rfc822-to-8bit (ORCPT + 99 others); Fri, 19 Apr 2019 16:02:37 -0400 Received: from mslow2.mail.gandi.net ([217.70.178.242]:53232 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbfDSUCh (ORCPT ); Fri, 19 Apr 2019 16:02:37 -0400 X-Greylist: delayed 4785 seconds by postgrey-1.27 at vger.kernel.org; Fri, 19 Apr 2019 16:02:35 EDT Received: from relay7-d.mail.gandi.net (unknown [217.70.183.200]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 08C973AC227 for ; Fri, 19 Apr 2019 09:00:50 +0000 (UTC) X-Originating-IP: 91.224.148.103 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A093720011; Fri, 19 Apr 2019 09:00:46 +0000 (UTC) Date: Fri, 19 Apr 2019 11:00:44 +0200 From: Miquel Raynal To: Martin Blumenstingl Cc: Liang Yang , linux-amlogic@lists.infradead.org, linux-mtd@lists.infradead.org, richard@nod.at, 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 Subject: Re: [PATCH 4/4] mtd: rawnand: meson: only initialize the RB completion once Message-ID: <20190419110044.6a2d7d86@xps13> In-Reply-To: References: <20190411220056.19109-1-martin.blumenstingl@googlemail.com> <20190411220056.19109-5-martin.blumenstingl@googlemail.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, Martin Blumenstingl wrote on Thu, 18 Apr 2019 21:44:05 +0200: > 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. Crap, I did not noticed that. Thanks for pointing it. I don't have time right now to fix it and send a new PR, I'll see in one week. Thanks, Miquèl