From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772AbcHZNaC (ORCPT ); Fri, 26 Aug 2016 09:30:02 -0400 Received: from pmta2.delivery5.ore.mailhop.org ([54.186.218.12]:59440 "EHLO pmta2.delivery5.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbcHZNaB (ORCPT ); Fri, 26 Aug 2016 09:30:01 -0400 X-MHO-User: 324c755f-6b91-11e6-a502-8b3fed2f8b35 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 74.99.77.15 X-Mail-Handler: DuoCircle Outbound SMTP X-DKIM: OpenDKIM Filter v2.6.8 io C75AC8022D Date: Fri, 26 Aug 2016 13:29:55 +0000 From: Jason Cooper To: LABBE Corentin Cc: mpm@selenic.com, herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 5/5] hwrng: amd: Rework of the amd768-hwrng driver Message-ID: <20160826132955.GF10637@io.lakedaemon.net> References: <1472127395-32195-1-git-send-email-clabbe.montjoie@gmail.com> <1472127395-32195-6-git-send-email-clabbe.montjoie@gmail.com> <20160825145638.GD10637@io.lakedaemon.net> <20160826083802.GA32290@Red> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160826083802.GA32290@Red> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Corentin, On Fri, Aug 26, 2016 at 10:38:02AM +0200, LABBE Corentin wrote: > On Thu, Aug 25, 2016 at 02:56:38PM +0000, Jason Cooper wrote: > > On Thu, Aug 25, 2016 at 02:16:35PM +0200, LABBE Corentin wrote: > > > This patch convert the hwrng interface used by amd768-rng to its new API > > > by replacing data_read()/data_present() by read(). > > > > > > Furthermore, Instead of having two global variable, it's better to use a > > > private struct. This will permit to remove amd_pdev variable. > > > > > > Finally, Instead of accessing hw directly via pmbase, it's better to > > > access after ioport_map() via ioread32/iowrite32. > > > > I was going to recommend a better $subject line, but now I see why it's > > vague. :( I would recommend breaking this patch up into three: > > > > hwrng: amd - Access hardware via ioread32/iowrite32 > > hwrng: amd - Replace global variable with private struct > > hwrng: amd - Convert to new hwrng read() API > > > > That was my first idea, but believed that it wasnt worth it. When working with crypto/rng code, I'm a firm believer in moving cautiously and deliberately. :-) > Anyway I will do it. Thanks! thx, Jason.