From patchwork Fri Dec 15 15:37:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 13494622 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 480EFC35274 for ; Fri, 15 Dec 2023 15:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=f5C1iVBHXQqwoEM7alf970ZTi+3MMf4KLt1rJQV/pP4=; b=fSMiqE07JQMSXP UT9QwZObztwSnaxJe7j+XcikUexLzy1XHdQSCCcB8cy1Aw+/Y4/0lK9NPzg+oPn2bbEvL2BGhyX+y PlFAIuxFj3SaBj4j/DrdMpuaTWcG59pZJOGg+E9o3q08rc46FwBPEQdddCCqEpGIw3tlhSrcO0WGw p5xPkRL43o4DkVIVmXWKhStZK/VV5skOKfc17mVw17ssRrnWA9V1buhut/hoX7llWIrWtZ5OOkJsu YMKAcsEtnAE+QdnY5GWrTNv2yJyuoo9wK5srEtU59nw0kX0RwUj+cAxvHwUqkL61C4bbvIr0hZdCd hewRJT81CUYuHg3O4eHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rEAGe-003khm-2R; Fri, 15 Dec 2023 15:38:24 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rEAGc-003kfo-0i for linux-arm-kernel@lists.infradead.org; Fri, 15 Dec 2023 15:38:24 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id B78EFC0008; Fri, 15 Dec 2023 15:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702654699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=agzZ4BylaA3IrnjSpRUsV7CheWAcikmN1pEeQ+7n8RA=; b=lwNlnLXxs+Ce0D50khjj+Yg0HhZwhsPMRWUC42wcSRHZaUXirzACZB/4n4jMDYnK7LR8nO iT0sFq4OjWILNhALxKr78n56+J0a7LuFBAbjm0ePxOmuLWEZ548Fw41Daf3ZIJlRIOfQJA RdsBC4ynV2INnBIasLzCzBtNZU8WNoBESO589ijOXswbSKSA720Iah6dGfcMdKXid3gy/r NvzVIHG4K4coIaWiVRS5hYqjZL7UNFrlHfMGGT4A3WRgNZ7CWvrOVEuQGCQ4LUNRhKHq9d Yj9u9/HckoBKwI3le6HHbLPl+2ocXSRlLjPV7kIPOFycqpiwTsPHGEP7YS2Wvg== From: Gregory CLEMENT To: "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Cc: Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, kernel test robot Subject: [PATCH] cpufreq: armada-8k: Fix parameter type warning Date: Fri, 15 Dec 2023 16:37:06 +0100 Message-ID: <20231215153706.2087883-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-GND-Sasl: gregory.clement@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231215_073822_541501_A93F60DE X-CRM114-Status: GOOD ( 10.52 ) 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 The second parameter of clk_get() is of type 'const char *', so use NULL instead of the integer 0 to resolve a sparse warning: drivers/cpufreq/armada-8k-cpufreq.c:60:40: warning: Using plain integer as NULL pointer drivers/cpufreq/armada-8k-cpufreq.c:168:40: warning: Using plain integer as NULL pointer Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312141651.lCAXGAZ2-lkp@intel.com/ Signed-off-by: Gregory CLEMENT Reviewed-by: Andrew Lunn --- drivers/cpufreq/armada-8k-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/armada-8k-cpufreq.c b/drivers/cpufreq/armada-8k-cpufreq.c index 8afefdea4d80..ce5a5641b6dd 100644 --- a/drivers/cpufreq/armada-8k-cpufreq.c +++ b/drivers/cpufreq/armada-8k-cpufreq.c @@ -57,7 +57,7 @@ static void __init armada_8k_get_sharing_cpus(struct clk *cur_clk, continue; } - clk = clk_get(cpu_dev, 0); + clk = clk_get(cpu_dev, NULL); if (IS_ERR(clk)) { pr_warn("Cannot get clock for CPU %d\n", cpu); } else { @@ -165,7 +165,7 @@ static int __init armada_8k_cpufreq_init(void) continue; } - clk = clk_get(cpu_dev, 0); + clk = clk_get(cpu_dev, NULL); if (IS_ERR(clk)) { pr_err("Cannot get clock for CPU %d\n", cpu);