Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1141075/?format=api
{ "id": 1141075, "url": "http://patchwork.ozlabs.org/api/patches/1141075/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190802105507.16650-1-hslester96@gmail.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190802105507.16650-1-hslester96@gmail.com>", "list_archive_url": null, "date": "2019-08-02T10:55:07", "name": "[2/2] ixgbe: Use refcount_t for refcount", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": false, "hash": "ec23fd768e81d0ecdba2cd1a541b247a4aff0bdc", "submitter": { "id": 77068, "url": "http://patchwork.ozlabs.org/api/people/77068/?format=api", "name": "Chuhong Yuan", "email": "hslester96@gmail.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190802105507.16650-1-hslester96@gmail.com/mbox/", "series": [ { "id": 122946, "url": "http://patchwork.ozlabs.org/api/series/122946/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=122946", "date": "2019-08-02T10:54:57", "name": "[1/2] ixgbe: Explicitly initialize reference count to 0", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/122946/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1141075/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1141075/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"edKvkr2Y\"; dkim-atps=neutral" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 460PFd2Gfgz9sND\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 2 Aug 2019 20:55:17 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 84C7687B4B;\n\tFri, 2 Aug 2019 10:55:15 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 6ymdDjnpkzIl; Fri, 2 Aug 2019 10:55:14 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CDAEF87A8A;\n\tFri, 2 Aug 2019 10:55:14 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 37FE11BF356\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 2 Aug 2019 10:55:13 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 31F93868DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 2 Aug 2019 10:55:13 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id pBAC_XP-5Y9l for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 2 Aug 2019 10:55:12 +0000 (UTC)", "from mail-pg1-f196.google.com (mail-pg1-f196.google.com\n\t[209.85.215.196])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 9A9C4868D9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 2 Aug 2019 10:55:12 +0000 (UTC)", "by mail-pg1-f196.google.com with SMTP id d1so3073068pgp.4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 02 Aug 2019 03:55:12 -0700 (PDT)", "from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54])\n\tby smtp.gmail.com with ESMTPSA id\n\tv7sm34909052pff.87.2019.08.02.03.55.09\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tFri, 02 Aug 2019 03:55:11 -0700 (PDT)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=s3ianRPCP2Zu9bnZaFDrTAINsaT4fxD5fOtOtR4Ftwg=;\n\tb=edKvkr2YLIpIwx88PyQUx4RInX3evd5YZicPc5fVUrirsHVeUJEV18bp69Zsr/uwZR\n\t7aEy0TZ09nh32GepyRrJ/2r4tgsVN4KfX4CvTzM9oCWZuVThYFYrEY86NzdIS42I3lvG\n\tW7hbLhLjK5sCECqKDZXL28jX4STloI6gjFBeF7BZaNGONsTPKTOLJHTc0zMFXRxKa/fd\n\tcIwHFYqkSOh0BkHPPorRoUVGUsANLrsYzVbkxP+hq3xNwhRy5iEsugguKukd63Q6WjEG\n\tRllZ1/urSwAAeorhM/DK5j3DUIXDFZyO8yD7wPISRGd2SLksT7PpLvUb6GiT5xRsQ9LQ\n\tkXMA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=s3ianRPCP2Zu9bnZaFDrTAINsaT4fxD5fOtOtR4Ftwg=;\n\tb=syyROOGUYZTfBVlOldEuo3ev4xsQdVIf4b7o/oU6wsiQHeRTQDEf+FJbbLKX2Ige5N\n\tEMQi1vk11Xti7Lno/ofzKYvQ2SDME2XtqCxIyfEnUA5lyMIx2v/+rkMzLPqxqb6oEJfA\n\tt3ooDnKZXztw4nndL+g+EyldOMPCHypf8ln5vXcDG5QPlP9EQdwogfzzf+Zf6EO1m5g1\n\tfFG/Fh9AG5HlTxqQxSuS/4taA4XigaLAXSyblNnh3j2J4gOZoOJ4Rk8siNaNEBVZv2Jr\n\tNvBDn6tvKMzQTP/XWGzlxSaj5G7/Xrc++sVNpAqRYS5WTUyyNPW/3yb8iI9F3qfvyLue\n\t0qoQ==", "X-Gm-Message-State": "APjAAAVUZxFiGzb2xX8CEiIuEX8dqT9GEG3fAwqbmVJvWy000MH8DxUG\n\tX/rt1aeEAI+QPWAbf7TZOwU=", "X-Google-Smtp-Source": "APXvYqwJ3AXNGPKR8CvVwn+1NJfF2I4wPyeLWTaJjlRgYhQbwttCQHeRPx8gz0KA9Lhih7E3N2eWXQ==", "X-Received": "by 2002:a62:874d:: with SMTP id\n\ti74mr57943418pfe.94.1564743312378; \n\tFri, 02 Aug 2019 03:55:12 -0700 (PDT)", "From": "Chuhong Yuan <hslester96@gmail.com>", "To": "", "Date": "Fri, 2 Aug 2019 18:55:07 +0800", "Message-Id": "<20190802105507.16650-1-hslester96@gmail.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 2/2] ixgbe: Use refcount_t for refcount", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "netdev@vger.kernel.org, Chuhong Yuan <hslester96@gmail.com>,\n\tlinux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\t\"David S . Miller\" <davem@davemloft.net>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "refcount_t is better for reference counters since its\nimplementation can prevent overflows.\nSo convert atomic_t ref counters to refcount_t.\n\nAlso convert refcount from 0-based to 1-based.\n\nThis patch depends on PATCH 1/2.\n\nSigned-off-by: Chuhong Yuan <hslester96@gmail.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 6 +++---\n drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h | 2 +-\n 2 files changed, 4 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\nindex 00710f43cfd2..d313d00065cd 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c\n@@ -773,7 +773,7 @@ int ixgbe_setup_fcoe_ddp_resources(struct ixgbe_adapter *adapter)\n \n \tfcoe->extra_ddp_buffer = buffer;\n \tfcoe->extra_ddp_buffer_dma = dma;\n-\tatomic_set(&fcoe->refcnt, 0);\n+\trefcount_set(&fcoe->refcnt, 1);\n \n \t/* allocate pci pool for each cpu */\n \tfor_each_possible_cpu(cpu) {\n@@ -837,7 +837,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \tstruct ixgbe_fcoe *fcoe = &adapter->fcoe;\n \n-\tatomic_inc(&fcoe->refcnt);\n+\trefcount_inc(&fcoe->refcnt);\n \n \tif (!(adapter->flags & IXGBE_FLAG_FCOE_CAPABLE))\n \t\treturn -EINVAL;\n@@ -883,7 +883,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)\n {\n \tstruct ixgbe_adapter *adapter = netdev_priv(netdev);\n \n-\tif (!atomic_dec_and_test(&adapter->fcoe.refcnt))\n+\tif (!refcount_dec_and_test(&adapter->fcoe.refcnt))\n \t\treturn -EINVAL;\n \n \tif (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h\nindex 724f5382329f..7ace5fee6ede 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.h\n@@ -51,7 +51,7 @@ struct ixgbe_fcoe_ddp_pool {\n \n struct ixgbe_fcoe {\n \tstruct ixgbe_fcoe_ddp_pool __percpu *ddp_pool;\n-\tatomic_t refcnt;\n+\trefcount_t refcnt;\n \tspinlock_t lock;\n \tstruct ixgbe_fcoe_ddp ddp[IXGBE_FCOE_DDP_MAX_X550];\n \tvoid *extra_ddp_buffer;\n", "prefixes": [ "2/2" ] }