From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D2FCC04A95 for ; Tue, 25 Oct 2022 14:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1CICD/+q6W1zuFIrt2lhKzlkl20PxsynzeDlFStcQEA=; b=KjGjQroIJgWSYM Lj72pjFuMrbcK8D+ER87gazLutGDa537Qs9dCu+RVYNdgTj0RdRGluG2qEzjlPx71kK40Xj/UsGiO CPiqLp0LNOOMHfjCdpZ4ly8J4NJfRo0ZWqPKa/pBPBBkX8Uf6v8fGMwVhtiQNdNnqzLe0iF7zW5yA MqYxPa+q5ySp+hT0MtuLfYqojdiLbF5yo+dfhsLUHCpmqU7hRX9frqIbV1f/HmaHcSiKq18lFDYy/ Bz9szBD1ylZ/vPwS3hlLQyY1wenT1eeIwyOvN8EGWpqqhiM02j55POzDvokwMcLAZJzPiiXURBb/S oeKht5IVM2hkx0V14kIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLGy-005utW-LC; Tue, 25 Oct 2022 14:51:20 +0000 Received: from smtp.cesky-hosting.cz ([2a00:1ed0:2:0:1:5bef:c8ee:1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onLGu-005urj-J4 for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 14:51:19 +0000 X-Virus-Scanned: Debian amavisd-new at smtp.cesky-hosting.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elrest.cz; s=rampa2-202208; t=1666708924; bh=PYEMZsYHKT+dgDkbswL32nBIM4jvIDqtH1ZQB5oxgLQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m2nWdHhQD7eu7Wb8ByqsPWL4jwyQU/WyFlfdQ8Ru+fVoo6Nm9RHUbJFEQTx3skIfB hcHg5j1CrP45NcSoHHlehuh7usLdkvg1gfD4dNIUSIdG+op+mJ9vQO73LO1PUhnfOM MUCEyoV8mrsQ6faEwpas8Fcw95j+S0Q4bi/sAvijOB0pqfh5+55TndPV3Z22sJW3Jt CTN+S4Egexqf/XrXeSFv2O60zBQgvMTg6UtcawgSvmoFWdjghdfBv4nA00XpLxXbeH Iad38s4QwS31qYcb+FTpMmaePxsBYGUTbQvlqdxwIOllnr3f/3rhzWxeKiwVPzKMK8 vIBlmBqsvQXqQ== Received: from edaa77c5b7e3 (unknown [5.181.92.50]) (Authenticated sender: tomas.marek@elrest.cz) by smtp.cesky-hosting.cz (Postfix) with ESMTPSA id 179143C0; Tue, 25 Oct 2022 16:41:58 +0200 (CEST) Date: Tue, 25 Oct 2022 16:41:38 +0200 From: Tomas Marek To: Herbert Xu Cc: mpm@selenic.com, mcoquelin.stm32@gmail.com, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, alexandre.torgue@foss.st.com, oleg.karfich@wago.com Subject: Re: [PATCH 1/2] hwrng: stm32 - fix number of returned bytes on read Message-ID: <20221025144138.GA8@edaa77c5b7e3> References: <20221012160924.12226-1-tomas.marek@elrest.cz> <20221012160924.12226-2-tomas.marek@elrest.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_075116_787943_AD8EF49B X-CRM114-Status: GOOD ( 18.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 21, 2022 at 06:41:07PM +0800, Herbert Xu wrote: > On Wed, Oct 12, 2022 at 06:09:23PM +0200, Tomas Marek wrote: > > > > diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c > > index bc22178f83e8..8eaacefd498b 100644 > > --- a/drivers/char/hw_random/stm32-rng.c > > +++ b/drivers/char/hw_random/stm32-rng.c > > @@ -49,11 +49,13 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) > > /* Manage timeout which is based on timer and take */ > > /* care of initial delay time when enabling rng */ > > if (!sr && wait) { > > - retval = readl_relaxed_poll_timeout_atomic(priv->base > > + int ret; > > + > > + ret = readl_relaxed_poll_timeout_atomic(priv->base > > This would make a lot more sense if you called it err instead of ret. > > But as you're fixing a real bug I'm going to apply your patch as is > and you can post an incremental patch to improve it. OK, sounds reasonable. I'll post new patch and rename ret to err. Thanks for the hint and for the review. Tomas > > Thanks, > -- > Email: Herbert Xu > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel