Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F741C77B78 for ; Tue, 18 Apr 2023 14:39:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5F5F886059; Tue, 18 Apr 2023 16:37:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=analog.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D5A6686048; Tue, 18 Apr 2023 15:05:39 +0200 (CEST) Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 95AF98606F for ; Tue, 18 Apr 2023 15:05:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Nuno.Sa@analog.com Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33ICFZLx004157; Tue, 18 Apr 2023 09:05:31 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3q0vx6ht4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 09:05:30 -0400 Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 33ID5TOY022464 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Apr 2023 09:05:29 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 18 Apr 2023 09:05:28 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 18 Apr 2023 09:05:28 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Tue, 18 Apr 2023 09:05:28 -0400 Received: from nsa.sphairon.box ([10.44.3.102]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 33ID5KcS029141; Tue, 18 Apr 2023 09:05:25 -0400 From: =?UTF-8?q?Nuno=20S=C3=A1?= To: CC: Stefan Roese Subject: [PATCH v2 2/2] mtd: cfi: change cfi_flash_bank_size() return type Date: Tue, 18 Apr 2023 15:07:28 +0200 Message-ID: <20230418130728.1456056-2-nuno.sa@analog.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418130728.1456056-1-nuno.sa@analog.com> References: <20230418130728.1456056-1-nuno.sa@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: nCQ-E57tJ8VFjlB0j0Yng9V0v4TLDXaR X-Proofpoint-ORIG-GUID: nCQ-E57tJ8VFjlB0j0Yng9V0v4TLDXaR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-18_09,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=794 clxscore=1015 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304180113 X-Mailman-Approved-At: Tue, 18 Apr 2023 16:37:46 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Move return type to phys_size_t instead of plain unsigned long. Signed-off-by: Nuno Sá --- v2: * new patch. drivers/mtd/cfi_flash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 47a48d927201..9c030de3afef 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -117,7 +117,7 @@ phys_addr_t cfi_flash_bank_addr(int i) return flash_info[i].base; } -unsigned long cfi_flash_bank_size(int i) +phys_size_t cfi_flash_bank_size(int i) { return flash_info[i].addr_size; } @@ -127,10 +127,10 @@ __weak phys_addr_t cfi_flash_bank_addr(int i) return ((phys_addr_t [])CFG_SYS_FLASH_BANKS_LIST)[i]; } -__weak unsigned long cfi_flash_bank_size(int i) +__weak phys_size_t cfi_flash_bank_size(int i) { #ifdef CFG_SYS_FLASH_BANKS_SIZES - return ((unsigned long [])CFG_SYS_FLASH_BANKS_SIZES)[i]; + return ((phys_size_t [])CFG_SYS_FLASH_BANKS_SIZES)[i]; #else return 0; #endif @@ -2112,7 +2112,7 @@ ulong flash_get_size(phys_addr_t base, int banknum) int erase_region_size; int erase_region_count; struct cfi_qry qry; - unsigned long max_size; + phys_size_t max_size; memset(&qry, 0, sizeof(qry)); -- 2.40.0