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 E3F61CE7CE7 for ; Tue, 1 Oct 2024 08:59:41 +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=yf4InnQv7DFbXwYCHRXGZrkYzT3z7GUF0FNdOv5Urf4=; b=WC1ca72w2IaMhagfVwmoKK9nwf mW2Or+4pUCIkSifEX5Qw5BTjziXkujA9+TOqwkGbFqvUF0dQcW9icmhLeXrfAAjuh1g3tOU7aREpE 11mjAdk5UkfLIUFQgGE4fL1fxLdt3+hzyvaJ65cRWAqq1+I5LGAaYg5U8V+e0e8kFpz2JMk8dSDcu nMdcesLJ+T5rYpweL2NYLGRYMOu/xSVfVR1lJb+keqJED27cakNiZbWPQekPQuQhisH8VJ1ZrUH8I HUqPFl1rK+I9K+h2BsPaO1IOMpodBGVnCkPh5GjLL7hyIpXVCNK128QQ7q6nAjiDHXpfKZ51B7Xvf Zg48Zihw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svYjA-000000029m3-29k4; Tue, 01 Oct 2024 08:59:28 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svYhw-000000029Yd-2bRv for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 08:58:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 0C189A4337A; Tue, 1 Oct 2024 08:58:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80E4CC4CEC6; Tue, 1 Oct 2024 08:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727773091; bh=KHGu4Z0SeqGjTf1xDZyug+1WEM3RQXujUZCjcJPl+2g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LJS/mktiqnmsGvmlTLsRlyCWHeweWuCbHDaxKaUCs8J6TFj6J1uiTu9TUcEK3qb/Z AgBkoql0XVmFnhfoERg23gZy2wmSl33c70Y0JJkrq8f47uesTNLsYfOB61dbmAveyy MaXTFrXaQT/jMDAt5rcwhaTb1Yk9tu9RcZbqEbhYedHJH2hF0Sd9czLprke+XOTEDC kwLUfgZqeQcny+L7OrDXeZZchszf5fJElZPg1gsmQbNSAjfEwZkSqvq8iHfnYM/Nfh f9SKwsJ14THolTjB7QZiWIH4Jtx7hrMwuSfH9VSjo5tQnBitE07TWwi4EbLtOZHDE0 y0aH5P2AhJ21Q== Date: Tue, 1 Oct 2024 10:58:05 +0200 From: Lorenzo Pieralisi To: Alexander Lobakin Cc: Mark Rutland , 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: Re: [PATCH] firmware/psci: fix missing '%u' format literal in kthread_create_on_cpu() Message-ID: References: <20240930154433.521715-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240930154433.521715-1-aleksander.lobakin@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_015812_805555_98D732AF X-CRM114-Status: GOOD ( 22.49 ) 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 Mon, Sep 30, 2024 at 05:44:33PM +0200, Alexander Lobakin wrote: > 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 > --- > drivers/firmware/psci/psci_checker.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Lorenzo Pieralisi > 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 > -- > 2.46.2 >