Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp226700pxu; Thu, 7 Jan 2021 03:22:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMvJlodfX5PNbMSNvQVotOKz8lUCjOgF1thQaoXIWW31gpGahhu0Z5KWCcUk3MFBTxWmBS X-Received: by 2002:a05:6402:37b:: with SMTP id s27mr1307710edw.266.1610018562836; Thu, 07 Jan 2021 03:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610018562; cv=none; d=google.com; s=arc-20160816; b=XYnSzg8Rcc23b8SgJXj8dH8An2qUAA5vI9/02kwXCjH145QjBGsJNkoZHhMNpl0EmW 0bO8IZF0dVnRDZp/BgyL3E3q05DKoUOm7tzQqlthbXoQXlQcy2DbNoWEOrxyFvEi4E2j CoBIN4trG1gsBKfJw/eLfGjfr6ELekqf/E5tTpetpXINxc5Jn92jucbE0LjejePWOPBz d0fFWU14zfHz75g/zuq6ehuXxRztP0pURkZsXQZo6PMOo+aa6r5uZySpVlXuEEdw7+g2 wqUlYfLBJ/ZPtYfGEwt57IaxKiiS2fZRRSMRFF5zC6LzhX3ArBX5RihUh8uYqlNzDc+T gp5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5TqcD74rCtKl/3Ujmfmu8HqxqPkF1roAXaUfS56+ZNY=; b=aaupIcfOd0zlQu8LgAetcsWKLeF5/VvnnKHoeOiUVbiS9FaYhiNaTk/i1b8+bnwlTc EtvDdQO1WDm3q404rPGV+GPUrG2W7Y/6UDxu0aIF/HhS+5JZtgwedIu6RFWfYG4CWX5y E7OzpmN8S7BDXv8Nbf1e1QFeoViz2zQxUzyz4eNxPmVQQi2Jn1G0rjNuSyaQrClqtA5D vLgov0ejZj1tKV4FGOv40e3E+iQSJYIl8BHapN4t0FZ0GqdlEs3MKmqKOl3JQzJWIBTV 3YxCukrgQzL3zB9u5qZZXh8MTL48v6msKV4P4lUGbQJh0X0b5fZOrHSZ1JZEaTpHpi6Z 6bvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si2130412eja.375.2021.01.07.03.22.19; Thu, 07 Jan 2021 03:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728022AbhAGLTi (ORCPT + 99 others); Thu, 7 Jan 2021 06:19:38 -0500 Received: from foss.arm.com ([217.140.110.172]:58090 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727850AbhAGLTF (ORCPT ); Thu, 7 Jan 2021 06:19:05 -0500 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 81D0B11D4; Thu, 7 Jan 2021 03:18:19 -0800 (PST) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.198.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 67BC13F719; Thu, 7 Jan 2021 03:18:18 -0800 (PST) From: Ionela Voinescu To: rjw@rjwysocki.net, lenb@kernel.org, robert.moore@intel.com Cc: viro@zeniv.linux.org.uk, catalin.marinas@arm.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, ionela.voinescu@arm.com Subject: [PATCH 3/3] acpi: cppc_acpi: initialise vaddr pointers to NULL Date: Thu, 7 Jan 2021 11:17:17 +0000 Message-Id: <20210107111717.5571-4-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.29.2.dirty In-Reply-To: <20210107111717.5571-1-ionela.voinescu@arm.com> References: <20210107111717.5571-1-ionela.voinescu@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Properly initialise vaddr pointers in cpc_read() and cpc_write() to NULL instead of 0. This fixes the following sparse warnings: drivers/acpi/cppc_acpi.c:937:31: warning: Using plain integer as NULL pointer drivers/acpi/cppc_acpi.c:982:31: warning: Using plain integer as NULL pointer Signed-off-by: Ionela Voinescu Cc: "Rafael J. Wysocki" Cc: Len Brown --- drivers/acpi/cppc_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index fd71020f5d5f..69057fcd2c04 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -934,7 +934,7 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val) static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) { int ret_val = 0; - void __iomem *vaddr = 0; + void __iomem *vaddr = NULL; int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); struct cpc_reg *reg = ®_res->cpc_entry.reg; @@ -979,7 +979,7 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) { int ret_val = 0; - void __iomem *vaddr = 0; + void __iomem *vaddr = NULL; int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); struct cpc_reg *reg = ®_res->cpc_entry.reg; -- 2.29.2.dirty