From mboxrd@z Thu Jan 1 00:00:00 1970 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 D77FAEB64D9 for ; Mon, 19 Jun 2023 20:36:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B74586093; Mon, 19 Jun 2023 22:36:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="AwAT9eIj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A58386043; Mon, 19 Jun 2023 22:35:59 +0200 (CEST) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 68D5086043 for ; Mon, 19 Jun 2023 22:35:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=saproj@gmail.com Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b4725e9917so26953641fa.2 for ; Mon, 19 Jun 2023 13:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687206955; x=1689798955; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7M3MTB09XHde2CYo34Qzo9xmW+zytyLaYhhes+dZoDM=; b=AwAT9eIj9n9jUIGwwfQJpGIMjJDOR8HpZ5gNxTJq+jdJQvCj9fayDHyhOy1HV3yESr zrgMG3xcvkuxg2eLTBEHVd92IJqtUverBgMoDhmJ1WTscx0c+9NlW4vDvfK9qCc2DGsW RY9nG5sLYo7tEGM/wdf5ZCz+GW4DzgJ1kjhHTZrDCZdUmFaTsmQGbGqu8U254pqvy+RM JhwY1ako70IxMFMshhqZociHzM3Uphm+K4RjJEYctbuqZqujuOXa3YnrNklrbByVXcW+ lzrjwpi49n/fi8E6w76LVWpGI+XHziRYTBZh0S8nDAMq6wR5zccKYmmIRmmOHcg/31vS 1o/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687206955; x=1689798955; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7M3MTB09XHde2CYo34Qzo9xmW+zytyLaYhhes+dZoDM=; b=lcSHV0bGCGifjujbnRaqA33sdVZQIlZaFE94r6pWLp3pL0U9By45gN/gC8dZ3q794z A99m/XYZiCKglZcgfeOsgZ/ny8AlYbfFbGzvALSoG4Y5eVR4ch+7OI+Cecu4AThpXwaw AIIMWCpg6KASOj1i6PbO40+WQA5M5bEjchTku8M0Adqvri5wIjiSM7lYmfMlipQb57Ot k4mFpv9T5l7xp2+FUptj302oKfHyHRqezEBcSWaqSaXXn//INaHuEe+fh1U0opQmDnSp ycenctccbFD8CVhAaDx4/RIGDIClipZU1lRWhohP+AVZOJNRCa6MNHmdTyq0KEhaSxAR MO4w== X-Gm-Message-State: AC+VfDzaCmJjNrd6W2/vlYNeTQeaAK3Fp6r6yWrYgGIaz0XXttLVxbfT WKDfPmDrql9lcvfJbKQKB+iDC2QKrlk= X-Google-Smtp-Source: ACHHUZ4nD3uLk8qskhTijTadZEVMWdOfjQaFhLGK2QFs1kU6+TFzKXq37SKuEsnL1Ep3cGFcH7wOuA== X-Received: by 2002:a2e:9e07:0:b0:2b4:5fdd:f583 with SMTP id e7-20020a2e9e07000000b002b45fddf583mr4472145ljk.51.1687206955302; Mon, 19 Jun 2023 13:35:55 -0700 (PDT) Received: from saproj-Latitude-5501.yandex.net ([2a02:6b8:0:51e:bd04:cc11:27a:26d1]) by smtp.gmail.com with ESMTPSA id v21-20020a2e9915000000b002adb0164258sm41605lji.112.2023.06.19.13.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 13:35:55 -0700 (PDT) From: Sergei Antonov To: u-boot@lists.denx.de Cc: Sergei Antonov , Mario Six Subject: [PATCH] axi: fix a warning Date: Mon, 19 Jun 2023 23:35:41 +0300 Message-Id: <20230619203541.1921288-1-saproj@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Fix an enum/integer mismatch encountered in 'sandbox_defconfig' build. .../u-boot/drivers/axi/axi-emul-uclass.c:16:5: warning: conflicting types for ‘axi_sandbox_get_emul’ due to enum/integer mismatch; have ‘int(struct udevice *, ulong, enum axi_size_t, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, enum axi_size_t, struct udevice **)’} [-Wenum-int-mismatch] 16 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, | ^~~~~~~~~~~~~~~~~~~~ In file included from .../u-boot/drivers/axi/axi-emul-uclass.c:14: .../u-boot/arch/sandbox/include/asm/axi.h:48:5: note: previous declaration of ‘axi_sandbox_get_emul’ with type ‘int(struct udevice *, ulong, uint, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, unsigned int, struct udevice **)’} 48 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, uint length, | ^~~~~~~~~~~~~~~~~~~~ Make function declaration match function definition. Cc: Mario Six Signed-off-by: Sergei Antonov --- arch/sandbox/include/asm/axi.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/sandbox/include/asm/axi.h b/arch/sandbox/include/asm/axi.h index d483f7b65a02..a93975c6534b 100644 --- a/arch/sandbox/include/asm/axi.h +++ b/arch/sandbox/include/asm/axi.h @@ -7,6 +7,8 @@ #ifndef __asm_axi_h #define __asm_axi_h +#include + #define axi_emul_get_ops(dev) ((struct axi_emul_ops *)(dev)->driver->ops) /** @@ -14,10 +16,10 @@ * @bus: The AXI bus from which to retrieve a emulation device * @address: The address of a transfer that should be handled by a emulation * device - * @length: The data width of a transfer that should be handled by a emulation + * @size: The data width of a transfer that should be handled by a emulation * device * @emulp: Pointer to a buffer receiving the emulation device that handles - * the transfer specified by the address and length parameters + * the transfer specified by the address and size parameters * * To test the AXI uclass, we implement a simple AXI emulation device, which is * a virtual device on a AXI bus that exposes a simple storage interface: When @@ -45,7 +47,7 @@ * Return: 0 of OK, -ENODEV if no device capable of handling the specified * transfer exists or the device could not be retrieved */ -int axi_sandbox_get_emul(struct udevice *bus, ulong address, uint length, +int axi_sandbox_get_emul(struct udevice *bus, ulong address, enum axi_size_t size, struct udevice **emulp); /** * axi_get_store() - Get address of internal storage of a emulated AXI device -- 2.37.2