Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806924/?format=api
{ "id": 806924, "url": "http://patchwork.ozlabs.org/api/patches/806924/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1503976719-3063-1-git-send-email-zhangshengju@cmss.chinamobile.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1503976719-3063-1-git-send-email-zhangshengju@cmss.chinamobile.com>", "list_archive_url": null, "date": "2017-08-29T03:18:39", "name": "[net-next] be2net: use shift instead of expensive divide", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "a37fd2fa952f1d0bf082924836efbcb0bbeb7199", "submitter": { "id": 66922, "url": "http://patchwork.ozlabs.org/api/people/66922/?format=api", "name": "Zhang Shengju", "email": "zhangshengju@cmss.chinamobile.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1503976719-3063-1-git-send-email-zhangshengju@cmss.chinamobile.com/mbox/", "series": [ { "id": 290, "url": "http://patchwork.ozlabs.org/api/series/290/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=290", "date": "2017-08-29T03:18:39", "name": "[net-next] be2net: use shift instead of expensive divide", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/290/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806924/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806924/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhDPl0Q77z9sNr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 29 Aug 2017 13:19:06 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751258AbdH2DTD (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 28 Aug 2017 23:19:03 -0400", "from cmccmta1.chinamobile.com ([221.176.66.79]:57432 \"EHLO\n\tcmccmta1.chinamobile.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751213AbdH2DTC (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 28 Aug 2017 23:19:02 -0400", "from spf.mail.chinamobile.com (unknown[172.16.121.5]) by\n\trmmx-syy-dmz-app01-12001 (RichMail) with SMTP id\n\t2ee159a4dd233f6-bd160; Tue, 29 Aug 2017 11:18:59 +0800 (CST)", "from promote.cache-dns.local (unknown[183.209.110.191])\n\tby rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id\n\t2ee359a4dd1579f-ee2a3; Tue, 29 Aug 2017 11:18:53 +0800 (CST)" ], "X-RM-TRANSID": [ "2ee159a4dd233f6-bd160", "2ee359a4dd1579f-ee2a3" ], "X-RM-SPAM-FLAG": "00000000", "From": "Zhang Shengju <zhangshengju@cmss.chinamobile.com>", "To": "sathya.perla@broadcom.com, ajit.khaparde@broadcom.com,\n\tsriharsha.basavapatna@broadcom.com, netdev@vger.kernel.org", "Subject": "[net-next] be2net: use shift instead of expensive divide", "Date": "Tue, 29 Aug 2017 11:18:39 +0800", "Message-Id": "<1503976719-3063-1-git-send-email-zhangshengju@cmss.chinamobile.com>", "X-Mailer": "git-send-email 1.8.3.1", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Replace shift instead of expensive divide.\n\nSigned-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>\n---\n drivers/net/ethernet/emulex/benet/be_main.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c\nindex 319eee3..e06094f 100644\n--- a/drivers/net/ethernet/emulex/benet/be_main.c\n+++ b/drivers/net/ethernet/emulex/benet/be_main.c\n@@ -2455,7 +2455,7 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)\n \n \t/* For checking the valid bit it is Ok to use either definition as the\n \t * valid bit is at the same position in both v0 and v1 Rx compl */\n-\tif (compl->dw[offsetof(struct amap_eth_rx_compl_v1, valid) / 32] == 0)\n+\tif (compl->dw[offsetof(struct amap_eth_rx_compl_v1, valid) >> 5] == 0)\n \t\treturn NULL;\n \n \trmb();\n@@ -2486,7 +2486,7 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)\n \t}\n \n \t/* As the compl has been parsed, reset it; we wont touch it again */\n-\tcompl->dw[offsetof(struct amap_eth_rx_compl_v1, valid) / 32] = 0;\n+\tcompl->dw[offsetof(struct amap_eth_rx_compl_v1, valid) >> 5] = 0;\n \n \tqueue_tail_inc(&rxo->cq);\n \treturn rxcp;\n@@ -2590,7 +2590,7 @@ static struct be_tx_compl_info *be_tx_compl_get(struct be_tx_obj *txo)\n \tstruct be_tx_compl_info *txcp = &txo->txcp;\n \tstruct be_eth_tx_compl *compl = queue_tail_node(tx_cq);\n \n-\tif (compl->dw[offsetof(struct amap_eth_tx_compl, valid) / 32] == 0)\n+\tif (compl->dw[offsetof(struct amap_eth_tx_compl, valid) >> 5] == 0)\n \t\treturn NULL;\n \n \t/* Ensure load ordering of valid bit dword and other dwords below */\n@@ -2600,7 +2600,7 @@ static struct be_tx_compl_info *be_tx_compl_get(struct be_tx_obj *txo)\n \ttxcp->status = GET_TX_COMPL_BITS(status, compl);\n \ttxcp->end_index = GET_TX_COMPL_BITS(wrb_index, compl);\n \n-\tcompl->dw[offsetof(struct amap_eth_tx_compl, valid) / 32] = 0;\n+\tcompl->dw[offsetof(struct amap_eth_tx_compl, valid) >> 5] = 0;\n \tqueue_tail_inc(tx_cq);\n \treturn txcp;\n }\n", "prefixes": [ "net-next" ] }