mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: xuzaibo@huawei.com
Cc: davem@davemloft.net, forest.zhouchang@huawei.com,
	herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	tanghui20@huawei.com,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH] crypto: hisilicon: Fix misuse of GENMASK macro
Date: Tue, 15 Oct 2019 22:13:30 +0200	[thread overview]
Message-ID: <20191015201330.25973-1-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <1569835209-44326-2-git-send-email-xuzaibo@huawei.com>

Arguments are supposed to be ordered high then low.

Fixes: c8b4b477079d ("crypto: hisilicon - add HiSilicon HPRE accelerator")
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
Spotted when trying to introduce compile time checking that the order
of the arguments to GENMASK are correct [0]. I have only compile tested
the patch.

[0]: https://lore.kernel.org/lkml/20191009214502.637875-1-rikard.falkeborn@gmail.com/

 drivers/crypto/hisilicon/hpre/hpre_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index ca945b29632b..34e0424410bf 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -116,8 +116,8 @@ static const struct hpre_hw_error hpre_hw_errors[] = {
 	{ .int_msk = BIT(7), .msg = "hpre_cltr2_htbt_tm_out_err" },
 	{ .int_msk = BIT(8), .msg = "hpre_cltr3_htbt_tm_out_err" },
 	{ .int_msk = BIT(9), .msg = "hpre_cltr4_htbt_tm_out_err" },
-	{ .int_msk = GENMASK(10, 15), .msg = "hpre_ooo_rdrsp_err" },
-	{ .int_msk = GENMASK(16, 21), .msg = "hpre_ooo_wrrsp_err" },
+	{ .int_msk = GENMASK(15, 10), .msg = "hpre_ooo_rdrsp_err" },
+	{ .int_msk = GENMASK(21, 16), .msg = "hpre_ooo_wrrsp_err" },
 	{ /* sentinel */ }
 };
 
-- 
2.23.0


  reply	other threads:[~2019-10-15 20:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30  9:20 [PATCH 0/5] crypto: hisilicon - add HPRE support Zaibo Xu
2019-09-30  9:20 ` [PATCH 1/5] crypto: hisilicon - add HiSilicon HPRE accelerator Zaibo Xu
2019-10-15 20:13   ` Rikard Falkeborn [this message]
2019-10-16  1:34     ` [PATCH] crypto: hisilicon: Fix misuse of GENMASK macro Xu Zaibo
2019-10-18  8:07     ` Herbert Xu
2019-09-30  9:20 ` [PATCH 2/5] crypto: hisilicon - add SRIOV support for HPRE Zaibo Xu
2019-09-30  9:20 ` [PATCH 3/5] Documentation: Add debugfs doc for hisi_hpre Zaibo Xu
2019-09-30  9:20 ` [PATCH 4/5] crypto: hisilicon: Add debugfs for HPRE Zaibo Xu
2019-09-30  9:20 ` [PATCH 5/5] MAINTAINERS: Add maintainer for HiSilicon HPRE driver Zaibo Xu
2019-10-09  3:15 ` [PATCH 0/5] crypto: hisilicon - add HPRE support Xu Zaibo
2019-10-10 12:54 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015201330.25973-1-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.com \
    --cc=davem@davemloft.net \
    --cc=forest.zhouchang@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=tanghui20@huawei.com \
    --cc=xuzaibo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®