Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp445086pxv; Thu, 8 Jul 2021 06:15:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGSIkq+AYyZxnUn2xm2lbhXPyLwenD1XJDJjHQBLmUWNeCbHzJvQ81oaP8cTOFkG5x36dd X-Received: by 2002:a5e:d80e:: with SMTP id l14mr24067723iok.79.1625750157717; Thu, 08 Jul 2021 06:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625750157; cv=none; d=google.com; s=arc-20160816; b=l1uUWm7RjWD0E+DKQML46edV99Gch9CJnfgZhw1RzQB2KlRNwRBUwqIx6FDDmyW+z1 COXupEEuOqHdFflxVPNUxR6K3AvNbgmsycjwuQ+gveSRqM1meWothYXrayfg52Be3rCx US7HjQhnkqK1JS5Pc7HVsYujMaWfQn9uQiQ/XaEGeafriZbrgGJDYHPGhmtGA4RrvMMG 2iLaIbOG99bMg8Jw0X02isuyfnLsJrfaVyyn3Drr4CSNWGqxlzIZmyZMKUSCzMgUafk9 C88vc5FkqyX6ISsurbBQeZXAQDJ5ik+QcDOtU4yVo0EVPI1Z5Yy5XLc5CdqUAG8YGr0J o+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tbwDZTVA3oc7Q9ff3kxJ1sCnVtc2rZm4++iTcMrtITg=; b=ZC3jSkpGhyy+qBpJ67hdLXUQeCTisEmzgMgyFdxz9CRXN3WVLt2ozVNePyNaq2rqlQ 1jC1AbkgZI82zEmBieEeQMgeYHi7AE/BpPH1FLHu9rInCloN8UVkk01wPEsTrF6nLJ2N qwOJd6uT9qC9Pk5mbVAyrxwF6nIYn++jjy0WT0LV0Y2ogYcZ2lYdfqgZeaimyNtZYI0b SU25RmAx7WrlUTLLYNuTuu4idLfL/HA7fT/uu586u+8DLt5sHxYh9wI9g6ia/2tZZXxS GXfM+O8ivkD4P+CuTiSlGo6luqAiagwjgqJNnoLT3DrDT3j1CoYpktH4y+3R2P9bjw/W bllQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si2134180jaf.47.2021.07.08.06.15.39; Thu, 08 Jul 2021 06:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbhGHNQs (ORCPT + 99 others); Thu, 8 Jul 2021 09:16:48 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:10434 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231414AbhGHNQr (ORCPT ); Thu, 8 Jul 2021 09:16:47 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GLGr86xySzcb9Z; Thu, 8 Jul 2021 21:10:48 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 8 Jul 2021 21:14:01 +0800 From: Miaohe Lin To: , , CC: , , , , , , Subject: [PATCH] mtd: fix size in mtd_info_user to support 64-bit Date: Thu, 8 Jul 2021 21:13:59 +0800 Message-ID: <20210708131359.21591-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Feilong Lin The size in struct mtd_info_user is 32-bit, which will cause errors when obtaining the size of large-capacity MTD devices, such as TLC NAND FLASH-2048Gb. Fixes: 69423d99fc18 ("[MTD] update internal API to support 64-bit device size") Signed-off-by: Feilong Lin --- include/uapi/mtd/mtd-abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index b869990c2db2..efe0b53b10c1 100644 --- a/include/uapi/mtd/mtd-abi.h +++ b/include/uapi/mtd/mtd-abi.h @@ -128,7 +128,7 @@ struct mtd_write_req { struct mtd_info_user { __u8 type; __u32 flags; - __u32 size; /* Total size of the MTD */ + __u64 size; /* Total size of the MTD */ __u32 erasesize; __u32 writesize; __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ -- 2.23.0