Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/957/?format=api
{ "id": 957, "url": "http://patchwork.ozlabs.org/api/patches/957/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/200809222151.m8MLp2iv031898@imap1.linux-foundation.org/", "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": "<200809222151.m8MLp2iv031898@imap1.linux-foundation.org>", "list_archive_url": null, "date": "2008-09-22T21:51:02", "name": "[2/4] mISDN: endian annotations for struct zt", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "fac99a124129e1775443c2412964cd208441fd63", "submitter": { "id": 107, "url": "http://patchwork.ozlabs.org/api/people/107/?format=api", "name": "Andrew Morton", "email": "akpm@linux-foundation.org" }, "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/200809222151.m8MLp2iv031898@imap1.linux-foundation.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/957/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/957/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 5FC43DDF47\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 07:51:52 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753513AbYIVVvo (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 17:51:44 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1753509AbYIVVvm\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 17:51:42 -0400", "from smtp1.linux-foundation.org ([140.211.169.13]:51938 \"EHLO\n\tsmtp1.linux-foundation.org\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1753478AbYIVVvi (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 22 Sep 2008 17:51:38 -0400", "from imap1.linux-foundation.org (imap1.linux-foundation.org\n\t[140.211.169.55])\n\tby smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with\n\tESMTP id m8MLp2Nj018195\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tMon, 22 Sep 2008 14:51:03 -0700", "from localhost.localdomain (localhost [127.0.0.1])\n\tby imap1.linux-foundation.org\n\t(8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id\n\tm8MLp2iv031898; Mon, 22 Sep 2008 14:51:02 -0700" ], "Message-Id": "<200809222151.m8MLp2iv031898@imap1.linux-foundation.org>", "Subject": "[patch 2/4] mISDN: endian annotations for struct zt", "To": "kkeil@suse.de", "Cc": "netdev@vger.kernel.org, akpm@linux-foundation.org,\n\tharvey.harrison@gmail.com", "From": "akpm@linux-foundation.org", "Date": "Mon, 22 Sep 2008 14:51:02 -0700", "X-Spam-Status": "No, hits=-3.359 required=5 tests=AWL, BAYES_00,\n\tOSDL_HEADER_SUBJECT_BRACKETED", "X-Spam-Checker-Version": "SpamAssassin 3.2.4-osdl_revision__1.47__", "X-MIMEDefang-Filter": "lf$Revision: 1.188 $", "X-Scanned-By": "MIMEDefang 2.63 on 140.211.169.13", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Harvey Harrison <harvey.harrison@gmail.com>\n\nFound two possible bugs where the z1 value was used directly without\nbyteswapping.\n\nSigned-off-by: Harvey Harrison <harvey.harrison@gmail.com>\nCc: Karsten Keil <kkeil@suse.de>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\n---\n\n drivers/isdn/hardware/mISDN/hfc_pci.h | 4 ++--\n drivers/isdn/hardware/mISDN/hfcpci.c | 9 ++++-----\n 2 files changed, 6 insertions(+), 7 deletions(-)", "diff": "diff -puN drivers/isdn/hardware/mISDN/hfc_pci.h~misdn-endian-annotations-for-struct-zt drivers/isdn/hardware/mISDN/hfc_pci.h\n--- a/drivers/isdn/hardware/mISDN/hfc_pci.h~misdn-endian-annotations-for-struct-zt\n+++ a/drivers/isdn/hardware/mISDN/hfc_pci.h\n@@ -183,8 +183,8 @@\n #define D_FREG_MASK 0xF\n \n struct zt {\n-\tunsigned short z1; /* Z1 pointer 16 Bit */\n-\tunsigned short z2; /* Z2 pointer 16 Bit */\n+\t__le16 z1; /* Z1 pointer 16 Bit */\n+\t__le16 z2; /* Z2 pointer 16 Bit */\n };\n \n struct dfifo {\ndiff -puN drivers/isdn/hardware/mISDN/hfcpci.c~misdn-endian-annotations-for-struct-zt drivers/isdn/hardware/mISDN/hfcpci.c\n--- a/drivers/isdn/hardware/mISDN/hfcpci.c~misdn-endian-annotations-for-struct-zt\n+++ a/drivers/isdn/hardware/mISDN/hfcpci.c\n@@ -366,8 +366,7 @@ static void hfcpci_clear_fifo_tx(struct \n \tbzt->f2 = MAX_B_FRAMES;\n \tbzt->f1 = bzt->f2;\t/* init F pointers to remain constant */\n \tbzt->za[MAX_B_FRAMES].z1 = cpu_to_le16(B_FIFO_SIZE + B_SUB_VAL - 1);\n-\tbzt->za[MAX_B_FRAMES].z2 = cpu_to_le16(\n-\t le16_to_cpu(bzt->za[MAX_B_FRAMES].z1 - 1));\n+\tbzt->za[MAX_B_FRAMES].z2 = cpu_to_le16(B_FIFO_SIZE + B_SUB_VAL - 2);\n \tif (fifo_state)\n \t\thc->hw.fifo_en |= fifo_state;\n \tWrite_hfc(hc, HFCPCI_FIFO_EN, hc->hw.fifo_en);\n@@ -482,7 +481,7 @@ receive_dmsg(struct hfc_pci *hc)\n \t\t\tdf->f2 = ((df->f2 + 1) & MAX_D_FRAMES) |\n \t\t\t (MAX_D_FRAMES + 1);\t/* next buffer */\n \t\t\tdf->za[df->f2 & D_FREG_MASK].z2 =\n-\t\t\t cpu_to_le16((zp->z2 + rcnt) & (D_FIFO_SIZE - 1));\n+\t\t\t cpu_to_le16((le16_to_cpu(zp->z2) + rcnt) & (D_FIFO_SIZE - 1));\n \t\t} else {\n \t\t\tdch->rx_skb = mI_alloc_skb(rcnt - 3, GFP_ATOMIC);\n \t\t\tif (!dch->rx_skb) {\n@@ -526,7 +525,7 @@ receive_dmsg(struct hfc_pci *hc)\n int\n hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *bz, u_char *bdata)\n {\n-\tunsigned short\t*z1r, *z2r;\n+\t __le16 *z1r, *z2r;\n \tint\t\tnew_z2, fcnt, maxlen;\n \tu_char\t\t*ptr, *ptr1;\n \n@@ -724,7 +723,7 @@ hfcpci_fill_fifo(struct bchannel *bch)\n \tstruct bzfifo\t*bz;\n \tu_char\t\t*bdata;\n \tu_char\t\tnew_f1, *src, *dst;\n-\tunsigned short\t*z1t, *z2t;\n+\t__le16 *z1t, *z2t;\n \n \tif ((bch->debug & DEBUG_HW_BCHANNEL) && !(bch->debug & DEBUG_HW_BFIFO))\n \t\tprintk(KERN_DEBUG \"%s\\n\", __func__);\n", "prefixes": [ "2/4" ] }