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 A1501A0543 for ; Tue, 4 Oct 2022 11:52:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92CC04281C; Tue, 4 Oct 2022 11:52:00 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 49533427F3 for ; Tue, 4 Oct 2022 11:51:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664877117; 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=Hq9X973YpqwKfFDZ+JAxgM6jUH9gsoIi+s0znsUAPYQ=; b=FS+vzjU4uFD0m/ClmLaV+AgJxSAKEXagVJ4ip3fhsWtLEkUM0+QVqwZqMnZ2zbZ+OvoX4H KMtUi4u1vehNxZRiQMQGGYctFDlQKKuJKuveLDy9LoZWGF6svzMqCfjZh71KXbdZ8HqiXe GIaAdOQ7pYvvm2BSZW/ynhx46W1qMaA= 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-465-dNVGwF8vPIyGcKzjoL8DhA-1; Tue, 04 Oct 2022 05:51:47 -0400 X-MC-Unique: dNVGwF8vPIyGcKzjoL8DhA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B21F91C07544; Tue, 4 Oct 2022 09:51:46 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C35CC15BA4; Tue, 4 Oct 2022 09:51:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: gakhil@marvell.com, sunilprakashrao.uttarwar@amd.com, stable@dpdk.org, Ravi Kumar Subject: [PATCH v2 1/4] crypto/ccp: remove some printf Date: Tue, 4 Oct 2022 11:51:29 +0200 Message-Id: <20221004095132.198777-2-david.marchand@redhat.com> In-Reply-To: <20221004095132.198777-1-david.marchand@redhat.com> References: <20220909150411.3702860-1-david.marchand@redhat.com> <20221004095132.198777-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 013f3be1e6..7338ef0ae8 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.3