Received: by 10.213.65.68 with SMTP id h4csp1433127imn; Wed, 21 Mar 2018 10:30:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELt0CfYpfSeNyGX9bTJ+lN7muxOdbtH8WskuCcla7S1X1j2FMoG40DVjurtCrQyQFW/1aSUf X-Received: by 10.98.51.129 with SMTP id z123mr17737939pfz.132.1521653405225; Wed, 21 Mar 2018 10:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521653405; cv=none; d=google.com; s=arc-20160816; b=kJYnV5Z1DZlKkQjadsp+jx0lwzfweNVzRQHB5/zVZo43QJq/9zoo7oL8pfr3d0StfN 3EFL5gI1Zu5RvavNtClHlxyfViGGZW+i6wBzz8zrv1K3usu0GdwfovOSdpWKmE0unN8i 7nth7Njxw4UjUlTbTY4F2bI+8z1wU61QTI8sMEVeL2hYN/ZS1kcnaoj5rOZ0NpubGdlA xz2biTg09YjF5ccxaNsgggbj8iy9AXgJOpw9+qTt1I5qfmvCv2M5XoguOzPRRNwcnXEO ZS3NYEO2+07RnifXCHVihYjsvcmAHgDJm4NhfcljR31+WSsAiK1PTc9MYaZxOai6wj+S vzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=e9yh75WYwu1u2RxH34yfjdtqVWKOzZOlxgi6bDPR47g=; b=crcefp15Cxdc0OgYcVB7Fr55HqvCtRV1Rbm/FUiWUnFsyHNOj4GID+i+u0cPZcwxFy GH6j7NEqmkyPDnbabMhziROoy7EDLN3dAUClgAAp7thHdQh5h2NL83iVufWF71VBzfwA VAGYQ01US3lF6vsVZ4/8dDNpZc7qpaplMme47kA0QgGir+g6MFbpFkLqkx1vNF5xuAkM FwwwNAoROBr67UvLHvgBj11MT7POylZYEEaI/73Hnc51Xy3fydbB/x4cThXRxkOcPHRi cl3AedT8Dog5HJB1Ui6yq7d/jLRkwBFGZLiZrSTpnAE82l1QSf3nTuXm3ObDyAMoIJdI 10Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YbDKL9AQ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11-v6si1311590plj.164.2018.03.21.10.29.49; Wed, 21 Mar 2018 10:30:05 -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=@gmail.com header.s=20161025 header.b=YbDKL9AQ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751920AbeCUR2v (ORCPT + 99 others); Wed, 21 Mar 2018 13:28:51 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:54440 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbeCUR2s (ORCPT ); Wed, 21 Mar 2018 13:28:48 -0400 Received: by mail-wm0-f67.google.com with SMTP id h76so11215250wme.4; Wed, 21 Mar 2018 10:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=e9yh75WYwu1u2RxH34yfjdtqVWKOzZOlxgi6bDPR47g=; b=YbDKL9AQO/EQpY7KaD9gu5GX5EGkaFOm1GkWpw+nIUV7pMYE9AgNpsF6W84E0sSoKh J8gZPE2GkTAUIJ/vYpCkOuLy6sCQ6yhcTDzuHX35r3qY3S8MtB5fJnVylaCtKSyZ+LtF Ulw7izHMcrVtliDBl7Hcq18yto7vLc61bmv4FCPoftoU2OcO0lKk/zpwkcVkQWNT1cd2 nLnCqYtkW4Qo+zt0dR2wKiBt+JvA0GpEthpvm5C+aivSu8K7hXOGhyyCNy2635v/tsLo Fjjmhi0mRoPNd6KIM9oi9QUsFI2Q6NerO8lMCxIZPZUzcWuiiKmipIxS9eL/pc0PdDyQ JhqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=e9yh75WYwu1u2RxH34yfjdtqVWKOzZOlxgi6bDPR47g=; b=qdiXYarOFPCAU80bUwqpR6a1tuiW1t84cuAE0g6X/49qqZb8eT+9mopq8kugcTV2p4 OamOU2wctW5ZZYa8L6Wi/l9uKGWW9zfv353nwsRkUOc0lyMdggec+WZTz4Sv7pukAwEP +HdEXfQ3DjN/qz1Qiy0nlhjY8khSzylN4lX3sF+jJI1N5C36jLegCzQFX4q0o8ig9SNX OGK+y5ZfPll816WUQjZtfZXPu1nBilCc1wDagM640TdmQjHMvlP4vSz6SyRvyUmW1S35 svYx03686RZgvct4k5UrF6d1g6UkIkXOTZmwA6Uza9dm2TRxFQr/sIEkKCMOigJK9NAP XtHg== X-Gm-Message-State: AElRT7HlrnjJnWq7H3qpoQeb5iQjaL9qVErEBWvcM7ZDrb5DC9LTMFjV 24H5MIcGEDSHzW0TNbCl1xI= X-Received: by 10.28.11.139 with SMTP id 133mr3144209wml.80.1521653327188; Wed, 21 Mar 2018 10:28:47 -0700 (PDT) Received: from ltop.local ([2a02:a03f:40ef:cf00:1c27:2579:80f6:3a60]) by smtp.gmail.com with ESMTPSA id e53sm5037123wrg.34.2018.03.21.10.28.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 10:28:46 -0700 (PDT) Date: Wed, 21 Mar 2018 18:28:44 +0100 From: Luc Van Oostenryck To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-ntb@googlegroups.com, linux-crypto@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , Andy Shevchenko , Horia =?utf-8?Q?Geant=C4=83?= , Philippe Ombredanne , Thomas Gleixner , Kate Stewart Subject: Re: [PATCH v13 01/10] iomap: Use correct endian conversion function in mmio_writeXXbe Message-ID: <20180321172843.p6srgiouvhcyyo4s@ltop.local> References: <20180321163745.12286-1-logang@deltatee.com> <20180321163745.12286-2-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180321163745.12286-2-logang@deltatee.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 21, 2018 at 10:37:36AM -0600, Logan Gunthorpe wrote: > The semantics of the iowriteXXbe() functions are to write a > value in CPU endianess to an IO register that is known by the > caller to be in Big Endian. The mmio_writeXXbe() macro, which > is called by iowriteXXbe(), should therefore use cpu_to_beXX() > instead of beXX_to_cpu(). > > Seeing both beXX_to_cpu() and cpu_to_beXX() are both functionally > implemented as either null operations or swabXX operations there > was no noticable bug here. But it is confusing for both developers > and code analysis tools alike. > > Signed-off-by: Logan Gunthorpe > Cc: Philippe Ombredanne > Cc: Thomas Gleixner > Cc: Kate Stewart > Cc: Greg Kroah-Hartman > Cc: Luc Van Oostenryck > --- > lib/iomap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/iomap.c b/lib/iomap.c > index 541d926da95e..be120c13d6cc 100644 > --- a/lib/iomap.c > +++ b/lib/iomap.c > @@ -106,8 +106,8 @@ EXPORT_SYMBOL(ioread32be); > #endif > > #ifndef mmio_write16be > -#define mmio_write16be(val,port) __raw_writew(be16_to_cpu(val),port) > -#define mmio_write32be(val,port) __raw_writel(be32_to_cpu(val),port) > +#define mmio_write16be(val,port) __raw_writew(cpu_to_be16(val),port) > +#define mmio_write32be(val,port) __raw_writel(cpu_to_be32(val),port) > #endif > > void iowrite8(u8 val, void __iomem *addr) > -- > 2.11.0 > LGTM, feel free to add my Reviewed-by: Luc Van Oostenryck -- Luc