Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1668922rdg; Sat, 12 Aug 2023 10:47:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeQ2bSsUx0Ln9qQJry1NvU7/bIJYvk3fl99I0M0aFct6oSssuB5ySKSd2F7TKDvOTkUt7B X-Received: by 2002:a17:907:a0c6:b0:99b:f58d:1c49 with SMTP id hw6-20020a170907a0c600b0099bf58d1c49mr4244850ejc.53.1691862441610; Sat, 12 Aug 2023 10:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691862441; cv=none; d=google.com; s=arc-20160816; b=EYC53LiKI2EqTPGHBin99sgh2Eels63QfCBpzDCMKVydM55dh9Q36SvpxGJyt9GejG 7MP+DrgTB9uSPflIP+F6LjT/QYCSYL3axqqVnh0FqCGLcwHcStMCoh9dWJLsiIhXyEia 1eegtRoMlUhYWqceAdZ1p1Xtbcaz958hBGHuhlOAfTrSkww2S89MYcW0RX+gT6I+Ka1f HVquB4kHI27C9zu6Q3blxZ7fPyhlMk1o4PZNkcWD02sB7z9FtDovWCHvr0H/zto7EIVi l1xhtxkxeZoOhyieK8a2fz8I47Eyk36JskbB+SZVGN2Hekqohwbmyy3u2QNqcypIc4AA BrSQ== 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=l5qOHAwauUB1vOa7wO78RYy8OE3utXmBcq9XMUwF/hQ=; fh=7TaDuY/Qum8pRWC42/VHvBVIJJpudbc7oEMFjphOiVA=; b=C1lJKyYldDuehLp9l/m2Ly5AJfOErDjJq6Z7QuZUBw3i+y7kixnheBaPoW+9lVmyAn IFkve4XgDwzvF0JMmiBwx0hYuS2EMpt1gBuataiDiZskPax25AAqJP2DgCHyCNlZr8pD I9KVRuIsqHoRpt2rk+04CXbQx8UmaouX+LF+1/BgcHhow6+e61agnCMXFMAdHGeC2Orh XyANgsGrSO2HpcmdD/k8RBNcDMI2VeR4KR8auTEF/AFwDlvCNeleUHetNq+aZQhl4HpP Kc8tvYtPjhfCD06neIPM/0t0fhCj64BU8t63/ZQUF6gwgLxaxuZx6XvZr1cN+E4QxRU2 7b2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MgiDjO3I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mf21-20020a170906cb9500b009889713506asi5021608ejb.304.2023.08.12.10.46.49; Sat, 12 Aug 2023 10:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MgiDjO3I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229576AbjHLR1f (ORCPT + 99 others); Sat, 12 Aug 2023 13:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjHLR1f (ORCPT ); Sat, 12 Aug 2023 13:27:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76DCD10E2 for ; Sat, 12 Aug 2023 10:27:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F4796198A for ; Sat, 12 Aug 2023 17:27:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57188C433C8; Sat, 12 Aug 2023 17:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691861257; bh=7X4x8jw4F6WxyxJBSlKm6iXGiRPzAF1Ccv9+SBjjtKw=; h=From:To:Cc:Subject:Date:From; b=MgiDjO3IHAt2oVNOFPBxFXAC35dWjt3ldfVNvy39DSk0ndwTvvOB3hPGDEl+kNdRy Qx7/cAD2rGpPUwSLBArNnSattGoE0JCB/z2gJoiiJKnX2AZymwWSrxeiBvJ8ZVeQ1a 5ImyQptlmCyF+Ff8cLZkQ8XzspmQpMm768TVOzaRAmE/eppMmCePTyfbltkVPjs2YV x1uZkaxe9ygiuNlft38shi9fMI4PS2BLOh19gvtCgX+gmoBUy33oNBahe2uQ8zP9hu 38dMjEUTOlVdfP66lz05gXv1DIdyDs0gr1p7nJsRkc7nWdVmvE9FaKxwdwHyjgrUMp 2aQacFPa35hVA== From: Arnd Bergmann To: Huisong Li , Wei Xu Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] soc: kunpeng_hccs: fix size_t format string Date: Sat, 12 Aug 2023 19:21:06 +0200 Message-Id: <20230812172116.3477379-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Printing a size_t using the %lu format string causes a warning on architectures that define the type as 'unsigned int': In file included from include/linux/device.h:15, from include/linux/acpi.h:14, from drivers/soc/hisilicon/kunpeng_hccs.c:25: drivers/soc/hisilicon/kunpeng_hccs.c: In function 'hccs_get_bd_info': drivers/soc/hisilicon/kunpeng_hccs.c:441:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] Use the correct %zu format instead. Fixes: 886bdf9c883bc ("soc: hisilicon: Support HCCS driver on Kunpeng SoC") Signed-off-by: Arnd Bergmann --- I've already applied this one on top of the soc/drivers branch after I merged the branch with the new driver and noticed the regression. drivers/soc/hisilicon/kunpeng_hccs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c index 6864d203c6782..0d6f6bacd3f62 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -438,7 +438,7 @@ static int hccs_get_bd_info(struct hccs_dev *hdev, u8 opcode, head = &rsp->rsp_head; if (head->data_len > buf_len) { dev_err(hdev->dev, - "buffer overflow (buf_len = %lu, data_len = %u)!\n", + "buffer overflow (buf_len = %zu, data_len = %u)!\n", buf_len, head->data_len); return -ENOMEM; } -- 2.39.2