Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1526137/?format=api
{ "id": 1526137, "url": "http://patchwork.ozlabs.org/api/patches/1526137/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20210909094849.313936-2-u.kleine-koenig@pengutronix.de/", "project": { "id": 38, "url": "http://patchwork.ozlabs.org/api/projects/38/?format=api", "name": "Linux PWM development", "link_name": "linux-pwm", "list_id": "linux-pwm.vger.kernel.org", "list_email": "linux-pwm@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20210909094849.313936-2-u.kleine-koenig@pengutronix.de>", "list_archive_url": null, "date": "2021-09-09T09:48:48", "name": "[1/2] pwm: Add might_sleep() annotations for !CONFIG_PWM API functions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "357ab8b5341bab2d4ae06c277cba8f7af6e7834c", "submitter": { "id": 1476, "url": "http://patchwork.ozlabs.org/api/people/1476/?format=api", "name": "Uwe Kleine-König", "email": "u.kleine-koenig@pengutronix.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pwm/patch/20210909094849.313936-2-u.kleine-koenig@pengutronix.de/mbox/", "series": [ { "id": 261585, "url": "http://patchwork.ozlabs.org/api/series/261585/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/list/?series=261585", "date": "2021-09-09T09:48:47", "name": "pwm: add might_sleep annotations", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/261585/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1526137/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1526137/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-pwm-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=23.128.96.18; helo=vger.kernel.org;\n envelope-from=linux-pwm-owner@vger.kernel.org; receiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby ozlabs.org (Postfix) with ESMTP id 4H4vND32mmz9t0J\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 9 Sep 2021 19:49:00 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n id S231793AbhIIJuI (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n Thu, 9 Sep 2021 05:50:08 -0400", "from lindbergh.monkeyblade.net ([23.128.96.19]:38484 \"EHLO\n lindbergh.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n with ESMTP id S233215AbhIIJuG (ORCPT\n <rfc822;linux-pwm@vger.kernel.org>); Thu, 9 Sep 2021 05:50:06 -0400", "from metis.ext.pengutronix.de (metis.ext.pengutronix.de\n [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33])\n by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9E8BC061757\n for <linux-pwm@vger.kernel.org>; Thu, 9 Sep 2021 02:48:57 -0700 (PDT)", "from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2])\n by metis.ext.pengutronix.de with esmtps\n (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.92)\n (envelope-from <ukl@pengutronix.de>)\n id 1mOGfv-0000GR-MP; Thu, 09 Sep 2021 11:48:55 +0200", "from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de)\n by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92)\n (envelope-from <ukl@pengutronix.de>)\n id 1mOGfv-0007fS-5f; Thu, 09 Sep 2021 11:48:55 +0200", "from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92)\n (envelope-from <ukl@pengutronix.de>)\n id 1mOGfv-0005n5-4Q; Thu, 09 Sep 2021 11:48:55 +0200" ], "From": "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>", "To": "Thierry Reding <thierry.reding@gmail.com>,\n Lee Jones <lee.jones@linaro.org>", "Cc": "linux-pwm@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?M=C3=A5rten_?=\n\t=?utf-8?q?Lindahl?= <marten.lindahl@axis.com>", "Subject": "[PATCH 1/2] pwm: Add might_sleep() annotations for !CONFIG_PWM API\n functions", "Date": "Thu, 9 Sep 2021 11:48:48 +0200", "Message-Id": "<20210909094849.313936-2-u.kleine-koenig@pengutronix.de>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210909094849.313936-1-u.kleine-koenig@pengutronix.de>", "References": "<20210909094849.313936-1-u.kleine-koenig@pengutronix.de>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "X-Patch-Hashes": "v=1; h=sha256; i=XvhPNMXnWwMN1sHwqLfEMvcJY20aZGzkN1dDlnwWbd8=;\n m=/lKx7rxVN0lJw1XTEHhyh1TXvRIPtM7zDTYkKiSMN3o=;\n p=RRk8RqGFm6D70uLuzQDcpZsZh+kpSMh8HHXe8YG7ffk=;\n g=3ef48e53ac7c3c92b78413d99d830910121d8c65", "X-Patch-Sig": "m=pgp; i=u.kleine-koenig@pengutronix.de;\n s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6;\n b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmE52HkACgkQwfwUeK3K7AmCPwf+P3b\n dBVvBPMsXUVjEejhLIUbD3D/GUKeTYS/U3ScflIR+O239Erhy8ys7DAJC60KFYbSo61x5t9nnygKP\n tfXGfr476mLCCX/mK+ZP/jA8VVN0/ecYHy6tWUEpJ0Ud7W4uTabd3kUpJ/VEShKyfjOVChhrwC+cN\n IFRxJiFhbchmIWsACCzX/tOKAFmsVr7YOZOYM0h1CrgPK80NN453JmN42pySVg7hfe8SnNkTma6ln\n C8eBGZ4pvA4H/vm60M4zC9X64EdIIRhreKGWulHfAeYl4vY25OJUrF56Y5/YqqSS9HDD9Oug+d5Ye\n mBHbUnzHrzjiDBbaJLt7lwnNEJYgyiw==", "Content-Transfer-Encoding": "8bit", "X-SA-Exim-Connect-IP": "2a0a:edc0:0:c01:1d::a2", "X-SA-Exim-Mail-From": "ukl@pengutronix.de", "X-SA-Exim-Scanned": "No (on metis.ext.pengutronix.de);\n SAEximRunCond expanded to false", "X-PTX-Original-Recipient": "linux-pwm@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-pwm.vger.kernel.org>", "X-Mailing-List": "linux-pwm@vger.kernel.org" }, "content": "The normal implementations of these functions make use of mutexes. To\nmake it obvious that these functions might sleep also add annotations to\nthe dummy implementations in the !CONFIG_PWM case.\n\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n---\n include/linux/pwm.h | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/include/linux/pwm.h b/include/linux/pwm.h\nindex 725c9b784e60..515e33978e97 100644\n--- a/include/linux/pwm.h\n+++ b/include/linux/pwm.h\n@@ -429,11 +429,13 @@ struct pwm_device *devm_fwnode_pwm_get(struct device *dev,\n #else\n static inline struct pwm_device *pwm_request(int pwm_id, const char *label)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n static inline void pwm_free(struct pwm_device *pwm)\n {\n+\tmight_sleep();\n }\n \n static inline int pwm_apply_state(struct pwm_device *pwm,\n@@ -493,12 +495,14 @@ static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,\n \t\t\t\t\t\t unsigned int index,\n \t\t\t\t\t\t const char *label)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n static inline struct pwm_device *pwm_get(struct device *dev,\n \t\t\t\t\t const char *consumer)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n@@ -506,16 +510,19 @@ static inline struct pwm_device *of_pwm_get(struct device *dev,\n \t\t\t\t\t struct device_node *np,\n \t\t\t\t\t const char *con_id)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n static inline void pwm_put(struct pwm_device *pwm)\n {\n+\tmight_sleep();\n }\n \n static inline struct pwm_device *devm_pwm_get(struct device *dev,\n \t\t\t\t\t const char *consumer)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n@@ -523,6 +530,7 @@ static inline struct pwm_device *devm_of_pwm_get(struct device *dev,\n \t\t\t\t\t\t struct device_node *np,\n \t\t\t\t\t\t const char *con_id)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n \n@@ -530,6 +538,7 @@ static inline struct pwm_device *\n devm_fwnode_pwm_get(struct device *dev, struct fwnode_handle *fwnode,\n \t\t const char *con_id)\n {\n+\tmight_sleep();\n \treturn ERR_PTR(-ENODEV);\n }\n #endif\n", "prefixes": [ "1/2" ] }