Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136845/?format=api
http://patches.dpdk.org/api/patches/136845/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240216102454.4156609-3-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20240216102454.4156609-3-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240216102454.4156609-3-david.marchand@redhat.com", "date": "2024-02-16T10:24:53", "name": "[v2,2/3] drivers: use common min/max macros", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "71f915c4f2fd21b59586ad6cca9100936ea633ef", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240216102454.4156609-3-david.marchand@redhat.com/mbox/", "series": [ { "id": 31127, "url": "http://patches.dpdk.org/api/series/31127/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31127", "date": "2024-02-16T10:24:51", "name": "add __extension__ keyword to statement expressions", "version": 2, "mbox": "http://patches.dpdk.org/series/31127/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/136845/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/136845/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1EF2643B30;\n\tFri, 16 Feb 2024 11:25:16 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CF79C42F29;\n\tFri, 16 Feb 2024 11:25:13 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 1050B42F29\n for <dev@dpdk.org>; Fri, 16 Feb 2024 11:25:11 +0100 (CET)", "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-433-YayEDhICOvqm2jg0J_DJ4g-1; Fri, 16 Feb 2024 05:25:08 -0500", "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com\n [10.11.54.7])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1052485A58B;\n Fri, 16 Feb 2024 10:25:08 +0000 (UTC)", "from dmarchan.redhat.com (unknown [10.45.225.53])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CDF681C06890;\n Fri, 16 Feb 2024 10:25:06 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1708079111;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=RmGcgynceyVAVZNSHK7JRf5ys+p306YSG4DcNnOCzU0=;\n b=iaEj+WuBBOgW6aEiCvYWJTVJFrKUtzoIOVlJ1zuOi21o8W9Iu+fr5wFHI6cMw3bR2mAipo\n agNNax9VePeX7keVob27mdb23W81QeTEk+7MAPwRoClWMN4Fpl26DL1r+iiyK9JE+YnzZY\n G1fN6IQF1JG2pv7GuOfa+T8O1jQa7H8=", "X-MC-Unique": "YayEDhICOvqm2jg0J_DJ4g-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "Ajit Khaparde <ajit.khaparde@broadcom.com>,\n Somnath Kotur <somnath.kotur@broadcom.com>,\n Devendra Singh Rawat <dsinghrawat@marvell.com>,\n Alok Prasad <palok@marvell.com>, Rosen Xu <rosen.xu@intel.com>", "Subject": "[PATCH v2 2/3] drivers: use common min/max macros", "Date": "Fri, 16 Feb 2024 11:24:53 +0100", "Message-ID": "<20240216102454.4156609-3-david.marchand@redhat.com>", "In-Reply-To": "<20240216102454.4156609-1-david.marchand@redhat.com>", "References": "<1700089378-26197-1-git-send-email-roretzla@linux.microsoft.com>\n <20240216102454.4156609-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.7", "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": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Use newly introduced macro.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/bnxt/bnxt_ethdev.c | 12 +-----------\n drivers/net/qede/base/bcm_osal.h | 6 ++----\n drivers/raw/ifpga/base/osdep_rte/osdep_generic.h | 11 ++---------\n 3 files changed, 5 insertions(+), 24 deletions(-)", "diff": "diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex 45d840d7af..8cc012206a 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -4867,17 +4867,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)\n \n #define bnxt_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))\n \n-#define min_t(type, x, y) ({ \\\n-\ttype __min1 = (x); \\\n-\ttype __min2 = (y); \\\n-\t__min1 < __min2 ? __min1 : __min2; })\n-\n-#define max_t(type, x, y) ({ \\\n-\ttype __max1 = (x); \\\n-\ttype __max2 = (y); \\\n-\t__max1 > __max2 ? __max1 : __max2; })\n-\n-#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max)\n+#define clamp_t(type, _x, min, max) RTE_MIN_T(RTE_MAX_T(_x, min, type), max, type)\n \n int bnxt_alloc_ctx_mem(struct bnxt *bp)\n {\ndiff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h\nindex 11019b5623..7869103c63 100644\n--- a/drivers/net/qede/base/bcm_osal.h\n+++ b/drivers/net/qede/base/bcm_osal.h\n@@ -443,10 +443,8 @@ u32 qede_osal_log2(u32);\n #define OSAL_IOMEM volatile\n #define OSAL_UNUSED __rte_unused\n #define OSAL_UNLIKELY(x) __builtin_expect(!!(x), 0)\n-#define OSAL_MIN_T(type, __min1, __min2)\t\\\n-\t((type)(__min1) < (type)(__min2) ? (type)(__min1) : (type)(__min2))\n-#define OSAL_MAX_T(type, __max1, __max2)\t\\\n-\t((type)(__max1) > (type)(__max2) ? (type)(__max1) : (type)(__max2))\n+#define OSAL_MIN_T(type, __min1, __min2) RTE_MIN_T(__min1, __min2, type)\n+#define OSAL_MAX_T(type, __max1, __max2) RTE_MAX_T(__max1, __max2, type)\n \n void qede_get_mcp_proto_stats(struct ecore_dev *, enum ecore_mcp_protocol_type,\n \t\t\t union ecore_mcp_protocol_stats *);\ndiff --git a/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h b/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h\nindex 62c5666ca9..427793a578 100644\n--- a/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h\n+++ b/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h\n@@ -44,15 +44,8 @@ extern int ifpga_rawdev_logtype;\n #define min(a, b) RTE_MIN(a, b)\n #define max(a, b) RTE_MAX(a, b)\n \n-#define min_t(type, x, y) ({ \\\n-\ttype __min1 = (x); \\\n-\ttype __min2 = (y); \\\n-\t__min1 < __min2 ? __min1 : __min2; })\n-\n-#define max_t(type, x, y) ({ \\\n-\ttype __max1 = (x); \\\n-\ttype __max2 = (y); \\\n-\t__max1 > __max2 ? __max1 : __max2; })\n+#define min_t(type, x, y) RTE_MIN_T(x, y, type)\n+#define max_t(type, x, y) RTE_MAX_T(x, y, type)\n \n #define spinlock_t rte_spinlock_t\n #define spinlock_init(x) rte_spinlock_init(x)\n", "prefixes": [ "v2", "2/3" ] }{ "id": 136845, "url": "