Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2619650lqp; Mon, 25 Mar 2024 04:47:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUnAXsj+CyE5/ar/C7Ip+aaDAyymkRMPKzA4FEA5mHATnNm9q2N7NArROOmOiTaU8QJDtOD2EKeLQ4mQ/81IppTwDw8ezb3k0BNg4dWw== X-Google-Smtp-Source: AGHT+IGv2GVHupFPmP8gkAhBhQxPwShK+TdO1Bqa1zlJmNAzp2kDRtXSe0+V/vw/3MUchDqFzEQ9 X-Received: by 2002:a0d:d982:0:b0:611:48d:5274 with SMTP id b124-20020a0dd982000000b00611048d5274mr6058766ywe.15.1711367262008; Mon, 25 Mar 2024 04:47:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711367261; cv=pass; d=google.com; s=arc-20160816; b=yB0HyCGO5Iuo//UkeMB+6lVdQJ2t6l+v8eWrXjDWJ+hCdmrITTxbCBckEcdWVaHJCY VmlZgpScYv27EEu1iibuBksXl8NDAnpiy9CtzkOJT/Zcobr3jkv5oci6l1Eu8zpANZ28 Hz+ls3SI4eJhNJjjc6vN2WIJOejvVo7MRhf9P+4kkj5zGZINKRSbStzAWIkXXZXhymAL D9RkcFUJoekgbXKdJ71zWd5Cb7f9N6jJ91t3oYZf0dAAWzVLtrv7nhtP5BTqEsvGeEoI 5PJR0wsSXVNQB1+yUwsv+OXQt4gonxPK4fz5i/JQisIoej/TAKGarhpk1iX18nIqMM73 l+tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LPa4ycfl31RD2dInIyQnHRCW2Y/0+PlNBZmCYtFD2gI=; fh=IeHD9w/X1YvSxRyIQV7WcUDlC1PdkVT4llfFB8SmHZI=; b=akc4vNglohfEfr2w3+NOUsnwoxPPQXEORz08xfs2zcDK9b7hFD0U42LcXMjgmnOBT5 bs86XFmnLNZ7ZyINfM8Zogq0vf0xtg0HbHbZMAMnjLaBwClPh5didHV7qCLiRJhL0n3w QSV8eqP4Q5Q5yZAVp/e34zMSOHPI8AP1EvAX61g1EujxgN0q2NvJDk5oHe6VvKQvmZyW nfQfzscPVZmj30O8ntnS8JfrGSSrVhFhYfRd8NJyrJ2DECdBwALlCST97UOaURpYAO0G QjqNeMfNFusd5/KBPAt+Doki42LMBOAp0shn2eUKrt9JmEJgNPNh32BLLUCUO6HSt3gm afhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=acJe5k3v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j2-20020a05620a0a4200b0078a0769d512si5228971qka.374.2024.03.25.04.47.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=acJe5k3v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116210-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116210-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C2CA1C20E45 for ; Mon, 25 Mar 2024 11:47:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15B3E3BDFBF; Mon, 25 Mar 2024 03:33:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="acJe5k3v" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DC6E02853F6; Sun, 24 Mar 2024 23:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323830; cv=none; b=tYIEaEJVw8iN2dLOlTq96PlwQGCu8+lgMABUOCkBzmwdzAICZKZYuLEPUyWb+sC7/w/mNjWJhVQwIGssOfepNxcPx+N6S2qXe7Gf1QvvPnAUmmJv07Nk6Fh9SBwBt1C1lIkHq5y9tTvnE9sOD3a2lwxeZ1KL9ZvoWlCAuKxnP3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323830; c=relaxed/simple; bh=gso14qdhcLYmuzqsGSlhn50akIu/WBnOxsTxJ7leCmg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RipyKd0kFIHw/4PQPDlaxrF7JUMndFxuNKNyhmKkdN2H+Ky5ycI5ZBFu/N/dXlzUW4ts0KO8Gu0b66Wehl4YKKtKUwvFfaosO2JKJ0h3CCKb4/pPlthyDuG/qlDul39+fBJQZODwl+3Kamvp1u8eQZCjOiPUQMgYTgO0dxR29zY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=acJe5k3v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12454C433C7; Sun, 24 Mar 2024 23:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323828; bh=gso14qdhcLYmuzqsGSlhn50akIu/WBnOxsTxJ7leCmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=acJe5k3vIVk8c2/o9YIk3j/XPrusln6ohXTU4oHd29bx43C4lrLng05RU0OOc8bjA xl9CowsvXQu6hdk+JjrG9MrTpiLm2C4qQv0s+EJr079Bz+7/azHaSO7Llrb5XJUah9 lzFRK+bqhDpbW83fVqop2Im7L9b/f3OxOa7zITWzMMUSUrONebwMsWPPUyGfzvk2HA c153AtUWbS5D4UEYiFrTUA5tYZgsul5ImBNr2k1B3W6QmrUI7Yzt02HsTcR2og+xK0 5qGJJz3OgLidKwOwvZQ/kiHRrBNNdEIHjRco6oaClOAOpGk91CkdaMVQa7vmCD/GkI DrKm69u7q9H7Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Arnaud Pouliquen , Randy Dunlap , Sasha Levin Subject: [PATCH 5.10 207/238] remoteproc: stm32: use correct format strings on 64-bit Date: Sun, 24 Mar 2024 19:39:55 -0400 Message-ID: <20240324234027.1354210-208-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Arnd Bergmann [ Upstream commit 03bd158e1535e68bcd2b1e095b0ebcad7c84bd20 ] With CONFIG_ARCH_STM32 making it into arch/arm64, a couple of format strings no longer work, since they rely on size_t being compatible with %x, or they print an 'int' using %z: drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_mem_alloc': drivers/remoteproc/stm32_rproc.c:122:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=] drivers/remoteproc/stm32_rproc.c:122:40: note: format string is defined here 122 | dev_dbg(dev, "map memory: %pa+%x\n", &mem->dma, mem->len); | ~^ | | | unsigned int | %lx drivers/remoteproc/stm32_rproc.c:125:30: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=] drivers/remoteproc/stm32_rproc.c:125:65: note: format string is defined here 125 | dev_err(dev, "Unable to map memory region: %pa+%x\n", | ~^ | | | unsigned int | %lx drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_get_loaded_rsc_table': drivers/remoteproc/stm32_rproc.c:646:30: error: format '%zx' expects argument of type 'size_t', but argument 4 has type 'int' [-Werror=format=] drivers/remoteproc/stm32_rproc.c:646:66: note: format string is defined here 646 | dev_err(dev, "Unable to map memory region: %pa+%zx\n", | ~~^ | | | long unsigned int | %x Fix up all three instances to work across architectures, and enable compile testing for this driver to ensure it builds everywhere. Reviewed-by: Arnaud Pouliquen Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Arnd Bergmann Stable-dep-of: 32381bbccba4 ("remoteproc: stm32: Fix incorrect type in assignment for va") Signed-off-by: Sasha Levin --- drivers/remoteproc/Kconfig | 2 +- drivers/remoteproc/stm32_rproc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index d99548fb5ddef..6dbf6ed10ea49 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -249,7 +249,7 @@ config ST_SLIM_REMOTEPROC config STM32_RPROC tristate "STM32 remoteproc support" - depends on ARCH_STM32 + depends on ARCH_STM32 || COMPILE_TEST depends on REMOTEPROC select MAILBOX help diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index b410684c3aa90..8f7fb1baed10d 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -117,10 +117,10 @@ static int stm32_rproc_mem_alloc(struct rproc *rproc, struct device *dev = rproc->dev.parent; void *va; - dev_dbg(dev, "map memory: %pa+%x\n", &mem->dma, mem->len); + dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len); va = ioremap_wc(mem->dma, mem->len); if (IS_ERR_OR_NULL(va)) { - dev_err(dev, "Unable to map memory region: %pa+%x\n", + dev_err(dev, "Unable to map memory region: %pad+0x%zx\n", &mem->dma, mem->len); return -ENOMEM; } @@ -608,7 +608,7 @@ stm32_rproc_get_loaded_rsc_table(struct rproc *rproc, size_t *table_sz) ddata->rsc_va = devm_ioremap_wc(dev, rsc_pa, RSC_TBL_SIZE); if (IS_ERR_OR_NULL(ddata->rsc_va)) { - dev_err(dev, "Unable to map memory region: %pa+%zx\n", + dev_err(dev, "Unable to map memory region: %pa+%x\n", &rsc_pa, RSC_TBL_SIZE); ddata->rsc_va = NULL; return ERR_PTR(-ENOMEM); -- 2.43.0