From nobody Mon Feb 9 11:51:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640951368; cv=none; d=zohomail.com; s=zohoarc; b=NAw3L1v/wzo9thL1XO2eLn80oW1KqINM5psyh6+FIY2ZeTZE8uJQJv2tosX0hRXeFxHXnzHpnZ487tSFPhPKlVWkD9c0XHm/0Aw6bGuK5HzE2xZ5QczWrgR1cHh+YtMjyFFwOMfSYaQd0f8/0KSsApzhk8bFhtErUCzLyN1IO1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640951368; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=s1gWXzHHA08XyBDnum+yCmIoN801ZHiVaEGOwmKagUU=; b=DAATnvabNxYWF9QBr0hNsQRAR5ijDmfyVUo0rC/6vvzgryqcOvfWGgQaMpsLX1mPVdi0q/RwSw8PlUM54rQY1gG420+UXWd5IFzlErmXHumP3DItXKJm8X6CkcY2DcgaoDoT8he7pE9Oc/rJThLD2AaJS5kSk0dtvytOJfPkUJo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640951368626873.5542935880533; Fri, 31 Dec 2021 03:49:28 -0800 (PST) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-X-7pCuZ-P4aXoIZUzFuX4Q-1; Fri, 31 Dec 2021 06:49:26 -0500 Received: by mail-wr1-f72.google.com with SMTP id g6-20020adfbc86000000b001a2d62be244so6190579wrh.23 for ; Fri, 31 Dec 2021 03:49:26 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id p18sm37592945wmq.0.2021.12.31.03.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 03:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640951368; 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=s1gWXzHHA08XyBDnum+yCmIoN801ZHiVaEGOwmKagUU=; b=UDnp8K3uptp/PZRaECYqnzo5EOShw2YthqRj9Van/NE4E3LfS0s0K7EEA2bmEsDfcha71i 8p2rfKFn03BxnxJy3r3Iw/YJB4ma2l8cIuw8TB5bC1oQZAJGreIDc2yvzYeZ6FQYCnPtYX QJWO2B27WNAQQTfngRLcNJ3il1cliN4= X-MC-Unique: X-7pCuZ-P4aXoIZUzFuX4Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s1gWXzHHA08XyBDnum+yCmIoN801ZHiVaEGOwmKagUU=; b=ozrxMy14NwfpVryk4A5Ff7OYkBI3/DofgCBn/7xfq7n+r2oOaMNtXkJR3w5yoyOYh/ AbppvH+l16vFCWU7DP89E0GhxcRrxiU4kZX6wKCoY1CyIQNKlx7SCzSIuDBYOrYIThiA jyeWJfuz4yH9qdiprkwCpByvREZkKztajj9simT98AB0XLdSJ23MI1m3QjkMWefu6/w8 yucK+nnuuTCaNnzmtiTBO+CaJdEoZig8x7hbRYrWYmHHTzrpKJYX4g5vmFxOQovgRFw7 XyqYxfHIN6QYbErIdNsKF+Ii/65beNMpLBxUFDlXF4rSpCYgayrFPB1rXBx+xRcRynih zrhA== X-Gm-Message-State: AOAM532DGGtJoqLjtfKnGh3Yk/2LXEBVInAzSt8PTkD9iE0nzPRuWO0f OWv8FNkc7ndplUdS6XB9C5pPPWHPVI896A8S4atiS5HTWRRoU/ZmgGUTbhsepeb0Y0E5ZrIii+i j27Xi5Pd/DZdWiw== X-Received: by 2002:a5d:6c67:: with SMTP id r7mr30217558wrz.350.1640951365600; Fri, 31 Dec 2021 03:49:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzk1PB0CJ5V9w98GPEgQGppaZfUg+L1brKLinrifqfcLoq4u//4eSk3Tj3jBGG9MHrHO+v/9Q== X-Received: by 2002:a5d:6c67:: with SMTP id r7mr30217546wrz.350.1640951365458; Fri, 31 Dec 2021 03:49:25 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Gerd Hoffmann , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , "Michael S. Tsirkin" , Peter Xu Subject: [PATCH 5/8] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument Date: Fri, 31 Dec 2021 12:48:58 +0100 Message-Id: <20211231114901.976937-6-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231114901.976937-1-philmd@redhat.com> References: <20211231114901.976937-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640951370883000001 Various APIs use 'pval' naming for 'pointer to val'. rdma_pci_dma_map() uses 'plen' for 'PCI length', but since 'PCI' is already explicit in the function name, simplify and rename the argument 'len'. No logical change. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia --- hw/rdma/rdma_utils.h | 2 +- hw/rdma/rdma_utils.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h index 9fd0efd940b..0c6414e7e0a 100644 --- a/hw/rdma/rdma_utils.h +++ b/hw/rdma/rdma_utils.h @@ -38,7 +38,7 @@ typedef struct RdmaProtectedGSList { GSList *list; } RdmaProtectedGSList; =20 -void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen); +void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t len); void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len); void rdma_protected_gqueue_init(RdmaProtectedGQueue *list); void rdma_protected_gqueue_destroy(RdmaProtectedGQueue *list); diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c index 98df58f6897..61cb8ede0fd 100644 --- a/hw/rdma/rdma_utils.c +++ b/hw/rdma/rdma_utils.c @@ -17,29 +17,29 @@ #include "trace.h" #include "rdma_utils.h" =20 -void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen) +void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t len) { void *p; - hwaddr len =3D plen; + hwaddr pci_len =3D len; =20 if (!addr) { rdma_error_report("addr is NULL"); return NULL; } =20 - p =3D pci_dma_map(dev, addr, &len, DMA_DIRECTION_TO_DEVICE); + p =3D pci_dma_map(dev, addr, &pci_len, DMA_DIRECTION_TO_DEVICE); if (!p) { rdma_error_report("pci_dma_map fail, addr=3D0x%"PRIx64", len=3D%"P= RId64, - addr, len); + addr, pci_len); return NULL; } =20 - if (len !=3D plen) { - rdma_pci_dma_unmap(dev, p, len); + if (pci_len !=3D len) { + rdma_pci_dma_unmap(dev, p, pci_len); return NULL; } =20 - trace_rdma_pci_dma_map(addr, p, len); + trace_rdma_pci_dma_map(addr, p, pci_len); =20 return p; } --=20 2.33.1