Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 999D1C12002 for ; Wed, 14 Jul 2021 20:53:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 19E2C613D1 for ; Wed, 14 Jul 2021 20:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19E2C613D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5613282EA7; Wed, 14 Jul 2021 22:52:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="jM3+J+1P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0BDD82BE8; Wed, 14 Jul 2021 22:52:37 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 A32CF82A13 for ; Wed, 14 Jul 2021 22:52:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id EC723613C9; Wed, 14 Jul 2021 20:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626295949; bh=zg3Koq7aywax6sCiLg0auzSOobVs4t9cpMzceVkeB5c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jM3+J+1PB//qBsEWSIkWUCd/cuj7R/ext5ly+yxQGlDgevLCLKz6J8hPDKGFWhPRN Bos/5eE5KcVU5Z2Us5tjj/F87pLGjcxFRh2FgkdD+bMgJpsiei8emdcz7ecBvYf5df HrKbSIQlGLedvLnwCVV+AP7MWtm8lshe6/fdkzGu4MqRX2Rdz9WNIXH+8jm2p7E8qv aDQR3RuN76t3txVvnF/IS4balTTaY+z0p0wFWg1pIGIWFZt7psjsixse9VkcipYjY2 tzLYoSTECvGRRk/oIFXITpgMRo9hd2FDQT14NLwl20mW5q1hJ5WPfkux8NBIqZ9suw 3ay1fKKt3bCJw== Received: by pali.im (Postfix) id 7C5E7723; Wed, 14 Jul 2021 22:52:26 +0200 (CEST) Date: Wed, 14 Jul 2021 22:52:26 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: u-boot@lists.denx.de, Stefan Roese , Marek =?utf-8?B?QmVow7pu?= , Konstantin Porotchkin Subject: Re: [RFC 1/7] ARM: mvebu: a38x: Correct mismatched bound warnings Message-ID: <20210714205226.3vdvmrmh6554x2ih@pali> References: <20210503204859.18756-1-trini@konsulko.com> <20210503204859.18756-2-trini@konsulko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210503204859.18756-2-trini@konsulko.com> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On Monday 03 May 2021 16:48:53 Tom Rini wrote: > With gcc-11 we see: > drivers/ddr/marvell/a38x/ddr3_debug.c:672:47: error: argument 2 of type 'u32[5]' {aka 'unsigned int[5]'} with mismatched bound [-Werror=array-parameter=] > 672 | int ddr3_tip_read_adll_value(u32 dev_num, u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], > | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from drivers/ddr/marvell/a38x/ddr3_training_ip_engine.h:10, > from drivers/ddr/marvell/a38x/ddr3_init.h:17, > from drivers/ddr/marvell/a38x/ddr3_debug.c:6: > drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h:116:47: note: previously declared as 'u32[]' {aka 'unsigned int[]'} > > And similar warnings. Correct these by updating the prototype. Remove > the prototype for ddr3_tip_read_pup_value as it is unused. > > Signed-off-by: Tom Rini > --- > drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h b/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h > index ab152cb455e9..55832a55405b 100644 > --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h > +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h > @@ -8,6 +8,7 @@ > > #include "ddr3_training_ip.h" > #include "ddr3_training_ip_db.h" > +#include "mv_ddr_plat.h" > > #define KILLER_PATTERN_LENGTH 32 > #define EXT_ACCESS_BURST_LENGTH 8 > @@ -112,9 +113,12 @@ int ddr3_tip_configure_odpg(u32 dev_num, enum hws_access_type access_type, > int ddr3_tip_write_mrs_cmd(u32 dev_num, u32 *cs_mask_arr, enum mr_number mr_num, u32 data, u32 mask); > int ddr3_tip_write_cs_result(u32 dev_num, u32 offset); > int ddr3_tip_reset_fifo_ptr(u32 dev_num); > -int ddr3_tip_read_pup_value(u32 dev_num, u32 pup_values[], int reg_addr, u32 mask); > -int ddr3_tip_read_adll_value(u32 dev_num, u32 pup_values[], u32 reg_addr, u32 mask); > -int ddr3_tip_write_adll_value(u32 dev_num, u32 pup_values[], u32 reg_addr); > +int ddr3_tip_read_adll_value(u32 dev_num, > + u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], > + u32 reg_addr, u32 mask); > +int ddr3_tip_write_adll_value(u32 dev_num, > + u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], > + u32 reg_addr); > int ddr3_tip_tune_training_params(u32 dev_num, struct tune_train_params *params); > > #endif /* _DDR3_TRAINING_IP_FLOW_H_ */ CC Stefan, Marek, Konstantin Could you please send this patch to upstream? https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell Any change done in drivers/ddr/marvell/a38x cause issue in future code synchronization with upstream repository.