From patchwork Fri Mar 4 18:03:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cabiddu, Giovanni" X-Patchwork-Id: 548609 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 73F24C433EF for ; Fri, 4 Mar 2022 18:04:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241092AbiCDSEz (ORCPT ); Fri, 4 Mar 2022 13:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241155AbiCDSEx (ORCPT ); Fri, 4 Mar 2022 13:04:53 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3B2CB1A for ; Fri, 4 Mar 2022 10:04:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646417041; x=1677953041; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ESJkjFrtdBYgKRHjc5+6EJ83n41XVoBRF4xGFcDkx3o=; b=POrKdXB5Uda1pMPDdUtDpAw/0Rl/yknC1oSJemyBFRFZ9DFQQp7qIt1L czlDxtvaeyJTnvyPgS3wE1KfudprtjwyA34NxfQ6ZlkFbzERxgb1x2TOD ijOjQXue9Bz5HzvUR3Sbq6mwK1+XntHg3afidFA1VXwQE8M6e2LqrMx62 W4guwLXPJHmxVhQWi6kojNsMp5BsaW8pneMLUEYBLmTM9jfAZoX/dsn8S RFwu2vuSHwH5HCNXz36f5OCSC6nheibQs6E+4g/Z5E2fxm3AldGbx20/U l4SzwmdbI2kN3Z6SeEwDYP3lsKd5G0TAL6b9gAq4pCTstrzP0+e365T0/ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10276"; a="314744408" X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="314744408" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2022 10:04:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="552308532" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.76]) by orsmga008.jf.intel.com with ESMTP; 04 Mar 2022 10:04:00 -0800 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu Subject: [PATCH 1/3] crypto: qat - remove unneeded assignment Date: Fri, 4 Mar 2022 18:03:54 +0000 Message-Id: <20220304180356.22469-2-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304180356.22469-1-giovanni.cabiddu@intel.com> References: <20220304180356.22469-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The function adf_gen4_get_vf2pf_sources() computes a mask which is stored in a variable which is returned and not used. Remove superfluous assignment of variable. This is to fix the following warning when compiling the QAT driver with clang scan-build: drivers/crypto/qat/qat_common/adf_gen4_pfvf.c:46:9: warning: Although the value stored to 'sou' is used in the enclosing expression, the value is never actually read from 'sou' [deadcode.DeadStores] return sou &= ~mask; ^ ~~~~~ Fixes: 5901b4af6e07 ("crypto: qat - fix access to PFVF interrupt registers for GEN4") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_gen4_pfvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c b/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c index 3b3ea849c5e5..d80d493a7756 100644 --- a/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c +++ b/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c @@ -43,7 +43,7 @@ static u32 adf_gen4_get_vf2pf_sources(void __iomem *pmisc_addr) sou = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_SOU); mask = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_MSK); - return sou &= ~mask; + return sou & ~mask; } static void adf_gen4_enable_vf2pf_interrupts(void __iomem *pmisc_addr, From patchwork Fri Mar 4 18:03:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cabiddu, Giovanni" X-Patchwork-Id: 548357 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 5FB92C433F5 for ; Fri, 4 Mar 2022 18:04:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237615AbiCDSEy (ORCPT ); Fri, 4 Mar 2022 13:04:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241326AbiCDSEx (ORCPT ); Fri, 4 Mar 2022 13:04:53 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD35A344D1 for ; Fri, 4 Mar 2022 10:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646417042; x=1677953042; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KDiOeqqzLqnUJ1asjs6bG87cJ8MRdG1jOuQFe3pblsE=; b=dOTMpNOeoWTGDSgrSKb9I7wDHcs9dge99k/3jPNbcGoT9a4HBjJpg4cM Goxuj61OUo0CCOrs6/f/P3xnhluNJTJb7/ZGtl24LJQsmq7sUIjY12YrG tfV5XEYKSG3HKyK05z8IQRr9222p3+jEzPCjBugdjaW2W53qvJq4qRn5i yF27IBc8JD2n7HQtKuAW8LdoDJugeMBIFdE14uTEH0tet8PVs6IMGBwHs 9OlrfNdbaF1V/CIRtjvzInBduRppBgamzv/CQYVd5WU5nWxjNe7hnYHVF tyaJtG4k2kPteXlYgYhxrV01IlYcRzsa8zRwEWucH/NZlm+KPSNZ24psu A==; X-IronPort-AV: E=McAfee;i="6200,9189,10276"; a="314744414" X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="314744414" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2022 10:04:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="552308548" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.76]) by orsmga008.jf.intel.com with ESMTP; 04 Mar 2022 10:04:01 -0800 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu Subject: [PATCH 2/3] crypto: qat - fix initialization of pfvf cap_msg structures Date: Fri, 4 Mar 2022 18:03:55 +0000 Message-Id: <20220304180356.22469-3-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304180356.22469-1-giovanni.cabiddu@intel.com> References: <20220304180356.22469-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Initialize fully the structures cap_msg containing the device capabilities from the host. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c:99:44: warning: missing field 'ext_dc_caps' initializer [-Wmissing-field-initializers] struct capabilities_v3 cap_msg = { { 0 }, }; ^ Fixes: 851ed498dba1 ("crypto: qat - exchange device capabilities over PFVF") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c b/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c index 14b222691c9c..c5b326f63e95 100644 --- a/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c @@ -96,7 +96,7 @@ int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) int adf_vf2pf_get_capabilities(struct adf_accel_dev *accel_dev) { struct adf_hw_device_data *hw_data = accel_dev->hw_device; - struct capabilities_v3 cap_msg = { { 0 }, }; + struct capabilities_v3 cap_msg = { 0 }; unsigned int len = sizeof(cap_msg); if (accel_dev->vf.pf_compat_ver < ADF_PFVF_COMPAT_CAPABILITIES) From patchwork Fri Mar 4 18:03:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cabiddu, Giovanni" X-Patchwork-Id: 548608 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 60F20C433EF for ; Fri, 4 Mar 2022 18:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241155AbiCDSEz (ORCPT ); Fri, 4 Mar 2022 13:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241480AbiCDSEy (ORCPT ); Fri, 4 Mar 2022 13:04:54 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70D0F3B002 for ; Fri, 4 Mar 2022 10:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646417044; x=1677953044; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vln7oadlRYUoMuAuriiJ/8aJmDBzBmuUoCSJwHiUgxE=; b=S3LT9SFO8bEb+wjMbyRvpWL4EH0nv2BluZmkmx1MiAFLnb4SQq08MVxN nq4fqsbin1p1haKZj6bs903f/RAUoihd4RDSvFXzD2fKCuwsQq0yMkb+X rj3o5zTLDFbJMoH1m8o2BKcpHuCHwhIGd07LqcPVbRDLQ1c4mR6Yy/o5b TfS//YLe+aFfZMEOw4vgR8Ubhe5NNEQaVCoGDL9nzfl7Q/tsTwp5UfY+J T6SQWq1xUF3Fn8uGSvCZqw1x3yIFQARROX7xypA/aM+aORPKFx6WFRgP+ Ioy4ENErRnBKhfM/ZnLw+UQunoSnZMxgrnuETWX4NtGKz5p1xYlP5jKdg A==; X-IronPort-AV: E=McAfee;i="6200,9189,10276"; a="314744417" X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="314744417" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2022 10:04:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,155,1643702400"; d="scan'208";a="552308557" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.76]) by orsmga008.jf.intel.com with ESMTP; 04 Mar 2022 10:04:02 -0800 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu Subject: [PATCH 3/3] crypto: qat - fix initialization of pfvf rts_map_msg structures Date: Fri, 4 Mar 2022 18:03:56 +0000 Message-Id: <20220304180356.22469-4-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304180356.22469-1-giovanni.cabiddu@intel.com> References: <20220304180356.22469-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Initialize fully the structures rts_map_msg containing the ring to service map from the host. This is to fix the following warning when compiling the QAT driver using the clang compiler with CC=clang W=2: drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c:144:51: warning: missing field 'map' initializer [-Wmissing-field-initializers] struct ring_to_svc_map_v1 rts_map_msg = { { 0 }, }; ^ Fixes: e1b176af3d7e ("crypto: qat - exchange ring-to-service mappings over PFVF") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c b/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c index c5b326f63e95..1141258db4b6 100644 --- a/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pfvf_vf_msg.c @@ -141,7 +141,7 @@ int adf_vf2pf_get_capabilities(struct adf_accel_dev *accel_dev) int adf_vf2pf_get_ring_to_svc(struct adf_accel_dev *accel_dev) { - struct ring_to_svc_map_v1 rts_map_msg = { { 0 }, }; + struct ring_to_svc_map_v1 rts_map_msg = { 0 }; unsigned int len = sizeof(rts_map_msg); if (accel_dev->vf.pf_compat_ver < ADF_PFVF_COMPAT_RING_TO_SVC_MAP)