From patchwork Mon Sep 30 15:44:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 13816635 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 068C3CE835C for ; Mon, 30 Sep 2024 15:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=j4gv4IXwebFWLW/Z7GbBuucAHw2aIUj3LPbB1fq2+L0=; b=RMdX0Ugt5hx7ytJPjFF35QnsZG q07xc9FHJpOqXPM0yoQqkjo5jR/eE550snvx5iC3D5YTnAeodeF+UHG0EYqft3dPDfMbuKbKddG1m S4eL5a1RBp0vN9p9lBD4nSv1m7EBUDAT88UFrm2NuLgBeZgxv+O5run+9gtPQ5fEhQyVAZj9PYZjO IBTwEdGceX0+mWyIOZc6V/HeYEvjevnf/DjUlz+JXFdkIUjzOIuEMzH1zoF/Kx14akYgoxkPnD3Zm KSzj6gxgJE1UTzlAm6SxL2UoO2WNsX/sy2KfoOYpSoFm7+FddRVXE46BYWYOWbSIiuGtadoydsDl3 wPIg4pZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svIce-000000008u2-23jV; Mon, 30 Sep 2024 15:47:40 +0000 Received: from mgamail.intel.com ([198.175.65.18]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svIaE-000000007oh-3CKY for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 15:45:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727711111; x=1759247111; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IkZcH+dr/dc2FTVfUpgfG4mg44WAOh1K6ZY3C+oqHkk=; b=AxOFnIB7GLorGoePaehl0ANwRN30/wAebF297Hjt0Y1iGANhKOiXOvon 24FVm0q0FGwv773puVkuqdkl89+ARa0DYXRqKm9iU/vSACDMYNOPNyblB 9yix9eUaUmWc5thvOonN2VObIKU9qHbDidiqrt4DKzJ5pxrRP3azZ1cLq nnLoZuVn7T2jQ6S3jiK+W6JWJFNtRFAWyZkEB1S+FQRo9nfVyhy6WLXke EP4BA0mbcPEV4OKMrh6vw7yLYUVTTIDqr0Fr1aDLffiuLRcVuk6MErTNO OeyVlTZfsYBCoI8PJ7/FXFQDbZb+1uIWOW3AlJIy/rfgtQEHbNGZEESUP w==; X-CSE-ConnectionGUID: Tti//GPMQfypQc3+kGOmpA== X-CSE-MsgGUID: nAEahllhSEmXcYbcDNcVrw== X-IronPort-AV: E=McAfee;i="6700,10204,11211"; a="26934951" X-IronPort-AV: E=Sophos;i="6.11,166,1725346800"; d="scan'208";a="26934951" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2024 08:45:04 -0700 X-CSE-ConnectionGUID: DTbva3IfT/SV4r9NTMr44w== X-CSE-MsgGUID: hYPnjd9KQ6ieRBjSuZrFFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,166,1725346800"; d="scan'208";a="78306550" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa004.jf.intel.com with ESMTP; 30 Sep 2024 08:45:01 -0700 From: Alexander Lobakin To: Mark Rutland , Lorenzo Pieralisi Cc: Alexander Lobakin , Kevin Brodsky , "Paul E. McKenney" , Arnd Bergmann , kernel test robot , nex.sw.ncis.osdt.itp.upstreaming@intel.com, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware/psci: fix missing '%u' format literal in kthread_create_on_cpu() Date: Mon, 30 Sep 2024 17:44:33 +0200 Message-ID: <20240930154433.521715-1-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_084510_875516_1ABE61F1 X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org kthread_create_on_cpu() always requires format string to contain one '%u' at the end, as it automatically adds the CPU ID when passing it to kthread_create_on_node(). The former isn't marked as __printf() as it's not printf-like itself, which effectively hides this from the compiler. If you convert this function to printf-like, you'll see the following: In file included from drivers/firmware/psci/psci_checker.c:15: drivers/firmware/psci/psci_checker.c: In function 'suspend_tests': drivers/firmware/psci/psci_checker.c:401:48: warning: too many arguments for format [-Wformat-extra-args] 401 | "psci_suspend_test"); | ^~~~~~~~~~~~~~~~~~~ drivers/firmware/psci/psci_checker.c:400:32: warning: data argument not used by format string [-Wformat-extra-args] 400 | (void *)(long)cpu, cpu, | ^ 401 | "psci_suspend_test"); | ~~~~~~~~~~~~~~~~~~~ Add the missing format literal to fix this. Now the corresponding kthread will be named as "psci_suspend_test-", as it's meant by kthread_create_on_cpu(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408141012.KhvKaxoh-lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202408141243.eQiEOQQe-lkp@intel.com Fixes: ea8b1c4a6019 ("drivers: psci: PSCI checker module") Cc: stable@vger.kernel.org # 4.10+ Signed-off-by: Alexander Lobakin Acked-by: Lorenzo Pieralisi Acked-by: Mark Rutland --- drivers/firmware/psci/psci_checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c index 116eb465cdb4..ecc511c745ce 100644 --- a/drivers/firmware/psci/psci_checker.c +++ b/drivers/firmware/psci/psci_checker.c @@ -398,7 +398,7 @@ static int suspend_tests(void) thread = kthread_create_on_cpu(suspend_test_thread, (void *)(long)cpu, cpu, - "psci_suspend_test"); + "psci_suspend_test-%u"); if (IS_ERR(thread)) pr_err("Failed to create kthread on CPU %d\n", cpu); else