Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196159/?format=api
{ "id": 2196159, "url": "http://patchwork.ozlabs.org/api/patches/2196159/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260213-i2c-xiic-v11-1-5d18aea11bde@nexthop.ai/", "project": { "id": 35, "url": "http://patchwork.ozlabs.org/api/projects/35/?format=api", "name": "Linux I2C development", "link_name": "linux-i2c", "list_id": "linux-i2c.vger.kernel.org", "list_email": "linux-i2c@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260213-i2c-xiic-v11-1-5d18aea11bde@nexthop.ai>", "list_archive_url": null, "date": "2026-02-13T00:15:16", "name": "[v11,1/7] i2c: xiic: switch to devres managed APIs", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7301e90df1bd144320e548fbb8396c94adeac4a5", "submitter": { "id": 92480, "url": "http://patchwork.ozlabs.org/api/people/92480/?format=api", "name": "Abdurrahman Hussain via B4 Relay", "email": "devnull+abdurrahman.nexthop.ai@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260213-i2c-xiic-v11-1-5d18aea11bde@nexthop.ai/mbox/", "series": [ { "id": 492044, "url": "http://patchwork.ozlabs.org/api/series/492044/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=492044", "date": "2026-02-13T00:15:16", "name": "i2c: xiic: use generic device property accessors", "version": 11, "mbox": "http://patchwork.ozlabs.org/series/492044/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196159/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196159/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-i2c+bounces-15958-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-i2c@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=WfBxamJ/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-i2c+bounces-15958-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"WfBxamJ/\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fBt493MMtz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 11:15:53 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 820EF3023BB3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 00:15:37 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 352761A2389;\n\tFri, 13 Feb 2026 00:15:23 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id C3BDA1F30A9;\n\tFri, 13 Feb 2026 00:15:22 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPS id 7C840C4CEF7;\n\tFri, 13 Feb 2026 00:15:22 +0000 (UTC)", "from aws-us-west-2-korg-lkml-1.web.codeaurora.org\n (localhost.localdomain [127.0.0.1])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 4BC41EEA86E;\n\tFri, 13 Feb 2026 00:15:22 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770941722; cv=none;\n b=oR5cilXClzw792/2Rxl1IqNYT0Ud/SMXVhMWOZ96XrgYnpM9ZwONSkYTJ+C/7uscrRyfDJGxfqencOAmZP3CADiUU93eAz+A6/aB96DKwzwZ7igYbGVUWaaMs7t4nwpwTSRa71uo39BdQjsegFshwYs+cBlUZuEN1RYxEfNdCZk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770941722; c=relaxed/simple;\n\tbh=odmV5niUZmpfJnRwHXoQMD5/apRHKE+2PCyK8AQML/I=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=OtB/X4rfgKsYJqU60+794YAg1BP0ZuliWkHZ0rr6FROEeX1mWPkOUaT/vzIcAurl5RTmLSX5wLbwPBH3ceNFYxyBjc+lHNdGFSEg+f+qGqyqvviWbm7y1LfkK+dGhlxxtn+r2UqQFSXWNDYmsSmA8ciww8I98vSOQdMOoajY7HA=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=WfBxamJ/; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1770941722;\n\tbh=odmV5niUZmpfJnRwHXoQMD5/apRHKE+2PCyK8AQML/I=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n\tb=WfBxamJ/v4rzIhn4fsDBL2srK/hZQamO77VWOl2dssNtaxfNZwa6hdkdXQ4lv6f7O\n\t h/i6ZlCQAJrIrfxkS9Clp6Y+b9CY81fq4Wcz++0od31q+ePvk7x933oyE5Ik27666S\n\t lI6u7NBOK3SJt9nGDD4e346t+DOsS77tRi0p7h3BzMyGWYI0WvcQ4d8/No5zjSRoq2\n\t pzdtsJYMkSPTMUdOJ84pmI+aRJYsSYMwvvS/hd9H3q/U9aI5+ftD4upcdtwUQTv7IF\n\t OcKlMOJutNxNwjC+fMgx5O6WrUNtE7Jh/3rgD4B5DEM6Qf2tDYqH70hCiIhOQMrr4N\n\t agJQPU+BHtULw==", "From": "Abdurrahman Hussain via B4 Relay\n <devnull+abdurrahman.nexthop.ai@kernel.org>", "Date": "Fri, 13 Feb 2026 00:15:16 +0000", "Subject": "[PATCH v11 1/7] i2c: xiic: switch to devres managed APIs", "Precedence": "bulk", "X-Mailing-List": "linux-i2c@vger.kernel.org", "List-Id": "<linux-i2c.vger.kernel.org>", "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260213-i2c-xiic-v11-1-5d18aea11bde@nexthop.ai>", "References": "<20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai>", "In-Reply-To": "<20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai>", "To": "Michal Simek <michal.simek@amd.com>, Andi Shyti <andi.shyti@kernel.org>,\n Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Conor Dooley <conor+dt@kernel.org>", "Cc": "Andy Shevchenko <andriy.shevchenko@intel.com>,\n linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,\n linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,\n Abdurrahman Hussain <abdurrahman@nexthop.ai>", "X-Mailer": "b4 0.14.3", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1770941721; l=2992;\n i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id;\n bh=xe5Qq7Si6KCzd0ih/kyZJPCw0i78NqZP8R5Fx1dBPLI=;\n b=qoaB1lNHbbTdBA5ZFW4APj4o2rrcGUF80x8qghPJ1pqxa0+McQMy5g10+ojZE32jgJTRE4UhV\n IXoeXoL4uzFAmCBHWCEolwBB3XxjzIcWqcBUbX2CGOUVrj9PwGrEA0z", "X-Developer-Key": "i=abdurrahman@nexthop.ai; a=ed25519;\n pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg=", "X-Endpoint-Received": "by B4 Relay for abdurrahman@nexthop.ai/20260119 with\n auth_id=608", "X-Original-From": "Abdurrahman Hussain <abdurrahman@nexthop.ai>", "Reply-To": "abdurrahman@nexthop.ai" }, "content": "From: Abdurrahman Hussain <abdurrahman@nexthop.ai>\n\nSimplify the error code paths by switching to devres managed helper\nfunctions.\n\nReviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>\nSigned-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>\n---\n drivers/i2c/busses/i2c-xiic.c | 30 ++++++++++++------------------\n 1 file changed, 12 insertions(+), 18 deletions(-)", "diff": "diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c\nindex 28015d77599d..65aa280f6fd9 100644\n--- a/drivers/i2c/busses/i2c-xiic.c\n+++ b/drivers/i2c/busses/i2c-xiic.c\n@@ -1423,6 +1423,7 @@ MODULE_DEVICE_TABLE(of, xiic_of_match);\n \n static int xiic_i2c_probe(struct platform_device *pdev)\n {\n+\tstruct device *dev = &pdev->dev;\n \tstruct xiic_i2c *i2c;\n \tstruct xiic_i2c_platform_data *pdata;\n \tconst struct of_device_id *match;\n@@ -1461,7 +1462,10 @@ static int xiic_i2c_probe(struct platform_device *pdev)\n \tsnprintf(i2c->adap.name, sizeof(i2c->adap.name),\n \t\t DRIVER_NAME \" %s\", pdev->name);\n \n-\tmutex_init(&i2c->lock);\n+\tret = devm_mutex_init(dev, &i2c->lock);\n+\tif (ret)\n+\t\treturn ret;\n+\n \tspin_lock_init(&i2c->atomic_lock);\n \n \ti2c->clk = devm_clk_get_enabled(&pdev->dev, NULL);\n@@ -1472,8 +1476,9 @@ static int xiic_i2c_probe(struct platform_device *pdev)\n \ti2c->dev = &pdev->dev;\n \tpm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT);\n \tpm_runtime_use_autosuspend(i2c->dev);\n-\tpm_runtime_set_active(i2c->dev);\n-\tpm_runtime_enable(i2c->dev);\n+\tret = devm_pm_runtime_set_active_enabled(dev);\n+\tif (ret)\n+\t\treturn ret;\n \n \t/* SCL frequency configuration */\n \ti2c->input_clk = clk_get_rate(i2c->clk);\n@@ -1489,7 +1494,7 @@ static int xiic_i2c_probe(struct platform_device *pdev)\n \n \tif (ret < 0) {\n \t\tdev_err_probe(&pdev->dev, ret, \"Cannot claim IRQ\\n\");\n-\t\tgoto err_pm_disable;\n+\t\treturn ret;\n \t}\n \n \ti2c->singlemaster =\n@@ -1508,16 +1513,14 @@ static int xiic_i2c_probe(struct platform_device *pdev)\n \t\ti2c->endianness = BIG;\n \n \tret = xiic_reinit(i2c);\n-\tif (ret < 0) {\n-\t\tdev_err_probe(&pdev->dev, ret, \"Cannot xiic_reinit\\n\");\n-\t\tgoto err_pm_disable;\n-\t}\n+\tif (ret)\n+\t\treturn dev_err_probe(dev, ret, \"Cannot xiic_reinit\\n\");\n \n \t/* add i2c adapter to i2c tree */\n \tret = i2c_add_adapter(&i2c->adap);\n \tif (ret) {\n \t\txiic_deinit(i2c);\n-\t\tgoto err_pm_disable;\n+\t\treturn ret;\n \t}\n \n \tif (pdata) {\n@@ -1530,12 +1533,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)\n \t\t(unsigned long)res->start, irq, i2c->i2c_clk);\n \n \treturn 0;\n-\n-err_pm_disable:\n-\tpm_runtime_disable(&pdev->dev);\n-\tpm_runtime_set_suspended(&pdev->dev);\n-\n-\treturn ret;\n }\n \n static void xiic_i2c_remove(struct platform_device *pdev)\n@@ -1555,9 +1552,6 @@ static void xiic_i2c_remove(struct platform_device *pdev)\n \t\txiic_deinit(i2c);\n \n \tpm_runtime_put_sync(i2c->dev);\n-\tpm_runtime_disable(&pdev->dev);\n-\tpm_runtime_set_suspended(&pdev->dev);\n-\tpm_runtime_dont_use_autosuspend(&pdev->dev);\n }\n \n static const struct dev_pm_ops xiic_dev_pm_ops = {\n", "prefixes": [ "v11", "1/7" ] }