From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 50D12A0542 for ; Fri, 9 Sep 2022 17:04:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B4D6427FF; Fri, 9 Sep 2022 17:04:43 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id D0B4A4281B for ; Fri, 9 Sep 2022 17:04:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662735881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bfWPGyiBQcHoT6QuJV3awPyR2h0lB2P1DbAR8rbmVNM=; b=DEdr0dS+2qGT+H2+zRi2xug8W/DuvcfaKEtgdJSxraj++zJJAm3EdxmbNuqyhNgiKxIjWE XVTDY7m2xBL5nNLiWUAvsYeQwEVjUcmhQIpNHTSlmyZpdwtL/6irj1McoYtcjkU+2MQtl4 BHZdUQnJmGlGm+1duhBLZE/l74SeX7o= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-16-v-wXJsZ1NUqgsQfHsjyQlQ-1; Fri, 09 Sep 2022 11:04:30 -0400 X-MC-Unique: v-wXJsZ1NUqgsQfHsjyQlQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 86B2F3C025B1; Fri, 9 Sep 2022 15:04:30 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 759C82026D4C; Fri, 9 Sep 2022 15:04:29 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: gakhil@marvell.com, chandu@amd.com, stable@dpdk.org, Ravi Kumar Subject: [PATCH 1/4] crypto/ccp: remove some printf Date: Fri, 9 Sep 2022 17:04:08 +0200 Message-Id: <20220909150411.3702860-2-david.marchand@redhat.com> In-Reply-To: <20220909150411.3702860-1-david.marchand@redhat.com> References: <20220909150411.3702860-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org A DPDK application must _not_ use printf. Use log framework. Fixes: ef4b04f87fa6 ("crypto/ccp: support device init") Cc: stable@dpdk.org Signed-off-by: David Marchand --- drivers/crypto/ccp/ccp_dev.c | 4 ++-- drivers/crypto/ccp/ccp_pci.c | 3 ++- drivers/crypto/ccp/rte_ccp_pmd.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c index 424ead82c3..9c9cb81236 100644 --- a/drivers/crypto/ccp/ccp_dev.c +++ b/drivers/crypto/ccp/ccp_dev.c @@ -362,7 +362,7 @@ ccp_find_lsb_regions(struct ccp_queue *cmd_q, uint64_t status) if (ccp_get_bit(&cmd_q->lsbmask, j)) weight++; - printf("Queue %d can access %d LSB regions of mask %lu\n", + CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu\n", (int)cmd_q->id, weight, cmd_q->lsbmask); return weight ? 0 : -EINVAL; @@ -709,7 +709,7 @@ ccp_probe_devices(struct rte_pci_device *pci_dev, snprintf(dirname, sizeof(dirname), "%s/%s", SYSFS_PCI_DEVICES, d->d_name); if (is_ccp_device(dirname, ccp_id, &ccp_type)) { - printf("CCP : Detected CCP device with ID = 0x%x\n", + CCP_LOG_DBG("CCP : Detected CCP device with ID = 0x%x\n", ccp_id[ccp_type].device_id); ret = ccp_probe_device(ccp_type, pci_dev); if (ret == 0) diff --git a/drivers/crypto/ccp/ccp_pci.c b/drivers/crypto/ccp/ccp_pci.c index 38029a9081..c941e222c7 100644 --- a/drivers/crypto/ccp/ccp_pci.c +++ b/drivers/crypto/ccp/ccp_pci.c @@ -11,6 +11,7 @@ #include #include "ccp_pci.h" +#include "ccp_pmd_private.h" static const char * const uio_module_names[] = { "igb_uio", @@ -41,7 +42,7 @@ ccp_check_pci_uio_module(void) rewind(fp); } fclose(fp); - printf("Insert igb_uio or uio_pci_generic kernel module(s)"); + CCP_LOG_DBG("Insert igb_uio or uio_pci_generic kernel module(s)"); return -1;/* uio not inserted */ } diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c index a35a8cd775..c5ec952e36 100644 --- a/drivers/crypto/ccp/rte_ccp_pmd.c +++ b/drivers/crypto/ccp/rte_ccp_pmd.c @@ -250,7 +250,7 @@ cryptodev_ccp_create(const char *name, goto init_error; } - printf("CCP : Crypto device count = %d\n", cryptodev_cnt); + CCP_LOG_DBG("CCP : Crypto device count = %d\n", cryptodev_cnt); dev->device = &pci_dev->device; dev->device->driver = &pci_drv->driver; dev->driver_id = ccp_cryptodev_driver_id; -- 2.37.2