From patchwork Thu Apr 22 13:38:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 425869 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp378442jao; Thu, 22 Apr 2021 06:50:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUBWQkJ++RcvDYwq+qE+YJQ45mCACX7r51havEIkFpykRW9dE83GiBhk0Z34hMpboo8Kht X-Received: by 2002:a05:6402:cb6:: with SMTP id cn22mr3976560edb.302.1619099411974; Thu, 22 Apr 2021 06:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619099411; cv=none; d=google.com; s=arc-20160816; b=vrUb+zzqPSaM+hlE0W7QglZJOJabf8OWvgDt3n8BWPkmNL6GatA8+Ux0xvoGalsLf+ LIIGVe31bmWDcdrqem0Rvwz5u/6GijBvrD9UzanGo2ECJ0NvunPSzgOfp5T1L0jH9Z+Y 5CbvGGIMNF0s22utAvq0KCl3ssQJ+wMNibt0u5y9LhGKKWltoDlHwoF7kHWU7iRtwx2l 3Pgy2JePg4Pd+sQFd9lYvkyBFzMoNUdxX6MGrRqpKxEdCF3GmnwhEElpqtZqJm8WRAu7 8hT0hloU/rCTMElrLLg3ivUwkeGo9eotQZY4c8q2aT+ynmUjNlfd+7vjipb3kYN0UVNT G06g== 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:dkim-signature; bh=5Dmnlv0m6LYn5SqdIdfunzDN8w9b01BzF7bFq1ZekpM=; b=iFWonE1qvbjinfopT1oKHwrQ6LPaFyBK1ZDa9zzxNJArH1dTkmVu2teGjf8OYuHQOB WQjnUpffh0R8AOxl/n+Rw73bgl0ax01XFGfk3pr58ac7XUpWqNg2Cqo9H4GUEbqrlqcV d5ne0qjaNx37l/4V8i8Os4a8hhQF0ercZ4MfYGqVkpwZU6eOdH6w5pVItR1iClDve3jM lQ5WBBhVZ7Crl7ybhFLjNFqjHGK7s+s1C6DW0Ce22CqM1vGv65V3RR3N5T0B7oPm6Djz t6WV/2Yvfo4XAS57jlhdtX8C+hjY+RWTnIuCLA5iHtJe1Hl/9cgKy3K8u/AaxyoQ4BJr 3iWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s/qaYH7g"; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si2743784ede.461.2021.04.22.06.50.11; Thu, 22 Apr 2021 06:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s/qaYH7g"; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236344AbhDVNup (ORCPT + 1 other); Thu, 22 Apr 2021 09:50:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:40588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbhDVNum (ORCPT ); Thu, 22 Apr 2021 09:50:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 108BD61405; Thu, 22 Apr 2021 13:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619099407; bh=2oJtReQyaeTSDvRLl66IrFTBKN7fQSwFZowLXmrUk3A=; h=From:To:Cc:Subject:Date:From; b=s/qaYH7gxGP5emtXWIcBUyRq5DVNZh7XFCprfMm9WtRj/ECsrUCPYxl6x7rM7hqaB Bw1QtfNgid+lL2DECA6OFP0ThIwEg4Cdc9MYbZPFkHLgpk7yoGaitqpKOi6dCsXbqU GhhZWJcdRi90RAZIFlooIllt2Rx76fu+Dqaa26UO1L9q5SpraU1lN4KpNjjMEzaIwj D0tJX6+b1tCJA+5BdSkh+F+fBcxUgo9OBgujZKzjvMZZqTjgbWtdKf7Lg+/1DhlFMI XCxSBhSELKCXlwuQe+VkAg9oNaMZJUM+0GoXVsbs42ydIJ8uuWke4EnfW/ZgctK/Oj V7/AcMhVT1W/w== From: Arnd Bergmann To: Mark Brown , Maxime Coquelin , Alexandre Torgue , Patrice Chotard Cc: Arnd Bergmann , Christophe Kerello , Zhang Qilong , linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [v2] spi: stm32-qspi: fix debug format string Date: Thu, 22 Apr 2021 15:38:57 +0200 Message-Id: <20210422134955.1988316-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org From: Arnd Bergmann Printing size_t needs a special %zx format modifier to avoid a warning like: drivers/spi/spi-stm32-qspi.c:481:41: note: format string is defined here 481 | dev_dbg(qspi->dev, "%s len = 0x%x offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf); Patrice already tried to fix this, but picked %lx instead of %zx, which fixed some architectures but broke others in the same way. Using %zx works everywhere. Fixes: 18674dee3cd6 ("spi: stm32-qspi: Add dirmap support") Fixes: 1b8a7d4282c0 ("spi: stm32-qspi: Fix compilation warning in ARM64") Signed-off-by: Arnd Bergmann --- drivers/spi/spi-stm32-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 02691c1603d9..7e640ccc7e77 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -478,7 +478,7 @@ static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc, * all needed transfer information into struct spi_mem_op */ memcpy(&op, &desc->info.op_tmpl, sizeof(struct spi_mem_op)); - dev_dbg(qspi->dev, "%s len = 0x%lx offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf); + dev_dbg(qspi->dev, "%s len = 0x%zx offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf); op.data.nbytes = len; op.addr.val = desc->info.offset + offs;