Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2167/?format=api
https://patches.dpdk.org/api/patches/2167/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1419694244-2018-1-git-send-email-rkerur@gmail.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": "<1419694244-2018-1-git-send-email-rkerur@gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1419694244-2018-1-git-send-email-rkerur@gmail.com", "date": "2014-12-27T15:30:44", "name": "[dpdk-dev,v2] Fix rte_is_power_of_2", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "c6ee73649613123685ec7ce33ff4d18b25e07cb3", "submitter": { "id": 134, "url": "https://patches.dpdk.org/api/people/134/?format=api", "name": "Ravi Kerur", "email": "rkerur@gmail.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1419694244-2018-1-git-send-email-rkerur@gmail.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/2167/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/2167/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 297653195;\n\tSat, 27 Dec 2014 16:30:57 +0100 (CET)", "from mail-pd0-f178.google.com (mail-pd0-f178.google.com\n\t[209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 789F03005\n\tfor <dev@dpdk.org>; Sat, 27 Dec 2014 16:30:55 +0100 (CET)", "by mail-pd0-f178.google.com with SMTP id r10so14429007pdi.37\n\tfor <dev@dpdk.org>; Sat, 27 Dec 2014 07:30:54 -0800 (PST)", "from iaas-l305162.englab.brocade.com ([144.49.130.148])\n\tby mx.google.com with ESMTPSA id\n\tmw3sm6694409pdb.70.2014.12.27.07.30.53\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 27 Dec 2014 07:30:54 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=UFI+QDaVRW5W/U+/hOzv3TwoVInOCzQCN285Ce6cMlI=;\n\tb=LvjVSEJW6V2Z4TqvnmpNpW2s7gvDagp2FnXBMIvdPaQw4kkdY/veGVScIx5VpSsHWe\n\tgpsnPAS0tEMVwHU+Fv/2scU3COkfT441CqcDCfQ9EW5viED0REKOgkIWpan9d5uuq9jM\n\tF6w+q7JUiG/OvfiXSaxcSXEr36UtXhHzDChrB1XC2dstfHqufX+QoUGtN1hyQuzxRRNc\n\tr5vQp6Iq2nDB25TdvQ0gG/Z9OQCPzJt/971klbfR56IK1dkCFSZedgVKpqsA4D6jXlz8\n\t6uHNxosC689ZxT48wFxVSHLKKiSjhpeu2DFBcv32hgGJascJTCADzn4oQg49Q+gcdhN+\n\tJvFA==", "X-Received": "by 10.67.5.229 with SMTP id cp5mr35240908pad.8.1419694254738;\n\tSat, 27 Dec 2014 07:30:54 -0800 (PST)", "From": "Ravi Kerur <rkerur@gmail.com>", "To": "dev@dpdk.org", "Date": "Sat, 27 Dec 2014 10:30:44 -0500", "Message-Id": "<1419694244-2018-1-git-send-email-rkerur@gmail.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1419694115-1892-1-git-send-email-rkerur@gmail.com>", "References": "<1419694115-1892-1-git-send-email-rkerur@gmail.com>", "Subject": "[dpdk-dev] [PATCH v2] Fix rte_is_power_of_2", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "rte_is_power_of_2 returns true for 0 and 0 is not power_of_2. Fix\nby checking for n.\n\nSigned-off-by: Ravi Kerur <rkerur@gmail.com>\n---\n lib/librte_eal/common/include/rte_common.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex 921b91f..8ac940c 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -203,7 +203,7 @@ extern int RTE_BUILD_BUG_ON_detected_error;\n static inline int\n rte_is_power_of_2(uint32_t n)\n {\n-\treturn ((n-1) & n) == 0;\n+\treturn n && !(n & (n - 1));\n }\n \n /**\n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 2167, "url": "