get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230158,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230158/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260429121324.391457-1-marex@nabladev.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260429121324.391457-1-marex@nabladev.com>",
    "date": "2026-04-29T12:13:06",
    "name": "env: mmc: Use correct eMMC HW partition size when calculating end of HW partition",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f7abef567db30fa0ebdf72a903a8a50f1e1adfa8",
    "submitter": {
        "id": 91452,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/91452/?format=api",
        "name": "Marek Vasut",
        "email": "marex@nabladev.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260429121324.391457-1-marex@nabladev.com/mbox/",
    "series": [
        {
            "id": 502045,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502045/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=502045",
            "date": "2026-04-29T12:13:06",
            "name": "env: mmc: Use correct eMMC HW partition size when calculating end of HW partition",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502045/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230158/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230158/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nabladev.com header.i=@nabladev.com header.a=rsa-sha256\n header.s=dkim header.b=AfTB4Mbk;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=nabladev.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nabladev.com header.i=@nabladev.com\n header.b=\"AfTB4Mbk\";\n\tdkim-atps=neutral",
            "phobos.denx.de; dmarc=pass (p=reject dis=none)\n header.from=nabladev.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=marex@nabladev.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\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 4g5GRn6FDgz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 22:13:41 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id C6752847C6;\n\tWed, 29 Apr 2026 14:13:37 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 68C15847C7; Wed, 29 Apr 2026 14:13:36 +0200 (CEST)",
            "from mx.nabladev.com (mx.nabladev.com\n [IPv6:2a00:f820:417:0:178:251:229:89])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 37682847B0\n for <u-boot@lists.denx.de>; Wed, 29 Apr 2026 14:13:34 +0200 (CEST)",
            "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 74292112780; Wed, 29 Apr 2026 14:13:25 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nabladev.com;\n s=dkim; t=1777464809; h=from:subject:date:message-id:to:cc:mime-version:\n content-transfer-encoding; bh=aY0Y8iNl/knmPE3pSPdTSzkWG4UjAFJrHwSYSCwnln4=;\n b=AfTB4MbkoXhY+mqpVlnpjxRKkTYKHynqBwUwC1yVf1tHL0vKjooNUNRmu0TpAnoWHF13m3\n JN/fjD1qocu3g0ZnQNtAXEih2VM0Vo9K3IfQN26Y+COcT7vN+qKov91K5bw6w65n9S64Kf\n xLJgBUL2pjs1riQV5MeVGqtlQMAfVOImD6kXyixs1xW1DJI2KeDQxlTrw+lWLsV033kX2P\n 2YZKhsv4jhfVNMtYOOmhdElQtJWu4xILKsCeMDywX2NUHRfF3BtIyc9A2h4QZfi/WgWAPs\n ya6lcOWY/Z4BUSU9Yb39pQsOQA3K2GgUhfpFmURgRwJiUlyaOdOe9wNugLnAIg==",
        "From": "Marek Vasut <marex@nabladev.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Marek Vasut <marex@nabladev.com>, Jaehoon Chung <jh80.chung@samsung.com>,\n Jasper Orschulko <jasper@fancydomain.eu>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Michael Heimpold <mhei@heimpold.de>, Michael Walle <mwalle@kernel.org>,\n Patrice Chotard <patrice.chotard@foss.st.com>,\n Patrick Delaunay <patrick.delaunay@foss.st.com>,\n Peng Fan <peng.fan@nxp.com>, Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH] env: mmc: Use correct eMMC HW partition size when calculating\n end of HW partition",
        "Date": "Wed, 29 Apr 2026 14:13:06 +0200",
        "Message-ID": "<20260429121324.391457-1-marex@nabladev.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Last-TLS-Session-Version": "TLSv1.3",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "When calculating the end of eMMC HW partition, it is necessary to\nuse the length of that eMMC HW partition, not the length of the\neMMC HW USER partition unconditionally, otherwise the end of e.g.\neMMC HW BOOT partition will be way past the actual end of that eMMC\nHW BOOT partition. Add the missing distinction. eMMC HW GP partitions\nare not supported, so those are not considered here.\n\nSigned-off-by: Marek Vasut <marex@nabladev.com>\n---\nCc: Jaehoon Chung <jh80.chung@samsung.com>\nCc: Jasper Orschulko <jasper@fancydomain.eu>\nCc: Joe Hershberger <joe.hershberger@ni.com>\nCc: Michael Heimpold <mhei@heimpold.de>\nCc: Michael Walle <mwalle@kernel.org>\nCc: Patrice Chotard <patrice.chotard@foss.st.com>\nCc: Patrick Delaunay <patrick.delaunay@foss.st.com>\nCc: Peng Fan <peng.fan@nxp.com>\nCc: Tom Rini <trini@konsulko.com>\nCc: u-boot@lists.denx.de\n---\n env/mmc.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/env/mmc.c b/env/mmc.c\nindex 1eddba3b0f8..4c1448bd05e 100644\n--- a/env/mmc.c\n+++ b/env/mmc.c\n@@ -239,8 +239,12 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr)\n \t\treturn -ENOENT;\n \t}\n \n-\tif (offset < 0)\n-\t\toffset += mmc->capacity;\n+\tif (offset < 0) {\n+\t\tif (CONFIG_ENV_MMC_EMMC_HW_PARTITION)\n+\t\t\toffset += mmc->capacity_boot;\n+\t\telse\n+\t\t\toffset += mmc->capacity;\n+\t}\n \n \t*env_addr = offset;\n \n",
    "prefixes": []
}