From nobody Wed Apr 06 20:17:59 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5DBCF1A8BD1F; Wed, 6 Apr 2022 20:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYbRW24qZz4Xpk; Wed, 6 Apr 2022 20:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649276279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GDgrSU50+tNm9FLeQLBFVziQ69Fn8hQSPl4hOhMb8Yo=; b=PQH9WdI2e6t7tbQmuH0iP2DNAPIUjrhb3+QljiXdU6yeL39uU8Qxk0O1ApxbT5KhIibwRO eJfEOfb9Abj454+5SY8ge1SbQNj27NDszMMULPhP0iTsMAqJzQcVag6SKHyNVS2nFBWLco MBDyhnUq2ANOk/Y0dC5XofVJyZqhV30jHabd1T/MTrXL0qxr07BKjooE/l/QBHSUtj7P/V W7Uzg7oWpakqecX52X5tSpG6Zi5/sLezkF2+erhTKpwPcIT2yPQxAeFTjvmVX2yokdXW8/ 4XbVe7bCx3EoD4Zy+BOxK6tG8ydnga7na5+W6KCTLat0P/sXdEdyLfWXU3Ol2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2860C21E78; Wed, 6 Apr 2022 20:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236KHxeJ025027; Wed, 6 Apr 2022 20:17:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236KHxuX025026; Wed, 6 Apr 2022 20:17:59 GMT (envelope-from git) Date: Wed, 6 Apr 2022 20:17:59 GMT Message-Id: <202204062017.236KHxuX025026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 9983e5cce6c7 - main - cxgbe(4): Fix the sorting order of the regions listed in meminfo. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9983e5cce6c77c791bd914648b2acc2e54acc515 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649276279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GDgrSU50+tNm9FLeQLBFVziQ69Fn8hQSPl4hOhMb8Yo=; b=nyIuoeybojhaQ/GkD0tkB3JxWSW8sEs4a1BzmWDGDeLLCXjsUuqKU5jgDvQ8IKWNW0Nbp8 wijGN83USW3mGtUkV41+X+IXNVi9IXnUlzziuogF40KBQHvNw+bIPHciUCnGDCdGZ2DIZI 7lJdcxTIwhPfaGIPkp6rIq8M9EhQKEFKCmNF3ENE+KHMQUcdn+MkJIOc1ZlljhNCssYuGK jfWwC2ka1ozuO7O1Aiy6KMuVXZcXaSc6CvekaB/8CsAIAt9xSjYpnoy92mbKYOoHBoTfnA aIeBYjOUUNViWpfy8zKviYJncchHCCDrc2y8QohP3kGOztnhnIdlPxybNd1cjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649276279; a=rsa-sha256; cv=none; b=pQaPuROvnDbfOQScIbse1yNCAjgcdy9UwpuUQzVICnQ5xWUv47i6og3POVugBmpGM+R4hI NOjO7RDDw3YEyhtLhKhqd9zmG3UtHNzyK+UW0izadtrN0wFliPb1loLHnJoZnflseSFO6S PaNdicx9dCjRDh/vSoHLciSDRyeQ5VWWM4O1d9KAehKeHpzjpHUB+gj7FrGZUYNKcm+QOy P5jzmDdzwXiHqYFbEdju55wScWxVF7M9i2qIC8e1mpLMxi70G/W4IA9A8HfxNElrEk5BrF q6iTg6I+6+r8yXlDJL4B8ORY2kgQVMKrbid7Gm4UAcANcJnzq2D8SW3Ji+5GXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9983e5cce6c77c791bd914648b2acc2e54acc515 commit 9983e5cce6c77c791bd914648b2acc2e54acc515 Author: Navdeep Parhar AuthorDate: 2022-04-05 21:13:11 +0000 Commit: Navdeep Parhar CommitDate: 2022-04-06 20:15:25 +0000 cxgbe(4): Fix the sorting order of the regions listed in meminfo. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 56ceae56a700..898a1d1ca4f3 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9656,16 +9656,23 @@ sysctl_linkdnrc(SYSCTL_HANDLER_ARGS) } struct mem_desc { - unsigned int base; - unsigned int limit; - unsigned int idx; + u_int base; + u_int limit; + u_int idx; }; static int mem_desc_cmp(const void *a, const void *b) { - return ((const struct mem_desc *)a)->base - - ((const struct mem_desc *)b)->base; + const u_int v1 = ((const struct mem_desc *)a)->base; + const u_int v2 = ((const struct mem_desc *)b)->base; + + if (v1 < v2) + return (-1); + else if (v1 > v2) + return (1); + + return (0); } static void