Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1135718/?format=api
{ "id": 1135718, "url": "http://patchwork.ozlabs.org/api/patches/1135718/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190723141551.5857-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": "<20190723141551.5857-1-hslester96@gmail.com>", "list_archive_url": null, "date": "2019-07-23T14:15:51", "name": "i40e: Use dev_get_drvdata", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c214659316bd8af39f6e799db298b738b58b0149", "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/20190723141551.5857-1-hslester96@gmail.com/mbox/", "series": [ { "id": 120998, "url": "http://patchwork.ozlabs.org/api/series/120998/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=120998", "date": "2019-07-23T14:15:51", "name": "i40e: Use dev_get_drvdata", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/120998/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1135718/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1135718/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.137; helo=fraxinus.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=\"tpe1MlDJ\"; dkim-atps=neutral" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 45tLS73JBsz9sBt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 24 Jul 2019 00:28:23 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id CDFB68508A;\n\tTue, 23 Jul 2019 14:28:21 +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 9k08K87j6hMb; Tue, 23 Jul 2019 14:28:19 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4597D84FA4;\n\tTue, 23 Jul 2019 14:28:19 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 45F6B1BF2B5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jul 2019 14:15:58 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 41E022033D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jul 2019 14:15:58 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zcQHBwczCc-B for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jul 2019 14:15:57 +0000 (UTC)", "from mail-pg1-f196.google.com (mail-pg1-f196.google.com\n\t[209.85.215.196])\n\tby silver.osuosl.org (Postfix) with ESMTPS id AEC6020024\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jul 2019 14:15:57 +0000 (UTC)", "by mail-pg1-f196.google.com with SMTP id w10so19511397pgj.7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jul 2019 07:15:57 -0700 (PDT)", "from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54])\n\tby smtp.gmail.com with ESMTPSA id\n\tm4sm53994904pgs.71.2019.07.23.07.15.54\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tTue, 23 Jul 2019 07:15:56 -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=6XuO6jEdHx05hNaMYchqxtP9rqz8cu9SXAHKmnHPUW4=;\n\tb=tpe1MlDJlx/KgrsWcpqqIwwTnisGHOpqlym5XovKwNxt6Z9O5WJT2J8+uuZnol2LFL\n\tu7AP6re6/9qe5/3jhH3Zfj1+zy4JJV+c7LqVW97Xs7AaFSW3/aUNyueF0uM5nwzALxW9\n\tLa0GD+KmifTDqYaP/yhMrXHqSgF7wqZs3fAeZg0qzNd39JyZe80prH49hPS3jl+qrECE\n\tbBEw574vJbzyzbweja65ehqrV/ZQ4KsclI+nd2AO3T8qQgXsm4iCmLmLO/w8uSFg/mnY\n\tcqoR4DERi2T2zLlUtZVQfdpMNSstyUmuCBukeXYKpPSW8w/hxROGEjLwCzDuZl5pTSE6\n\tX7pA==", "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=6XuO6jEdHx05hNaMYchqxtP9rqz8cu9SXAHKmnHPUW4=;\n\tb=Y3Erl2a0Z99wTvpskYpnsvL3o92SSQ5xekd3+7QuI8jH+ZXZx9SU+RRgQ2f6pImNgz\n\tjQWUeAQgWvg4Wakd0u4hBiu4gFfwap1/6AJHIwJ5bxg+4kUdINWiu8PmhsqW8cFlpo3w\n\tYH390s6UzskghGK+Jva/00Kc8FYfReB9tGxCMa13Qgtm9lLAwfVliDsX/b9aW5Zdd0Eq\n\t7osYEWQifMnhJUnq8H8TWV7N+vtv3JXZqsxtXYcvATFHLFjikHmeAmppM8svEDetIpwU\n\tjKTXF8SGV8s6zdNxSIUtLdJq8kntr95YvApt+DgSsYlEJiY1lKEmeQZFglRiRyOMm0GB\n\tj9Lg==", "X-Gm-Message-State": "APjAAAVSmBLAazOSQtffUFsvq2doGioM+3GdWBDz+tTbkScekB+iDDj8\n\tV5vDa4054DNKv0NX3XKSSDk=", "X-Google-Smtp-Source": "APXvYqyU9NQxgncgw/8atoKL9rXa7a2GeD9SYhC5Gww4rgeqRIDg5WSXdJqcQVA0+7+avG6/x8p0ig==", "X-Received": "by 2002:a63:e907:: with SMTP id i7mr75605559pgh.84.1563891357278;\n\tTue, 23 Jul 2019 07:15:57 -0700 (PDT)", "From": "Chuhong Yuan <hslester96@gmail.com>", "To": "", "Date": "Tue, 23 Jul 2019 22:15:51 +0800", "Message-Id": "<20190723141551.5857-1-hslester96@gmail.com>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "X-Mailman-Approved-At": "Tue, 23 Jul 2019 14:28:17 +0000", "Subject": "[Intel-wired-lan] [PATCH] i40e: Use dev_get_drvdata", "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": "Instead of using to_pci_dev + pci_get_drvdata,\nuse dev_get_drvdata to make code simpler.\n\nSigned-off-by: Chuhong Yuan <hslester96@gmail.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 8 +++-----\n 1 file changed, 3 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 9ebbe3da61bb..44da407e0bf9 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -15605,8 +15605,7 @@ static void i40e_shutdown(struct pci_dev *pdev)\n **/\n static int __maybe_unused i40e_suspend(struct device *dev)\n {\n-\tstruct pci_dev *pdev = to_pci_dev(dev);\n-\tstruct i40e_pf *pf = pci_get_drvdata(pdev);\n+\tstruct i40e_pf *pf = dev_get_drvdata(dev);\n \tstruct i40e_hw *hw = &pf->hw;\n \n \t/* If we're already suspended, then there is nothing to do */\n@@ -15656,8 +15655,7 @@ static int __maybe_unused i40e_suspend(struct device *dev)\n **/\n static int __maybe_unused i40e_resume(struct device *dev)\n {\n-\tstruct pci_dev *pdev = to_pci_dev(dev);\n-\tstruct i40e_pf *pf = pci_get_drvdata(pdev);\n+\tstruct i40e_pf *pf = dev_get_drvdata(dev);\n \tint err;\n \n \t/* If we're not suspended, then there is nothing to do */\n@@ -15674,7 +15672,7 @@ static int __maybe_unused i40e_resume(struct device *dev)\n \t */\n \terr = i40e_restore_interrupt_scheme(pf);\n \tif (err) {\n-\t\tdev_err(&pdev->dev, \"Cannot restore interrupt scheme: %d\\n\",\n+\t\tdev_err(dev, \"Cannot restore interrupt scheme: %d\\n\",\n \t\t\terr);\n \t}\n \n", "prefixes": [] }