From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F4BE3431E3 for ; Thu, 23 Jul 2026 02:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784774446; cv=none; b=hMl7ihVXAlA+0MA0ALQY/aMF5PY7O31VB7LIipSYbMI9BaHQa1aIaImKdblbexs5gXpQMPIfkEcCdPmqoDc01imxHBkh6SOO6xoD7J1b0Qy5ZZXiTQweZopbWPLei+ma12TZw7DUfdIFX8l1b5Ht18z1jQ9TncxCh5BjYAijhhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784774446; c=relaxed/simple; bh=luXC5gUW/+G/oJmGDbeQN0JQBh0ZG1AgVLxfCH+OLOY=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=kyXZdr8oaljcTDlv77jOgllk9eWT9aqYZraQH0GLkLXIw9hIarFmTBJwrzQvYymNpH+W8+9EuxKybbbkUrsMtriP5POEFmlUqrKilS/O2iz/Ah+HD9xOkD3nN9MNO5LK04CNagBnJfCuRAUFvwqbiiOcjJJpKenK3pSTYxO+KRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=4cYtb9/q; arc=none smtp.client-ip=113.46.200.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="4cYtb9/q" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=9M7yYSN0bYnlZIH0mun3H5de7bnSDCfsTagPaRh3GQ4=; b=4cYtb9/qH8x94qteEZLx+iXyytW8VklXKQUzFwqSyC2QxvBYTq16xTKy+lk6S+a2pLz4quFhg kapR3BjUAWYZMjSUyYUIBTlVyuTf3F1gU+N5Yd0KGbfWnFZzm0fuPRUoZLoWmeWSJD4YMyCy6cb Zrmx5Yqu1AMms74Up8hUsz8= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4h5FVR2PqrzRhVH; Thu, 23 Jul 2026 10:31:11 +0800 (CST) Received: from whupemo200011.china.huawei.com (unknown [7.152.185.179]) by mail.maildlp.com (Postfix) with ESMTPS id 379F72025F; Thu, 23 Jul 2026 10:40:33 +0800 (CST) Received: from [10.174.178.46] (10.174.178.46) by whupemo200011.china.huawei.com (7.152.185.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 23 Jul 2026 10:40:31 +0800 Subject: Re: [PATCH 1/2] UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC To: Ran Hongyun , , , , , CC: , , , References: <20260723020233.3079997-1-ranhongyun1@huawei.com> <20260723020233.3079997-2-ranhongyun1@huawei.com> From: Zhihao Cheng Message-ID: Date: Thu, 23 Jul 2026 10:40:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20260723020233.3079997-2-ranhongyun1@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To whupemo200011.china.huawei.com (7.152.185.179) ÔÚ 2026/7/23 10:02, Ran Hongyun дµÀ: > Fix two issues introduced before: > > - The parameter format string was missing the enable_fm and > need_resv_pool tokens introduced in an earlier commit. > > - The bad-block reservation note was misplaced after Example 5 > instead of after Example 3. It was misplaced due to an earlier patch. > > Fixes: 83ff59a06663 ("UBI: support ubi_num on mtd.ubi command line") > Signed-off-by: Ran Hongyun > --- > drivers/mtd/ubi/build.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Zhihao Cheng > diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c > index 674ad87809df..8e5f178168cb 100644 > --- a/drivers/mtd/ubi/build.c > +++ b/drivers/mtd/ubi/build.c > @@ -1574,7 +1574,7 @@ static int ubi_mtd_param_parse(const char *val, const struct kernel_param *kp) > } > > module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 0400); > -MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=[,[,max_beb_per1024[,ubi_num]]].\n" > +MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=[,[,max_beb_per1024[,ubi_num[,enable_fm[,need_resv_pool]]]]].\n" > "Multiple \"mtd\" parameters may be specified.\n" > "MTD devices may be specified by their number, name, or path to the MTD character device node.\n" > "Optional \"vid_hdr_offs\" parameter specifies UBI VID header position to be used by UBI. (default value if 0)\n" > @@ -1587,9 +1587,9 @@ MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd= "Example 1: mtd=/dev/mtd0 - attach MTD device /dev/mtd0.\n" > "Example 2: mtd=content,1984 mtd=4 - attach MTD device with name \"content\" using VID header offset 1984, and MTD device number 4 with default VID header offset.\n" > "Example 3: mtd=/dev/mtd1,0,25 - attach MTD device /dev/mtd1 using default VID header offset and reserve 25*nand_size_in_blocks/1024 erase blocks for bad block handling.\n" > + "\t(e.g. if the NAND *chipset* has 4096 PEB, 100 will be reserved for this UBI device).\n" > "Example 4: mtd=/dev/mtd1,0,0,5 - attach MTD device /dev/mtd1 to UBI 5 and using default values for the other fields.\n" > - "example 5: mtd=1,0,0,5 mtd=2,0,0,6,1 - attach MTD device /dev/mtd1 to UBI 5 and disable fastmap; attach MTD device /dev/mtd2 to UBI 6 and enable fastmap.(only works when fastmap is enabled and fm_autoconvert=Y).\n" > - "\t(e.g. if the NAND *chipset* has 4096 PEB, 100 will be reserved for this UBI device)."); > + "example 5: mtd=1,0,0,5 mtd=2,0,0,6,1 - attach MTD device /dev/mtd1 to UBI 5 and disable fastmap; attach MTD device /dev/mtd2 to UBI 6 and enable fastmap.(only works when fastmap is enabled and fm_autoconvert=Y).\n"); > #ifdef CONFIG_MTD_UBI_FASTMAP > module_param(fm_autoconvert, bool, 0644); > MODULE_PARM_DESC(fm_autoconvert, "Set this parameter to enable fastmap automatically on images without a fastmap."); >