From patchwork Fri Feb 16 15:19:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773984 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B4B51339BE for ; Fri, 16 Feb 2024 15:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097889; cv=none; b=axDVss3P10B75mjhwqwPWXbUwWeCKZlxuTSw5KvEm9q3H28djl/hSLbE8cY0o6uWWGvYldpswXZ+ia+TIBhIAVNJI2c7Veatj9CduE0K/hObR1H608xSheW7BHIBSkKasY1toM2Jfy3Mk+Z8Hp1KRZtr77ufZJkqFhcRA/KQiHE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097889; c=relaxed/simple; bh=4Nx676GjhlrO2ieWVHXGRi7yvtMx/n9XroKkfZFe3HE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hlJlNVwTacfyqUVQZtk21U9RlRW3XTVNv1euwvSOk3rcccRtE7gQsuBwJ63FfeWhtD0CFz1ezjUfP1Yfho2XFIvxP88Dmv4D93NCi5ddK9wBCmtEVsFPXjsEowJMPqvaekLxWgjk1CieACtyCPaWAdC5xCkDgyUZAOy3qVMxQZk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=F019ZlIV; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="F019ZlIV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097888; x=1739633888; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Nx676GjhlrO2ieWVHXGRi7yvtMx/n9XroKkfZFe3HE=; b=F019ZlIVwa17Ez0tfNawsFnctNMezjSh9IHC+pcMlo5aw7pFAo2J1iv3 v+CRcFu2IyaBARXwrNxXV+8nqJQasLzVSLhypYHxlieyObX7FECF+ZRSD 3dqNsDCcJekK7KYrXIDHE/aAPSNSK3v579K9K8O7U5VQucGVIDGt0Y92U NlOV+DGeCY8hVX+ywTXpr/83utCyxNDCmhwZrOBNIhkxv0fj7Ml9CR6gi Hv9lokbXhX6uB8u9aOj9zVu6lfyv13qj3+h8eQ7gMB5LE9oT/tIN1rz4t h13E8EJczEm8ObdIQzKdCoUfJADYVc+6PHKVSZBc9REPIC5mXJhnte4qW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622730" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622730" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861461" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861461" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:06 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 1/6] crypto: qat - remove unused macros in qat_comp_alg.c Date: Fri, 16 Feb 2024 15:19:55 +0000 Message-Id: <20240216151959.19382-2-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland As a result of the removal of qat_zlib_deflate, some defines where not removed. Remove them. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:21:9: warning: macro is not used [-Wunused-macros] 21 | #define QAT_RFC_1950_CM_OFFSET 4 | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:16:9: warning: macro is not used [-Wunused-macros] 16 | #define QAT_RFC_1950_HDR_SIZE 2 | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:17:9: warning: macro is not used [-Wunused-macros] 17 | #define QAT_RFC_1950_FOOTER_SIZE 4 | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:22:9: warning: macro is not used [-Wunused-macros] 22 | #define QAT_RFC_1950_DICT_MASK 0x20 | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:18:9: warning: macro is not used [-Wunused-macros] 18 | #define QAT_RFC_1950_CM_DEFLATE 8 | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:20:9: warning: macro is not used [-Wunused-macros] 20 | #define QAT_RFC_1950_CM_MASK 0x0f | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:23:9: warning: macro is not used [-Wunused-macros] 23 | #define QAT_RFC_1950_COMP_HDR 0x785e | ^ drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:19:9: warning: macro is not used [-Wunused-macros] 19 | #define QAT_RFC_1950_CM_DEFLATE_CINFO_32K 7 | ^ Fixes: e9dd20e0e5f6 ("crypto: qat - Remove zlib-deflate") Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/qat_comp_algs.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/qat_comp_algs.c b/drivers/crypto/intel/qat/qat_common/qat_comp_algs.c index bf8c0ee62917..2ba4aa22e092 100644 --- a/drivers/crypto/intel/qat/qat_common/qat_comp_algs.c +++ b/drivers/crypto/intel/qat/qat_common/qat_comp_algs.c @@ -13,15 +13,6 @@ #include "qat_compression.h" #include "qat_algs_send.h" -#define QAT_RFC_1950_HDR_SIZE 2 -#define QAT_RFC_1950_FOOTER_SIZE 4 -#define QAT_RFC_1950_CM_DEFLATE 8 -#define QAT_RFC_1950_CM_DEFLATE_CINFO_32K 7 -#define QAT_RFC_1950_CM_MASK 0x0f -#define QAT_RFC_1950_CM_OFFSET 4 -#define QAT_RFC_1950_DICT_MASK 0x20 -#define QAT_RFC_1950_COMP_HDR 0x785e - static DEFINE_MUTEX(algs_lock); static unsigned int active_devs; From patchwork Fri Feb 16 15:19:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A091413473B for ; Fri, 16 Feb 2024 15:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097892; cv=none; b=pShqEBtodaZO05bmbqPjhcZWOz5drvUeQxe7cn35bkHkMXYiVCFaJrHpcHPL/R7tVME40KsusxNkbMgDNKQhetNATtLDji4Zyz8QbyPnSw9bKj75O4WXQbR3GWXhFxCcVgozIzVyTGH41cQvMVB6Gf7kCoS7bnp09mMQ0bYI9lM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097892; c=relaxed/simple; bh=sZ2C3mne6OTjQqtXyrDf/zHkt8Aoei4vrNF3BTSqarw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J/tBX8wieBMslM+0W9BNg07uoZYzLnrpLkUxA6ZzsYVH3Kax9rEIhbfT2CRqTJ4WrTR5SQ4uD3FFUe1W7+bqSHzaLDuyqLxyv/ZCTjLUScFYM0j9+tk8ZfBLPO8ayZgX6q4SqoIR6pclur2XJPaFvaA7kZlkwWjn9dXM170xuaM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Go3nNHgv; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Go3nNHgv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097891; x=1739633891; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sZ2C3mne6OTjQqtXyrDf/zHkt8Aoei4vrNF3BTSqarw=; b=Go3nNHgv2dAgw+asfeZsXEmKcMJ7NT2EQuM49ccd1vkkH/rXmpsb2s5t JoWdjVr6+lhll3HhrTa51jg85N/Ub5tf+i8+ThZbAWGzAGZM9BBuRbL1k qU5TZjmNhWPkQZc9kaMugmyTfJEoX+jJBWvF15H3hZ+IYUMmjqpMqXXNY eb0TUHWICu/ZFj/WLvwKPn+hfhf/pEB+SgYt04jgaICwXZmHu9HJSLHxy M+93g/MxaktWoBPsxpCaKnrCjuJTSESngovewE4JAeOC1iEDtQN23TZ02 nJpA+An4ONSGqCRSOpMN5EtyqV1JjbBHoQxTG2fFHtBWSvojgtHu+ZGGk g==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622734" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622734" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861470" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861470" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:09 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 2/6] crypto: qat - removed unused macro in adf_cnv_dbgfs.c Date: Fri, 16 Feb 2024 15:19:56 +0000 Message-Id: <20240216151959.19382-3-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland This macro was added but never used, remove it. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c:19:9: warning: macro is not used [-Wunused-macros] 19 | #define CNV_SLICE_ERR_MASK GENMASK(7, 0) | ^ Fixes: d807f0240c71 ("crypto: qat - add cnv_errors debugfs file") Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c b/drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c index 07119c487da0..627953a72d47 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c +++ b/drivers/crypto/intel/qat/qat_common/adf_cnv_dbgfs.c @@ -16,7 +16,6 @@ #define CNV_ERR_INFO_MASK GENMASK(11, 0) #define CNV_ERR_TYPE_MASK GENMASK(15, 12) -#define CNV_SLICE_ERR_MASK GENMASK(7, 0) #define CNV_SLICE_ERR_SIGN_BIT_INDEX 7 #define CNV_DELTA_ERR_SIGN_BIT_INDEX 11 From patchwork Fri Feb 16 15:19:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773983 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A46545465D for ; Fri, 16 Feb 2024 15:38:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097898; cv=none; b=BBUYiEpHgREqvsew5bcE9rlnx10w94McFgPvjn3t+J5DR7BqvUmwTU6csCd+x75Ytje/yianmePF15JiMV9ZKHiiL4t1CF28E5sM+iv+HehQFgvTXOtdnYYgMcOF6kPLvsgozORJ/NCbAK4OXJ5DV/aZw6uskKOEo0WGrgD7TbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097898; c=relaxed/simple; bh=fKN7swly9kCLnMN+x7Qml4YUZNloWLqFtukJhVFq36I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lcFeXuxb34/ouQTJsX+Nltqh7luOVl+efdHiTEs5SWdNwW8T4SrDqkPl/FCwZ36YSLxAhpS3LS8E+9Pn5LSaFuQKDgK1QUBAdmDqyVVfzaoEub1ZM5GBJOiNPWX4EmJOgodF7UT1tGh1cGBEBPxgrdfc9DewIBrXAvnBTG/Vifs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VDzyFcjr; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VDzyFcjr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097897; x=1739633897; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fKN7swly9kCLnMN+x7Qml4YUZNloWLqFtukJhVFq36I=; b=VDzyFcjrcam8D+X2G5fUe32MNw1CNPTWeRUjqqpaxTuFL1kdkHUga4cz kehV5OTUyDDMosd69/o15TZbYPEsXDO5pwt1b+PeDoHCK0DmoCZkJ0h01 FA7HDHoWxo90UtCGAwcjrSgj44qgidU2R3/20Rvh7cVNOdKRIavMyoXoj AMEVTJDkcAejEYS2/Np3L3RtjJwub+1VNgvBgAly9I+T2Tb8Ag6/s/Vmu FLs9KIlm/D0tYYxEQfbKs+Vswymu5zlNgKtOb7apShRZnfTZ6bxH5uk4t Spz8qmXlQFR9XNJZyUxvzdUyRngSaAx040ljv1nWl+glF1vFBlELra0U+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622742" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622742" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861475" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861475" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:15 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 3/6] crypto: qat - avoid division by zero Date: Fri, 16 Feb 2024 15:19:57 +0000 Message-Id: <20240216151959.19382-4-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland Check if delta_us is not zero and return -EINVAL if it is. delta_us is unlikely to be zero as there is a sleep between the reads of the two timestamps. This is to fix the following warning when compiling the QAT driver using clang scan-build: drivers/crypto/intel/qat/qat_common/adf_clock.c:87:9: warning: Division by zero [core.DivideZero] 87 | temp = DIV_ROUND_CLOSEST_ULL(temp, delta_us); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: e2980ba57e79 ("crypto: qat - add measure clock frequency") Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/adf_clock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/intel/qat/qat_common/adf_clock.c b/drivers/crypto/intel/qat/qat_common/adf_clock.c index 01e0a389e462..cf89f57de2a7 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_clock.c +++ b/drivers/crypto/intel/qat/qat_common/adf_clock.c @@ -83,6 +83,9 @@ static int measure_clock(struct adf_accel_dev *accel_dev, u32 *frequency) } delta_us = timespec_to_us(&ts3) - timespec_to_us(&ts1); + if (!delta_us) + return -EINVAL; + temp = (timestamp2 - timestamp1) * ME_CLK_DIVIDER * 10; temp = DIV_ROUND_CLOSEST_ULL(temp, delta_us); /* From patchwork Fri Feb 16 15:19:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773499 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B12B7134743 for ; Fri, 16 Feb 2024 15:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097901; cv=none; b=Ug2lD5ZV3EVKeCL85B6oaTNO38G8ziVlqD7xzSr5whYMGJ+8fLehHgmi8dKxogsBAEFNzG8nayOlDsY9pTduZP16MFpyZBFgSJJDxapARJzR9RBffog65nnpN7GnSpCbBDzTshJ/Q37IkNQ71+eMZRKNBhjFQG+flWHPMC3O58s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097901; c=relaxed/simple; bh=2w9GKgQIDKfioQKEPUufnlRayU2NVlKOQjZZRZ5hrvQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bPDXebo61lyXIPml97RnMMms9LQiBxh67glQ3fYZ7PjClBB8r3bF/mTih1iz8FHqbBERk8Y7PWtMv4WX7HvY++YomsHyAjtcHp3jNqBpmp2gGD7rmDE6QGGHLUEQCT+j8fCKPT3gzz/lPznpWInHBI2qLxusguVdPCKZu14q8I8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jNne3yrQ; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jNne3yrQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097900; x=1739633900; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2w9GKgQIDKfioQKEPUufnlRayU2NVlKOQjZZRZ5hrvQ=; b=jNne3yrQ9nThAXfYREb7qK11qgrL3UisHkwoiZpg7Jj5UB1EVEzA5Hbo r/2QOImsvImLvWm/+J3Yz5lUOO5oMbnakmBLpY5AHJYCOTTJByCtBnsfg PDiTTwQBvPc49ozpLtcasvjljd1g3XVMvGhIHHnxc6k3TgC27pglFZG77 9hrQZAcc+3aVH9mu3qJKVMFneFUfJNTP7RfvVuvbb5RJwLVmWL6CSR9hX Pd6cficwVS5rVmlefaAPmELJ+MTlD9uTLo9IxkiHiKKqEL821/bulFXef jP+qcElBi62/gXL0LzbcC5VhiXOvst/hjOOoacp1oN5YxlyMsToV2GxpL w==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622743" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622743" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861479" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861479" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:18 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 4/6] crypto: qat - remove double initialization of value Date: Fri, 16 Feb 2024 15:19:58 +0000 Message-Id: <20240216151959.19382-5-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland Remove double initialization of the reg variable. This is to fix the following warning when compiling the QAT driver using clang scan-build: drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c:1010:6: warning: Value stored to 'reg' during its initialization is never read [deadcode.DeadStores] 1010 | u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SSMCPPERR); | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c:1109:6: warning: Value stored to 'reg' during its initialization is never read [deadcode.DeadStores] 1109 | u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SER_ERR_SSMSH); | ^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 99b1c9826e48 ("crypto: qat - count QAT GEN4 errors") Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c b/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c index 048c24607939..2dd3772bf58a 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c +++ b/drivers/crypto/intel/qat/qat_common/adf_gen4_ras.c @@ -1007,8 +1007,7 @@ static bool adf_handle_spppar_err(struct adf_accel_dev *accel_dev, static bool adf_handle_ssmcpppar_err(struct adf_accel_dev *accel_dev, void __iomem *csr, u32 iastatssm) { - u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SSMCPPERR); - u32 bits_num = BITS_PER_REG(reg); + u32 reg, bits_num = BITS_PER_REG(reg); bool reset_required = false; unsigned long errs_bits; u32 bit_iterator; @@ -1106,8 +1105,7 @@ static bool adf_handle_rf_parr_err(struct adf_accel_dev *accel_dev, static bool adf_handle_ser_err_ssmsh(struct adf_accel_dev *accel_dev, void __iomem *csr, u32 iastatssm) { - u32 reg = ADF_CSR_RD(csr, ADF_GEN4_SER_ERR_SSMSH); - u32 bits_num = BITS_PER_REG(reg); + u32 reg, bits_num = BITS_PER_REG(reg); bool reset_required = false; unsigned long errs_bits; u32 bit_iterator; From patchwork Fri Feb 16 15:19:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773982 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9293134CC8 for ; Fri, 16 Feb 2024 15:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097905; cv=none; b=fxkwYMAlty4paSLonTEuvyQEI67bZhYTgS41lXi5oQtR3/bLVOPmjQkzo2ETbhC1XiVQ0LE5tnC/sKmARh6DL+J3+7VhkbQTomBufRfnZHP9lzqPFLH2l2ZTC4YfH3mu19rFrc7MDddwv/QHsed70Ed03wWMSrRMEPeDtMkb2Qk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097905; c=relaxed/simple; bh=cCUm1Kkkg+CfUo6zVGhxnMCovD8n73SY/FX8dCxcl3I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JasAmOdpCwVJYyRQhxyCL0erctAgFLxee8Z5nFccPkUqkt326w/69unYstJTTzaa6ukaQ6c2MKZMKXodSp/uNP5yn8iapp93I3yIYQQN0Wh9lhh5z+22CYCS9kDbzKJHl5K2/WP6bQfMn9/+tPM7Deg0P1PtxrAUzw2nFBErVlg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=U3o5lQjn; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="U3o5lQjn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097904; x=1739633904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cCUm1Kkkg+CfUo6zVGhxnMCovD8n73SY/FX8dCxcl3I=; b=U3o5lQjn2UQ3c4FWnTfnWFb5+NH5axssQTW+Gez4MxTJOS+CiOnCjh7M deBIBCv1NgIxa19HHTATcLaS0eAJghxJsapDmZwQf8A+tEDx+OaBXYb8H MduWKeq+bKdocprpDyCLvTrG0Poy9JYRq6jJWljCtoSBGN1Q1ypXYx6tB SUqiYxrp7JBV/knZraw8BNPIr0w8M6nKR8P6gWjLdBGejd4uDSuQ4XmXd nJkoydXGPYDyl6sCTNhybO2SF+m8N/bVQagI+JqYiuJwxOWzcVSIqnsqr NBAwtpeUMf8SCr/3kjDhUDpx0GJj43JHxBSu17QncXSCBTGivE1Brx3jU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622748" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622748" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861484" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861484" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:22 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 5/6] crypto: qat - remove unnecessary description from comment Date: Fri, 16 Feb 2024 15:19:59 +0000 Message-Id: <20240216151959.19382-6-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland Remove extra description from comments as it is not required. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c:65: warning: contents before sections drivers/crypto/intel/qat/qat_common/adf_isr.c:380: warning: contents before sections drivers/crypto/intel/qat/qat_common/adf_vf_isr.c:298: warning: contents before sections Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c | 4 ++-- drivers/crypto/intel/qat/qat_common/adf_isr.c | 2 -- drivers/crypto/intel/qat/qat_common/adf_vf_isr.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c b/drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c index 86ee36feefad..f07b748795f7 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c +++ b/drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c @@ -60,10 +60,10 @@ static int adf_get_vf_real_id(u32 fake) /** * adf_clean_vf_map() - Cleans VF id mapings - * - * Function cleans internal ids for virtual functions. * @vf: flag indicating whether mappings is cleaned * for vfs only or for vfs and pfs + * + * Function cleans internal ids for virtual functions. */ void adf_clean_vf_map(bool vf) { diff --git a/drivers/crypto/intel/qat/qat_common/adf_isr.c b/drivers/crypto/intel/qat/qat_common/adf_isr.c index 020d213f4c99..cae1aee5479a 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_isr.c +++ b/drivers/crypto/intel/qat/qat_common/adf_isr.c @@ -380,8 +380,6 @@ EXPORT_SYMBOL_GPL(adf_isr_resource_alloc); /** * adf_init_misc_wq() - Init misc workqueue * - * Function init workqueue 'qat_misc_wq' for general purpose. - * * Return: 0 on success, error code otherwise. */ int __init adf_init_misc_wq(void) diff --git a/drivers/crypto/intel/qat/qat_common/adf_vf_isr.c b/drivers/crypto/intel/qat/qat_common/adf_vf_isr.c index b05c3957a160..cdbb2d687b1b 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/intel/qat/qat_common/adf_vf_isr.c @@ -293,8 +293,6 @@ EXPORT_SYMBOL_GPL(adf_flush_vf_wq); /** * adf_init_vf_wq() - Init workqueue for VF * - * Function init workqueue 'adf_vf_stop_wq' for VF. - * * Return: 0 on success, error code otherwise. */ int __init adf_init_vf_wq(void) From patchwork Fri Feb 16 15:20:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Guerin X-Patchwork-Id: 773498 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72F4C134CC8 for ; Fri, 16 Feb 2024 15:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097923; cv=none; b=lBnhFPviczKA1OYO5oaybI+OKEGia7AAQsQxtYpUtY+2mLgHOqEsPsrZqVkU+K15bIvymcbjcm9lWGsCNOHaetfk2kBqeAdnywvZ5Y4WbzEn2FP8f9jgLCOg61tms/ZGVTCCvWDDi69MatsGPf9gZ0WFCW4vjx7v/HEw6jJeDJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708097923; c=relaxed/simple; bh=1svJpBeoKPTG7RxSJ6pjNnVim87jOmiIf7DSmYutcrY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GCz6SkbHIrjO3/0f2yAeKL2/XC0MROy/eDffnd8s/wCo0Ee0plQsNk5HlwVyQCQdIWNVl2Gv/d3CTFNekeLYw0nVTwE9R+tfbtNGWLJfE2s4r9TO2e/8d+LSboE/Bl9n6ledsQ4WiKB22R4w6nnrEXioYenauiIjDUJwMuHZ18Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=n2VZHRx5; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="n2VZHRx5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708097921; x=1739633921; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1svJpBeoKPTG7RxSJ6pjNnVim87jOmiIf7DSmYutcrY=; b=n2VZHRx5+cUhUZ6wyXnGXFcWjVJIBAzxY8GTjSuTwMshZoOhWzpswRaE g8yi63tjFuGBCfMasFL8B10KpU2gXLAAayaX+qfSzVxEE82x++3fVNEHQ xDbw6hWzcFUGoUXmYlC79SsyEoZ2EZb+zj9hLKydSTkQIhHHTguQnjJj4 T+MqFx7VZJZcFamP5cq7PATlvQYsFMwkh3FbH2P49mpdIgrCZv9FGnmQD 0ywJtcLEAevWRxEc5+h3lX07xLzFnsuyhwavo6Lsl23JOau5ej9vgfF2/ mM4Oj4HRu80yaTY2Ze6pDo8ttugojylmImngop5YgS/zPeBvT4lZwxy2h g==; X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="13622791" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="13622791" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:38:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10986"; a="935861516" X-IronPort-AV: E=Sophos;i="6.06,165,1705392000"; d="scan'208";a="935861516" Received: from silpixa00400295.ir.intel.com ([10.237.213.194]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2024 07:38:39 -0800 From: Adam Guerin To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Adam Guerin , Giovanni Cabiddu Subject: [PATCH 6/6] crypto: qat - fix comment structure Date: Fri, 16 Feb 2024 15:20:00 +0000 Message-Id: <20240216151959.19382-7-adam.guerin@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240216151959.19382-1-adam.guerin@intel.com> References: <20240216151959.19382-1-adam.guerin@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organisation: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare, Ireland Move comment description to the same line as the function name. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/intel/qat/qat_common/qat_crypto.c:108: warning: missing initial short description on line: * qat_crypto_vf_dev_config() Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/qat_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/qat_crypto.c b/drivers/crypto/intel/qat/qat_common/qat_crypto.c index 40c8e74d1cf9..101c6ea41673 100644 --- a/drivers/crypto/intel/qat/qat_common/qat_crypto.c +++ b/drivers/crypto/intel/qat/qat_common/qat_crypto.c @@ -105,8 +105,8 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node) } /** - * qat_crypto_vf_dev_config() - * create dev config required to create crypto inst. + * qat_crypto_vf_dev_config() - create dev config required to create + * crypto inst. * * @accel_dev: Pointer to acceleration device. *