Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5409325rwp; Mon, 17 Jul 2023 03:48:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsc/gItampoRXOeK3Ut4y+tmxbEeGR151ryD4Iu0A4IioEflzGnTEfJAnbxYXS0W3Y8Ex0 X-Received: by 2002:a05:6808:1411:b0:3a4:1e42:4004 with SMTP id w17-20020a056808141100b003a41e424004mr11793149oiv.57.1689590898126; Mon, 17 Jul 2023 03:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689590898; cv=none; d=google.com; s=arc-20160816; b=SgaClWWlWLUW8QiAw7h30HPzBoa9xQiPJWoTsra6VefrXXN7dp6Zw7fyUd8fY8aqs7 3rD+JkLztJrNhH7vUVphFYTOSskIACISmLvLm6dRKs93Rit/pVUuEI3Am4fAsQ3PlRK5 Y44agHUyIYvLF3813Y98z+KYb6yg6UDFwyXDz0ciqyoxpkrqO92cZd2JEqEdYfN5j8zG DMNFojMDk9xz54FsxOaNGWKp6mFn2aFvFKjnqhSYzd9M+vk7PT2dmxCsKyC8Dau/WV7w y/PXxMX3ZobYD6jW8+rrCQFN3F4lQqVuMaQxhBTL6/4OkPKoA32R/4ZFSTWGRaA6g9f0 cGjA== 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; bh=dkZqDw+1/Brauf2lZXhoxi+see4xLt/P00aPxZ1mK3o=; fh=mGuWl353bqbht/YyGXuilDJcihBryC0kJ86lnoD1bYs=; b=EhJWij6fjEiFvEeDPhU98vfJUZq3s1HuNU6szNuwoFDCE9GBCCSOD4ISa5Le3yZe6y gb1hYrBiH0prdBTPCxbjyKE7XcoIND4xdkQGfpXDJo6XKpjV8eTf1gnOZx7bvtuzOfLF RzFveNI0+ZLrpj6UCqSh57mH9rSDHz6NqW1WNNz7rDUpHN9Nb3lSA7LTWmucgKbjcKvF zKXeU8Tlfk+YPUAkdQMlXbo3s1shg+tdTMENqeYn4iera0cnpe9wxMkG1V3M175zv1kH jtVRKJQMTewKUXv470VtCe38Y0exoCb/N0TZiUtCdM4avbxezJv4OZujH7BAGwnpXI4Q O2pg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a17090ab30300b00262ffca5a31si5533689pjr.161.2023.07.17.03.48.05; Mon, 17 Jul 2023 03:48:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbjGQK2T (ORCPT + 99 others); Mon, 17 Jul 2023 06:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjGQK2R (ORCPT ); Mon, 17 Jul 2023 06:28:17 -0400 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 901AB1A8; Mon, 17 Jul 2023 03:28:16 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3fbf1b82de7so26187025e9.1; Mon, 17 Jul 2023 03:28:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689589695; x=1692181695; 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=dkZqDw+1/Brauf2lZXhoxi+see4xLt/P00aPxZ1mK3o=; b=VCMMHu6Wfo831KNSBeblau/aq6gmo6Gc7MLaXewDGkMur0bbA0vl3t4HCqCb+JowNV cmuycIYARujd2J3lMpIbZro+U+7EI1BYSE6nWTKtMcLlNR59qYTQIqP0xkW8VybqdbQ/ N+mNi3lu3X7ude3CHuW+j61D/YLJB2zqTGsLgXeckYp6xZoaEQ6zXt0+BVn5hw1XfFvL 3ji16hpPl06pKRghkI8Wc82pGAicWRGJHLmDEYghGt5L0UFegt1JqOowk0/s0ROKnfNY Z9l6t6jfiR7IyBkRIfQryXpx8s+UOe/GoTkBKnYFVCzR6u1cygVmlksrTn+4oUyYCi2z RADQ== X-Gm-Message-State: ABy/qLafE3LoCD5sY9O63ecUoe8NtMj4a/yRpvAbwCkYvO4LfA68LMIY GhVxszta5Dsu+Cn4YG398OY= X-Received: by 2002:a05:600c:4689:b0:3fa:955a:9291 with SMTP id p9-20020a05600c468900b003fa955a9291mr7656892wmo.9.1689589694806; Mon, 17 Jul 2023 03:28:14 -0700 (PDT) Received: from localhost (fwdproxy-cln-018.fbsv.net. [2a03:2880:31ff:12::face:b00c]) by smtp.gmail.com with ESMTPSA id m9-20020adfe949000000b0031128382ed0sm18845454wrn.83.2023.07.17.03.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 03:28:14 -0700 (PDT) From: Breno Leitao To: Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams Cc: leit@meta.com, kernel test robot , linux-cxl@vger.kernel.org (open list:COMPUTE EXPRESS LINK (CXL)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] cxl/acpi: Use printk specifier for resource Date: Mon, 17 Jul 2023 03:26:20 -0700 Message-Id: <20230717102625.4083462-1-leitao@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Commit 3840e10e8dca ("cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()") is using %llx to print resources pointers, but it is incorrect on 32-bits system, causing the following compilation warning on i386: drivers/cxl/acpi.c:300:4: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat] Instead of using pointers to the resource, uses the proper printk specifier that knows how to handle the struct "resources". This is the new format, being printed now: Failed to add decode range: [mem 0x4080000000-0x2baffffffff flags 0x200] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307151059.2vvBt55H-lkp@intel.com/ Fixes: 3840e10e8dca ("cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()") Suggested-by: Dan Williams Signed-off-by: Breno Leitao --- drivers/cxl/acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c index 815b43859c16..d1c559879dcc 100644 --- a/drivers/cxl/acpi.c +++ b/drivers/cxl/acpi.c @@ -296,8 +296,7 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg, else rc = cxl_decoder_autoremove(dev, cxld); if (rc) { - dev_err(dev, "Failed to add decode range [%#llx - %#llx]\n", - res->start, res->end); + dev_err(dev, "Failed to add decode range: %pr", res); return rc; } dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n", -- 2.34.1