Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp309675iol; Thu, 9 Jun 2022 04:27:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5lZPemTpWd3sf0EXoNYvAUroMiRItPu3vOckW4CXtz4QZS20s60PGxYPF5DXub3x26okB X-Received: by 2002:a17:907:1b05:b0:6f0:18d8:7be0 with SMTP id mp5-20020a1709071b0500b006f018d87be0mr35226245ejc.561.1654774031064; Thu, 09 Jun 2022 04:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654774031; cv=none; d=google.com; s=arc-20160816; b=vX9MKWPFAJ0Ub3L/KvmbRuU3Ngk1c7oe/o6sB7pRSNgPwWU7AsnTXL/CU4WSb6Gwv6 ati7AjZZcEFLKOY0whCMFozN7N14t8MhjLsNHymxpwl2Xu2SPr9WnBEnWd32Q0G6jNKy M/VoHe6pPBsF0GAEzF6DQM8BCp7ur00Rg2VCyF40Z7Slk3u/Luku7tPWWlQTCPS+j07C r3kNssNtGyZmidzMRhEXOqFonMuD7R1YJo5RqfchyqyP5qyxsPvB/gBDu/UMQx/VswlD TCmeOK2fgGIlrt/mAO1/k8HBuQMEsBdLZOJc0UMOqsW/1ueONMK3vCJrmEWpXP6E184b ZGqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7jF4N7neBgV7JhIswsVp9AOLXLtQT63bZs/AisOorB8=; b=yNT0SRvBP9QiP5g/wfj+8oggqxh0HOu0h/AH468xvACsQz7NQeKFiW6Y47IvjYwOE1 ub8U3Aw2ptfvJCfSOdRFAP9BzlfkXBrS/P6+Gos/Wy6+GR4rciedRsVyBFIBb9DSelPg OZPlbJ+ay2wL9xuY0V0JBCdvH/gxew5TG02eeca1PgvLQLOYEW5wiQ/YoAwscUmckm5a RsPUd5eSUpsCKODSxrkWcL2izV/Cx/vhj+9rprTgEDGLv5KtLS9ES+08+bzyOVxAOjY3 MMaPAxUuynpMMvavf5Y+vZMfYCvmgk2ttZagn3M2rRmDHP8EZk9bZz672olH7hpJINg1 q2Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020a170906545300b0070aaee0b228si9109238ejp.52.2022.06.09.04.26.33; Thu, 09 Jun 2022 04:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237149AbiFILYp (ORCPT + 99 others); Thu, 9 Jun 2022 07:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243606AbiFILYi (ORCPT ); Thu, 9 Jun 2022 07:24:38 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D021D488BD; Thu, 9 Jun 2022 04:24:36 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LJhYM6gYWzjX9D; Thu, 9 Jun 2022 19:23:35 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 19:24:34 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 19:24:34 +0800 From: Weili Qian To: CC: , , , , Weili Qian Subject: [PATCH] crypto: hisilicon/trng - fix local variable type Date: Thu, 9 Jun 2022 19:18:19 +0800 Message-ID: <20220609111819.29465-1-qianweili@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The return value of 'readl_poll_timeout' is '0' or '-ETIMEDOUT'. Therefore, change the local variable 'ret' type from 'u32' to 'int'. Signed-off-by: Weili Qian --- drivers/crypto/hisilicon/trng/trng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/trng/trng.c b/drivers/crypto/hisilicon/trng/trng.c index 829f2caf0f67..97e500db0a82 100644 --- a/drivers/crypto/hisilicon/trng/trng.c +++ b/drivers/crypto/hisilicon/trng/trng.c @@ -185,7 +185,7 @@ static int hisi_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) struct hisi_trng *trng; int currsize = 0; u32 val = 0; - u32 ret; + int ret; trng = container_of(rng, struct hisi_trng, rng); -- 2.33.0