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 38FDBA0C41; Wed, 15 Sep 2021 16:15:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F83E4068F; Wed, 15 Sep 2021 16:15:25 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 8878E4014F for ; Wed, 15 Sep 2021 16:15:23 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 74E2D32009EC; Wed, 15 Sep 2021 10:15:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 15 Sep 2021 10:15:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=zknIIsXuW1nvQ/h+9v1PLLWFXh 0Yp2WRoMxwehnvbiY=; b=jhg9kzE38DIyRfv5x6ZW/hvAb48qKhQAxzPo6Et7Ul NZddgoNiZQWthGWv+s1VO4DLk43EngcFJcHB/0N/0rlXjaa6zfsX2Q+T9TeqDLhr LjmeiePUfT5FPoHvEYmuTemq7EgvYbK+1LccjXdS9ldm6KwXvgLVrMfMv3UlIQ6z KMYE+PovA35+uWYC5fxeO5JzECiVUGTp2QyjiBgbjNI+GbO4sy4iQcLifH3tN9mU BKC1jSmAy3ox+n8VyLgar2R58rtPgOEAnvgWRzQL94t+nVrwT96PP/iBcnIauB1J 1KHOLp7hGSG9FOcSeWRA9OnvEQChPUND1eY4zmWSCx/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=zknIIsXuW1nvQ/h+9 v1PLLWFXh0Yp2WRoMxwehnvbiY=; b=IgsInk7Q9G+zJwvQMz0KKIwmw+0Wmpbnk KwvK4g9Ne0C4DWY7v7X1X+ERasmkKwp3+Ge+rMjVkuU7VonfWoQMeqVcgd/JUcGx tOPde7xhgvvHSXwOvDsYSP4b/eZ8gcoSHVgiPMpDaDI0QR5HCm/o4Dnf9KdFQm8/ Ak8rp6AuGgt1vHUo/L+U2le0BIx2q9lAa4wYpa965d7BRUhtHVBZkd+qobaZbv1y 2pyksjZbWc+sgwJV42Dlvf6nKwMC90ay4RxoCGSFOBl0fm95qKD5Fxvv1NWuZs1h /hvkuNS5J4MT8an0tet+RQlxcHDfFz8X3g9uWVTI5XoFLS2lGSYmw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehuddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Sep 2021 10:15:20 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Maxime Coquelin , Chenbo Xia Date: Wed, 15 Sep 2021 16:15:11 +0200 Message-Id: <20210915141511.2993665-1-thomas@monjalon.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/virtio: remove blank lines in log X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The macro PMD_INIT_LOG includes already the line feed character. Redundant \n are removed. Signed-off-by: Thomas Monjalon --- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtio_pci.c | 2 +- drivers/net/virtio/virtio_pci_ethdev.c | 6 ++--- .../net/virtio/virtio_user/virtio_user_dev.c | 22 +++++++++---------- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 9ca8bae0fe..d722fbe04a 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -212,7 +212,7 @@ virtio_send_command_packed(struct virtnet_ctl *cvq, "vq->vq_avail_idx=%d\n" "vq->vq_used_cons_idx=%d\n" "vq->vq_packed.cached_flags=0x%x\n" - "vq->vq_packed.used_wrap_counter=%d\n", + "vq->vq_packed.used_wrap_counter=%d", vq->vq_free_cnt, vq->vq_avail_idx, vq->vq_used_cons_idx, diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index c14d1339c9..182cfc9eae 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -410,7 +410,7 @@ static int modern_features_ok(struct virtio_hw *hw) { if (!virtio_with_feature(hw, VIRTIO_F_VERSION_1)) { - PMD_INIT_LOG(ERR, "Version 1+ required with modern devices\n"); + PMD_INIT_LOG(ERR, "Version 1+ required with modern devices"); return -1; } diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c index 4083853c48..54645dc62e 100644 --- a/drivers/net/virtio/virtio_pci_ethdev.c +++ b/drivers/net/virtio/virtio_pci_ethdev.c @@ -81,7 +81,7 @@ eth_virtio_pci_init(struct rte_eth_dev *eth_dev) VTPCI_DEV(hw) = pci_dev; ret = vtpci_init(RTE_ETH_DEV_TO_PCI(eth_dev), dev); if (ret) { - PMD_INIT_LOG(ERR, "Failed to init PCI device\n"); + PMD_INIT_LOG(ERR, "Failed to init PCI device"); return -1; } } else { @@ -93,14 +93,14 @@ eth_virtio_pci_init(struct rte_eth_dev *eth_dev) ret = virtio_remap_pci(RTE_ETH_DEV_TO_PCI(eth_dev), dev); if (ret < 0) { - PMD_INIT_LOG(ERR, "Failed to remap PCI device\n"); + PMD_INIT_LOG(ERR, "Failed to remap PCI device"); return -1; } } ret = eth_virtio_dev_init(eth_dev); if (ret < 0) { - PMD_INIT_LOG(ERR, "Failed to init virtio device\n"); + PMD_INIT_LOG(ERR, "Failed to init virtio device"); goto err_unmap; } diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 16c58710d7..200942d622 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -44,7 +44,7 @@ virtio_user_create_queue(struct virtio_user_dev *dev, uint32_t queue_sel) file.fd = dev->callfds[queue_sel]; ret = dev->ops->set_vring_call(dev, &file); if (ret < 0) { - PMD_INIT_LOG(ERR, "(%s) Failed to create queue %u\n", dev->path, queue_sel); + PMD_INIT_LOG(ERR, "(%s) Failed to create queue %u", dev->path, queue_sel); return -1; } @@ -108,7 +108,7 @@ virtio_user_kick_queue(struct virtio_user_dev *dev, uint32_t queue_sel) return 0; err: - PMD_INIT_LOG(ERR, "(%s) Failed to kick queue %u\n", dev->path, queue_sel); + PMD_INIT_LOG(ERR, "(%s) Failed to kick queue %u", dev->path, queue_sel); return -1; } @@ -214,7 +214,7 @@ virtio_user_start_device(struct virtio_user_dev *dev) pthread_mutex_unlock(&dev->mutex); rte_mcfg_mem_read_unlock(); - PMD_INIT_LOG(ERR, "(%s) Failed to start device\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to start device", dev->path); /* TODO: free resource here or caller to check */ return -1; @@ -255,7 +255,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev) err: pthread_mutex_unlock(&dev->mutex); - PMD_INIT_LOG(ERR, "(%s) Failed to stop device\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to stop device", dev->path); return -1; } @@ -500,17 +500,17 @@ virtio_user_dev_setup(struct virtio_user_dev *dev) } if (dev->ops->setup(dev) < 0) { - PMD_INIT_LOG(ERR, "(%s) Failed to setup backend\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to setup backend", dev->path); return -1; } if (virtio_user_dev_init_notify(dev) < 0) { - PMD_INIT_LOG(ERR, "(%s) Failed to init notifiers\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to init notifiers", dev->path); goto destroy; } if (virtio_user_fill_intr_handle(dev) < 0) { - PMD_INIT_LOG(ERR, "(%s) Failed to init interrupt handler\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to init interrupt handler", dev->path); goto uninit; } @@ -642,7 +642,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, if (rte_mem_event_callback_register(VIRTIO_USER_MEM_EVENT_CLB_NAME, virtio_user_mem_event_cb, dev)) { if (rte_errno != ENOTSUP) { - PMD_INIT_LOG(ERR, "(%s) Failed to register mem event callback\n", + PMD_INIT_LOG(ERR, "(%s) Failed to register mem event callback", dev->path); return -1; } @@ -866,7 +866,7 @@ virtio_user_dev_set_status(struct virtio_user_dev *dev, uint8_t status) dev->status = status; ret = dev->ops->set_status(dev, status); if (ret && ret != -ENOTSUP) - PMD_INIT_LOG(ERR, "(%s) Failed to set backend status\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to set backend status", dev->path); pthread_mutex_unlock(&dev->mutex); return ret; @@ -890,7 +890,7 @@ virtio_user_dev_update_status(struct virtio_user_dev *dev) "\t-DRIVER_OK: %u\n" "\t-FEATURES_OK: %u\n" "\t-DEVICE_NEED_RESET: %u\n" - "\t-FAILED: %u\n", + "\t-FAILED: %u", dev->status, (dev->status == VIRTIO_CONFIG_STATUS_RESET), !!(dev->status & VIRTIO_CONFIG_STATUS_ACK), @@ -900,7 +900,7 @@ virtio_user_dev_update_status(struct virtio_user_dev *dev) !!(dev->status & VIRTIO_CONFIG_STATUS_DEV_NEED_RESET), !!(dev->status & VIRTIO_CONFIG_STATUS_FAILED)); } else if (ret != -ENOTSUP) { - PMD_INIT_LOG(ERR, "(%s) Failed to get backend status\n", dev->path); + PMD_INIT_LOG(ERR, "(%s) Failed to get backend status", dev->path); } pthread_mutex_unlock(&dev->mutex); diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 90fcd6e7cc..688c1104d5 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -398,7 +398,7 @@ virtio_user_backend_type(const char *path) if (errno == ENOENT) return VIRTIO_USER_BACKEND_VHOST_USER; - PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path, + PMD_INIT_LOG(ERR, "Stat fails: %s (%s)", path, strerror(errno)); return VIRTIO_USER_BACKEND_UNKNOWN; } -- 2.33.0