Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49499/?format=api
https://patches.dpdk.org/api/patches/49499/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/cb53f2d82f0fe5a2c1533afc6b789ad0ebaae6fc.1546964368.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "https://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": "<cb53f2d82f0fe5a2c1533afc6b789ad0ebaae6fc.1546964368.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/cb53f2d82f0fe5a2c1533afc6b789ad0ebaae6fc.1546964368.git.anatoly.burakov@intel.com", "date": "2019-01-08T16:33:59", "name": "memalloc: fix variable shadowing", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8047a14d3ffa3599e23c8cdd8852169f73f49dac", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/cb53f2d82f0fe5a2c1533afc6b789ad0ebaae6fc.1546964368.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 3049, "url": "https://patches.dpdk.org/api/series/3049/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3049", "date": "2019-01-08T16:33:59", "name": "memalloc: fix variable shadowing", "version": 1, "mbox": "https://patches.dpdk.org/series/3049/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/49499/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/49499/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 78FC31B54E;\n\tTue, 8 Jan 2019 17:34:04 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id DF9451B54E;\n\tTue, 8 Jan 2019 17:34:01 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jan 2019 08:34:01 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 08 Jan 2019 08:34:00 -0800", "from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com\n\t[10.243.17.64])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tx08GXxV5029088; Tue, 8 Jan 2019 16:33:59 GMT", "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id x08GXxFo032272;\n\tTue, 8 Jan 2019 16:33:59 GMT", "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id x08GXxXW032268;\n\tTue, 8 Jan 2019 16:33:59 GMT" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,454,1539673200\"; d=\"scan'208\";a=\"124309351\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "stable@dpdk.org", "Date": "Tue, 8 Jan 2019 16:33:59 +0000", "Message-Id": "<cb53f2d82f0fe5a2c1533afc6b789ad0ebaae6fc.1546964368.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "Subject": "[dpdk-dev] [PATCH] memalloc: fix variable shadowing", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "A local variable ``flags`` was shadowing another variable from outer\nscope. Fix this by renaming the variable and make it const.\n\nFixes: c127be93f619 (\"mem: support using memfd segments for in-memory mode\")\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/linuxapp/eal/eal_memalloc.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\nindex 60a0a680f..5b421f1d7 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n@@ -621,13 +621,13 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \tint mmap_flags;\n \n \tif (internal_config.in_memory && !memfd_create_supported) {\n-\t\tint pagesz_flag, flags;\n-\n-\t\tpagesz_flag = pagesz_flags(alloc_sz);\n-\t\tflags = pagesz_flag | MAP_HUGETLB | MAP_FIXED |\n+\t\tconst int in_memory_flags = MAP_HUGETLB | MAP_FIXED |\n \t\t\t\tMAP_PRIVATE | MAP_ANONYMOUS;\n+\t\tint pagesz_flag;\n+\n+\t\tpagesz_flag = pagesz_flags(alloc_sz);\n \t\tfd = -1;\n-\t\tmmap_flags = flags;\n+\t\tmmap_flags = in_memory_flags | pagesz_flag;\n \n \t\t/* single-file segments codepath will never be active\n \t\t * here because in-memory mode is incompatible with the\n", "prefixes": [] }{ "id": 49499, "url": "