get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2223547/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2223547,
    "url": "http://patchwork.ozlabs.org/api/patches/2223547/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/patch/788319f0fff963feca4df3c5fcdd471dcf70ccdf.1776264104.git.u.kleine-koenig@baylibre.com/",
    "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": "<788319f0fff963feca4df3c5fcdd471dcf70ccdf.1776264104.git.u.kleine-koenig@baylibre.com>",
    "list_archive_url": null,
    "date": "2026-04-15T14:50:13",
    "name": "[v1,2/2] pwm: stm32: Make use of mul_u64_u64_div_u64_roundup()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c6314d5b2113f6b4e0845ee35bd263a82ceb128d",
    "submitter": {
        "id": 88686,
        "url": "http://patchwork.ozlabs.org/api/people/88686/?format=api",
        "name": "Uwe Kleine-König",
        "email": "u.kleine-koenig@baylibre.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pwm/patch/788319f0fff963feca4df3c5fcdd471dcf70ccdf.1776264104.git.u.kleine-koenig@baylibre.com/mbox/",
    "series": [
        {
            "id": 500001,
            "url": "http://patchwork.ozlabs.org/api/series/500001/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pwm/list/?series=500001",
            "date": "2026-04-15T14:50:11",
            "name": "pwm: stm32: A rounding fix and a cleanup",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500001/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223547/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223547/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pwm+bounces-8591-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pwm@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=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=GRkgRyOZ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-pwm+bounces-8591-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=\"GRkgRyOZ\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.221.43",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=baylibre.com"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwkdm1LCQz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 00:52:44 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id D5F963005144\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 14:50:37 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CAEBD175A6D;\n\tWed, 15 Apr 2026 14:50:35 +0000 (UTC)",
            "from mail-wr1-f43.google.com (mail-wr1-f43.google.com\n [209.85.221.43])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E5C83290D2\n\tfor <linux-pwm@vger.kernel.org>; Wed, 15 Apr 2026 14:50:34 +0000 (UTC)",
            "by mail-wr1-f43.google.com with SMTP id\n ffacd0b85a97d-43d0deb7ad5so5447347f8f.2\n        for <linux-pwm@vger.kernel.org>; Wed, 15 Apr 2026 07:50:34 -0700 (PDT)",
            "from localhost\n (p200300f65f20eb084c777289617ec110.dip0.t-ipconnect.de.\n [2003:f6:5f20:eb08:4c77:7289:617e:c110])\n        by smtp.gmail.com with UTF8SMTPSA id\n ffacd0b85a97d-43ead33d6e9sm6002565f8f.1.2026.04.15.07.50.32\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 15 Apr 2026 07:50:32 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776264635; cv=none;\n b=BW4vEt4PMfFdBGBRrPVUjrN26VWimN+UPBmQvdKV8XCBCLqgxfOeaWXt9pib6sy+jMLHNFV3LADuD7kL4N2pbKO0mYKDojKA/aXjFGf+yZlw5AT+CMiuv4jx7qJq0LD3O/JYGt/KxZx7/XoGwxi6JQ1DA290Z/xT2AesxTFgpZY=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776264635; c=relaxed/simple;\n\tbh=9qJeHZRbSFduELxueyX7SDFPcOQZv0zK9BdhVLKRq8s=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=fxp6aW6VltU/FHt3vqe2nfFw9lugAYB4+MEc9AwSK/X1/RISk3zf2LyowBeiXnWsI+thotMo2fWRch2J9Yh/k8/09yCWRebmk6V0WrBsG+LvuRYmMXb7q9XvPHX9umfS3FgB9/c1WoPdMTtewMOaZlB25aPcF5m48exljsKBGZs=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=baylibre.com;\n spf=pass smtp.mailfrom=baylibre.com;\n dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=GRkgRyOZ;\n arc=none smtp.client-ip=209.85.221.43",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1776264633;\n x=1776869433; darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=dN1czsyDMNwwt/ST8KAAFfEC2IVqy3l0935RmxW/E4s=;\n        b=GRkgRyOZHpwWoqmiVFdXBpE4UqrOjYOyBPwzPZeiLouk9x9c+VkfP01wXhu3aNnYi9\n         FtMwKadwBcwnx5TLNBc16NS+8/iKzFPTx5yG9i++vbcUPEFj+dZbmcnL1XW9RNDQLGGG\n         glM77umT+mDS9or2/WiYznQQLEP0ATwtMEshHey5L6gbyVfrZPD+8tpZIAeIu2Xxg6Aj\n         cTtSaae8L7MoAXl7I5R8MYhwPnAUfl1lrM9OGVSaCQezTP0/dWGSULnXCst/0uDc957n\n         dSqw4ycX8yiyglLDuY/LIMSp3QykBckO/Qs8XNtFnY7IZaklTMeyuRr/zRXalzae2OYS\n         10Gw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776264633; x=1776869433;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=dN1czsyDMNwwt/ST8KAAFfEC2IVqy3l0935RmxW/E4s=;\n        b=o5UREYAU1qKnMwT7gQ4xC0Dg0kAeLbZkFpCxNHPCzKMWE/lyjLcdJf+X/8itRbAYlv\n         /Kn1QTFiGnOFAmEtsZCX1w9cjURRTS6Qgds3VjiOpA4u34WkvizqlrHFK5XRMi1PMJ5g\n         Iw2RqvwvoLnKMmTOzrw9k+jj1UkGoKeez17dXBAXOat1hBTUPnZSGsKjK1vcbih2SZoR\n         XtKtu2eSrwFXuuKI2PjHVXL61HOK2IggyEjmkRCz7BFstfVVKTV/ebsUL8m6Sismz3r+\n         1EMvW0OmIu7M+1DW2Qvhj2beOiyoqCsmlzftg50xMmwJpxhD5Oftl1Jsgh8mDB3OVsLg\n         W+jA==",
        "X-Gm-Message-State": "AOJu0YwSGzh1YGY7iWwve6VV7bK4eyFDOCogqmzdYNBjMDolvEuA6uLW\n\tEaKzOXOqWFbFSnCgB+LpWcUXqRwQlhmPfgsBIS3agQ/8EFtqCMXuFeBcFhB0vHoVJis=",
        "X-Gm-Gg": "AeBDievNsD0GLD45uw/BaBdHH+zdpR3mde3BOLtenNCYcmZ6R18WG03cv1cEojiHA8D\n\t5xTrCGjH/YEF8S1FNX6PKwNZgBZP/ujvC9ZZdzxqmApTe4UjPnnZm5WoO7roL8nn1Km3NnlLKFt\n\t2VX+OiPrfSAsN/ONp6G84kmYsebY3gokcteeM6jp7wVtDA8PmCt5gApLAXAQX7PxdIZvhbN04IF\n\tjUqujkLaJYVogAXeM4t+gYvMr+D7eoJalISjfokKO+C2J8dZd+vCRiqy3GlEnuTPp7i1AmM7ajH\n\tQoa4fRj+kxj8R+jEnOTQhZg74bGRcyrc9wpzyB4dq/HcoTE+b+BUypRAn6E0eZ5hAAWS6GFTpCO\n\tMkoVirgJ5WQ/dq4SFkKkSX9bkamT2obZYKc3vyEbvPOClTkQbk+dHez8ac5bdvVxnTHDb1fWQwV\n\taePUxzYis4RGnrBpgBOGxBP8vq5BoJPgAjYfo/OmwA7uWcjISxyQ9roo8uQqkFYHR26al6l43ED\n\tx2Jyq+rJ2AaSe8=",
        "X-Received": "by 2002:a05:6000:2884:b0:43d:7147:f51 with SMTP id\n ffacd0b85a97d-43d71471152mr23644870f8f.26.1776264632805;\n        Wed, 15 Apr 2026 07:50:32 -0700 (PDT)",
        "From": "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@baylibre.com>",
        "To": "Fabrice Gasnier <fabrice.gasnier@foss.st.com>,\n\tMaxime Coquelin <mcoquelin.stm32@gmail.com>,\n\tAlexandre Torgue <alexandre.torgue@foss.st.com>",
        "Cc": "linux-pwm@vger.kernel.org,\n\tlinux-stm32@st-md-mailman.stormreply.com",
        "Subject": "[PATCH v1 2/2] pwm: stm32: Make use of mul_u64_u64_div_u64_roundup()",
        "Date": "Wed, 15 Apr 2026 16:50:13 +0200",
        "Message-ID": "\n <788319f0fff963feca4df3c5fcdd471dcf70ccdf.1776264104.git.u.kleine-koenig@baylibre.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<cover.1776264104.git.u.kleine-koenig@baylibre.com>",
        "References": "<cover.1776264104.git.u.kleine-koenig@baylibre.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pwm@vger.kernel.org",
        "List-Id": "<linux-pwm.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pwm+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pwm+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2329;\n i=u.kleine-koenig@baylibre.com; h=from:subject:message-id;\n bh=9qJeHZRbSFduELxueyX7SDFPcOQZv0zK9BdhVLKRq8s=;\n b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBp36Wq+0h8W3DUxZQpoIufXzY1woEyJ2vEcI6Ty\n gE7fVgqv/2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCad+lqgAKCRCPgPtYfRL+\n TvXYCACHODrtzojzM+GDH+KQoXVs9juGlZQxs8Z09ps0/buJOG5/BuNanRDVteKwiGuD1lPSqw/\n EDTDA7D8CPKFNhCisbvPeHB/EFl1IWJkLsD6M8dXvVdLMNzBhN1lNQtdBbxVI3800i4L5FQEx0n\n HwxnQG082WB04KVIjZ1vTW5Tg/nowjwM10bxYnIW3UOEY0kxAij8/84WzxQ/Nf7VgT4UVuYZnKJ\n /hKuqIua8QIlJmM21WZpG43NSwSQ3rUUSCSvVLBxfVculBsw9zy3STZ2YPJpBL3krO/H3L9DE2G\n FWHIDoN33CFxASh65+tEq68zFKRcnvVpPDM/LBt+F7qFQz3T",
        "X-Developer-Key": "i=u.kleine-koenig@baylibre.com; a=openpgp;\n fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "When the driver was converted to the waveform API the need for this\nfunction arised but at that time this function didn't exist yet. In the\nmeantime it's available, so switch to the global function and drop the\ndriver specific implementation.\n\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>\n---\n drivers/pwm/pwm-stm32.c | 27 +++++----------------------\n 1 file changed, 5 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c\nindex 935257a890b0..c708e4a7ad70 100644\n--- a/drivers/pwm/pwm-stm32.c\n+++ b/drivers/pwm/pwm-stm32.c\n@@ -193,22 +193,6 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip,\n \treturn ret;\n }\n \n-/*\n- * This should be moved to lib/math/div64.c. Currently there are some changes\n- * pending to mul_u64_u64_div_u64. Uwe will care for that when the dust settles.\n- */\n-static u64 stm32_pwm_mul_u64_u64_div_u64_roundup(u64 a, u64 b, u64 c)\n-{\n-\tu64 res = mul_u64_u64_div_u64(a, b, c);\n-\t/* Those multiplications might overflow but it doesn't matter */\n-\tu64 rem = a * b - c * res;\n-\n-\tif (rem)\n-\t\tres += 1;\n-\n-\treturn res;\n-}\n-\n static int stm32_pwm_round_waveform_fromhw(struct pwm_chip *chip,\n \t\t\t\t\t   struct pwm_device *pwm,\n \t\t\t\t\t   const void *_wfhw,\n@@ -223,16 +207,15 @@ static int stm32_pwm_round_waveform_fromhw(struct pwm_chip *chip,\n \t\tu64 ccr_ns;\n \n \t\t/* The result doesn't overflow for rate >= 15259 */\n-\t\twf->period_length_ns = stm32_pwm_mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * (wfhw->arr + 1),\n-\t\t\t\t\t\t\t\t\t     NSEC_PER_SEC, rate);\n+\t\twf->period_length_ns = mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * (wfhw->arr + 1),\n+\t\t\t\t\t\t\t\t   NSEC_PER_SEC, rate);\n \n-\t\tccr_ns = stm32_pwm_mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * wfhw->ccr,\n-\t\t\t\t\t\t\t       NSEC_PER_SEC, rate);\n+\t\tccr_ns = mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * wfhw->ccr, NSEC_PER_SEC, rate);\n \n \t\tif (wfhw->ccer & TIM_CCER_CCxP(ch + 1)) {\n \t\t\twf->duty_length_ns =\n-\t\t\t\tstm32_pwm_mul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * (wfhw->arr + 1 - wfhw->ccr),\n-\t\t\t\t\t\t\t\t      NSEC_PER_SEC, rate);\n+\t\t\t\tmul_u64_u64_div_u64_roundup(((u64)wfhw->psc + 1) * (wfhw->arr + 1 - wfhw->ccr),\n+\t\t\t\t\t\t\t    NSEC_PER_SEC, rate);\n \n \t\t\twf->duty_offset_ns = ccr_ns;\n \t\t} else {\n",
    "prefixes": [
        "v1",
        "2/2"
    ]
}