From patchwork Wed Jan 5 13:14:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12704314 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2083DC433EF for ; Wed, 5 Jan 2022 13:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236921AbiAENOR (ORCPT ); Wed, 5 Jan 2022 08:14:17 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42512 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232983AbiAENOQ (ORCPT ); Wed, 5 Jan 2022 08:14:16 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 14F311F41675 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1641388449; bh=IwWZqhmpLW18piwprcmNzBUFX3j3YU95JZk1ANO0MaM=; h=Date:From:To:Cc:Subject:From; b=SUV8iyam7YQf4KN3P5zwUXPRj55SIQGEC0EWQDIU21R2WC7WdsLYha6fP6G30yoMd +bLRI36IcHBoq5/hXpGXY8AYyWcfTc+ot9PT7jCo55bthcazQ4VCRkQdlwaBsIBDHc rQjlA/f5EvR72LNBez76ZolJuynOHxRurbUbjwzyDS64B8kHorMoO+wGYKS2qNpi52 gjpSCss4KeLiMpz9sDXWns6ovaLAf6py9oEmukqsXXTItN7NrOyqCoP1rZPhLn1Awg 95QxQa1+TxnOAikmgkBXF+HkbNBl3YMZo7G1k4fTskMUXRl066757c5/24h9J2mb8V j60mpL9FfRqTA== Date: Wed, 5 Jan 2022 18:14:03 +0500 From: Muhammad Usama Anjum To: Giovanni Cabiddu , Herbert Xu , "David S. Miller" , "open list:QAT DRIVER" , "open list:CRYPTO API" , open list Cc: usama.anjum@collabora.com Subject: [PATCH v2] crypto: qat - use signed variable to store status and error checking Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org ret should be signed. adf_cfg_get_param_value() and match_string() return signed statuses. The return status may be saved wrongly in unsigned ret variable. Correct the data type of ret to signed int. Acked-by: Giovanni Cabiddu Signed-off-by: Muhammad Usama Anjum --- Changes in v2: Updated commit message --- drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c index 6d10edc40aca..68d39c833332 100644 --- a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c +++ b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c @@ -52,7 +52,7 @@ static const char *const dev_cfg_services[] = { static int get_service_enabled(struct adf_accel_dev *accel_dev) { char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0}; - u32 ret; + int ret; ret = adf_cfg_get_param_value(accel_dev, ADF_GENERAL_SEC, ADF_SERVICES_ENABLED, services);