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: 13494623 X-Patchwork-Delegate: viresh.linux@gmail.com Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49FCF37166 for ; Fri, 15 Dec 2023 15:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="lwNlnLXx" 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 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: gregory.clement@bootlin.com 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);