From mboxrd@z Thu Jan 1 00:00:00 1970 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 F0A95CEE320 for ; Wed, 9 Oct 2024 15:31:40 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WZFi+grNLC6KKtCyt642wKBz3+ozhHFEdlJ9z5szs4c=; b=zS4kd/ZN9EU2ApaThMVnJRH33+ IGpVfeH4dX4m8/E7JQGa3FHdcqTM/C1VldKta9Z/paaC9gN9nrxLU05MC8fHAD/IQZ/3fSCCJJaWV QwUcoSSsT5cfAnNzjrKFl2EuDEc2yhCz8x4vtl7oZZWZWdz2TcDIHRBrKgYtRwIOgmuLBYjH5MELx GCRT2R71t1AOvXkFRRgw+7WFpPOySwS8KRFod2S49l7xzLEmeW5pK6IZj/Z9TRaQVfpEZQ41M8sKC uS0Ia/44Jw9ZcbQOTZMN9GUbjd8WvSeW+zKhD+GDutJkruk/EUBrKCH4cHNA1TKoNjwAlDLbE6IGO NNZmmUvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syYer-00000009lWE-28Gj; Wed, 09 Oct 2024 15:31:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syYdV-00000009lHa-2lGp for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 15:30:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25058FEC; Wed, 9 Oct 2024 08:30:30 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C04373F64C; Wed, 9 Oct 2024 08:29:58 -0700 (PDT) Date: Wed, 9 Oct 2024 16:29:52 +0100 From: Mark Rutland To: Alexander Lobakin , Arnd Bergmann Cc: Lorenzo Pieralisi , Kevin Brodsky , "Paul E. McKenney" , 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: Re: [PATCH] firmware/psci: fix missing '%u' format literal in kthread_create_on_cpu() Message-ID: References: <20240930154433.521715-1-aleksander.lobakin@intel.com> <40f59adc-9d1e-4466-917a-69f3c8d77b5f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40f59adc-9d1e-4466-917a-69f3c8d77b5f@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_083001_812509_2139568C X-CRM114-Status: GOOD ( 26.45 ) 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 On Wed, Oct 09, 2024 at 05:26:18PM +0200, Alexander Lobakin wrote: > From: Alexander Lobakin > Date: Mon, 30 Sep 2024 17:44:33 +0200 > > > 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 > > Ping? Who's taking this? I would expect this to go through the soc tree. Arnd, are you happy to pick this up? FWIW: Acked-by: Mark Rutland Mark. > > > --- > > 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 > > Thanks, > Olek