Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2526367rda; Wed, 25 Oct 2023 05:33:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWKhaBaS3CPdzn0L/TQKR2TjSsY0l4uSoKzDAA2yItJMWbYE5Smt5Qmz/jPJnD3RkTs+sY X-Received: by 2002:a81:4f0c:0:b0:5a8:181e:8d6c with SMTP id d12-20020a814f0c000000b005a8181e8d6cmr13454626ywb.10.1698237198567; Wed, 25 Oct 2023 05:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698237198; cv=none; d=google.com; s=arc-20160816; b=SXLRSz499t9fcwSrEr1cCS8dZ5ocDCRiHcp7FFtUjJFbhQVmqfvQ0BBMeKSFJ92pBP 3reoZjAmgk649Bk12ntC/Z7LhPmPPpMB+MGYvmcXMnIOAj+BfTRhzMwnFg6yWUQoJvbC 5lvfnZpfQ0DQuGvyH8ZN1FQmbb+uPu0aDukADlPnn1vVaw5M8KdEPxkWi85w0sC2Qzwk u0ykPK0E4JdFC7wrPWJMLVR0CQc7HxM7Tq/OVefKwGhQC5mAEjzQ0J0Ez0gRNUxbPwNO lL2iHl3l8ZIA8wntxFaqkVzLD1J17sEHCXT2gPjOlx9UxCzKEJSbU/YC61BrwIAhIAaA LNiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:subject:message-id:references:in-reply-to :cc:to:from:mime-version:content-transfer-encoding; bh=8CPemYXBUDg57/WVb4vOz03sRB1TRQWESGKykqWrHzg=; fh=ZiA2lPhqPRzCOXeZwUxLz+cgWzhOw0qzd67B+McQ3D8=; b=ZQCXnyOQFcHF4J4thrRedcUi2xWgkIbDYVmCc9FjbEW0wAQOnj5TNDcctf0v6++cvo 9E2b5btNsO9GeGng9LwdK0S6S1ZUe3qqddRw+Z8l7aKya+x2PYaecTODWLvw/XjdHZ5c eeJtEdcyuPQK8G20hLduLGVeDaXcg1I8mF1Ri0tT2kE1Ehw18Vo/NUyBX3endckTSJk7 RBI65tLTAkXyB6UknyZJoSOAVXgcfspxaiKvMya3s7NBjzn7y7Hnz0+YrrugEoU0OalY qiPR3v6ncS3juWAdvfr2uco3PJAeE6yxbOr47xE2bCA4GIGcwbFm7Tn3mWHD0RXNIJ8L yPBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s187-20020a8182c4000000b0059f839f52c6si12736167ywf.437.2023.10.25.05.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:33:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7F8CD80EB86E; Wed, 25 Oct 2023 05:33:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344014AbjJYMdJ (ORCPT + 99 others); Wed, 25 Oct 2023 08:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234876AbjJYMdH (ORCPT ); Wed, 25 Oct 2023 08:33:07 -0400 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14D8218E; Wed, 25 Oct 2023 05:33:05 -0700 (PDT) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3b2f2b9a176so3734225b6e.0; Wed, 25 Oct 2023 05:33:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698237184; x=1698841984; h=date:subject:message-id:references:in-reply-to:cc:to:from :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=8CPemYXBUDg57/WVb4vOz03sRB1TRQWESGKykqWrHzg=; b=kfLk/HwAJFNxCDS+nCShcYMgexOfU/V3ciNtLYJaAiyrRLl1uGf5AFtwQcNjACeymm R+4K4MxTfgXSYYAwtYORC9mN6+tBQ46ElyGYSPi+Pbms486qPrYVkYXmX9VLPOMf3eSz jD31HY3D/n4+M3/ROXdk0SnXHAhZfyUIa8v86hfPC3cyKQMo/E/1EDVOrlXVU8hUQ2P9 ZHGzKimEmmRwYOoDqgGCqWxG8FzK44dq9plY/7R4B8bTcvPsWDgCiu9oSnc5ZcEtLvW2 zqTPjZvWb6/ON5ErUpG0hgER3/UDhIOKOp/Z0jrPtL72OkzNICQjGH7nU04UtvmWXiqm XZyQ== X-Gm-Message-State: AOJu0Yxj1yR9R9oUF14JCE00lCLR3VihFz/FAIpPzX98RzGbBm9yuZbX qkd5bf3kMo5Bisxb7y3Wpg== X-Received: by 2002:a54:4581:0:b0:3a8:ccf0:103f with SMTP id z1-20020a544581000000b003a8ccf0103fmr16717681oib.3.1698237184122; Wed, 25 Oct 2023 05:33:04 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id n12-20020aca240c000000b003afe584ed4fsm2356547oic.42.2023.10.25.05.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:33:03 -0700 (PDT) Received: (nullmailer pid 3559498 invoked by uid 1000); Wed, 25 Oct 2023 12:33:02 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Rob Herring To: Edward Chow Cc: linux-kernel@vger.kernel.org, Miquel Raynal , Krzysztof Kozlowski , Rob Herring , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, Richard Weinberger , Vignesh Raghavendra In-Reply-To: <20231025052937.830813-1-equu@openmail.cc> References: <20231025052937.830813-1-equu@openmail.cc> Message-Id: <169823714202.3554834.10341623302238023195.robh@kernel.org> Subject: Re: [PATCH] dt-bindings: mtd-partitions: Export special values Date: Wed, 25 Oct 2023 07:33:02 -0500 X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 05:33:15 -0700 (PDT) On Wed, 25 Oct 2023 13:29:37 +0800, Edward Chow wrote: > There are special "offset" and "size" values defined and documented in > linux/mtd/partitions.h: > > // consume as much as possible, leaving size after the end of partition. > > // the partition will start at the next erase block. > > // the partition will start where the previous one ended. > > (Though not explicitly, they are compared against variables in uint64_t > in drivers/mtd/mtdpart.c, so they had better be considered as such.) > > // the partition will extend to the end of the master MTD device. > > These special values could be used to define partitions automatically > fitting to the size of the master MTD device at runtime. > > However, these values used not to be exported to dt-bindings, thus > seldom used before, since they might have been only used in numeric form, > such as "(-1) (-3)" for MTDPART_OFS_RETAIN. > > Now, they are exported in dt-bindings/mtd/partitions.h as 32-bit cell > values, so 2-cell addressed should be defined to use special offset values, > such as "MTDPART_OFS_SPECIAL MTDPART_OFS_RETAIN" for MTDPART_OFS_RETAIN in > linux/mtd/partitions.h. An example is added to fixed-partitions.yaml. > > Signed-off-by: Edward Chow > --- > .../mtd/partitions/fixed-partitions.yaml | 29 +++++++++++++++++++ > MAINTAINERS | 2 ++ > include/dt-bindings/mtd/partitions.h | 15 ++++++++++ > 3 files changed, 46 insertions(+) > create mode 100644 include/dt-bindings/mtd/partitions.h > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.example.dts:225.24-25 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1427: dt_binding_check] Error 2 make: *** [Makefile:234: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231025052937.830813-1-equu@openmail.cc The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.