Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2380308pxb; Sun, 17 Apr 2022 20:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS7ZMxfPSMbsFlaF0fAsuUffU42SWKmZylf77t0+hIGsl3yphRuSXZgI2CQn/kuyTUgR+f X-Received: by 2002:a05:6402:1d55:b0:423:e3a9:d455 with SMTP id dz21-20020a0564021d5500b00423e3a9d455mr4261762edb.340.1650254369542; Sun, 17 Apr 2022 20:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650254369; cv=none; d=google.com; s=arc-20160816; b=k2bjpAP+qPbhTAGFQWkCNvPRFZA31651QSm4Zd5r9STbb490FCM86APPMBx9WhimIr +2ZQp5zv/ZOw0dZ9wmeVIZ6F59TC2tBmQHbMa1uwYvGpX1DlrvAs18DV4fCWaMrP+dxk ZEX0sWd2OH8PiAWc8KSErDsGc/CWoc86UN+bxX8ajKujwK23s4ZnzkuefssO7bqeH4Jy BCO8+18ut6kpcpqe3PMQFFBN0KpLt6oLPXyBq/NCarEiJnraJMjBAJ3rdbx/41JFEu5F w4qjlOrxYaKsF+5/JnUl3yrcK7f0jmex9wTPb4Gl5AGfv8Wsl82CBx9H+h5RQvw1rmKb hnbg== 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 :message-id:date:subject:cc:to:from; bh=NQh6dYU5Qqzp3sRI/bzWVwPh17uiO0vI3PpsDw6y8Lk=; b=WJ6m/OAo8VAxf9Chl3mp/JqpqYuIiyHIs6JYZ+hLF2qOlyIvG2ISq8hbuykHt8Hwmg ZRBOenhA/W4LWV1IPw94Ve3HdD8OE/nn+zYhJ0/uVnKID2aGRvZzh+oAmZbKxygq3mRJ JW5fEEfgTmxVZcaUsUL5qoh6LF29zTnVGO0SF6+l6sgkxzawRxu+biEZ8pYKYBNfe953 pFsvQOjsHK2FIwf0mhWJ1B9elamSMoKYR+maNr5sXt7INZGLbvwqkqzgVWJnP109dJ60 DaOWWF+/LNmhggnQM7rsfmfThsecD2uBIUi+bBRxD0uHofEg85hvdBHGHOT03iYQv9vD vmRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a17090626cb00b006e8aea64e6esi5674122ejc.29.2022.04.17.20.59.06; Sun, 17 Apr 2022 20:59:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234329AbiDQPow (ORCPT + 99 others); Sun, 17 Apr 2022 11:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234317AbiDQPov (ORCPT ); Sun, 17 Apr 2022 11:44:51 -0400 Received: from ha.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95FFF13F6B for ; Sun, 17 Apr 2022 08:42:14 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by ha.nfschina.com (Postfix) with ESMTP id 58F271E80CDD; Sun, 17 Apr 2022 23:40:16 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from ha.nfschina.com ([127.0.0.1]) by localhost (ha.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rku_9j_bI3yW; Sun, 17 Apr 2022 23:40:13 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: liqiong@nfschina.com) by ha.nfschina.com (Postfix) with ESMTPA id 47D2B1E80CDC; Sun, 17 Apr 2022 23:40:13 +0800 (CST) From: liqiong To: Thomas Gleixner , Dave Hansen , x86@kernel.org Cc: linux-kernel@vger.kernel.org, yuzhe@nfschina.com, renyu@nfschina.com, liqiong Subject: [PATCH] arch/x86: use 'NULL' insteadof '0' as null pointer Date: Sun, 17 Apr 2022 23:41:48 +0800 Message-Id: <20220417154148.541485-1-liqiong@nfschina.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse warns: "Using plain integer as NULL pointer". Use 'NULL' as null pointer. Signed-off-by: liqiong --- arch/x86/events/rapl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c index 77e3a47af5ad..7d70690fded5 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -537,11 +537,11 @@ static struct perf_msr intel_rapl_spr_msrs[] = { * - want to use same event codes across both architectures */ static struct perf_msr amd_rapl_msrs[] = { - [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, 0, false, 0 }, + [PERF_RAPL_PP0] = { 0, &rapl_events_cores_group, NULL, false, 0 }, [PERF_RAPL_PKG] = { MSR_AMD_PKG_ENERGY_STATUS, &rapl_events_pkg_group, test_msr, false, RAPL_MSR_MASK }, - [PERF_RAPL_RAM] = { 0, &rapl_events_ram_group, 0, false, 0 }, - [PERF_RAPL_PP1] = { 0, &rapl_events_gpu_group, 0, false, 0 }, - [PERF_RAPL_PSYS] = { 0, &rapl_events_psys_group, 0, false, 0 }, + [PERF_RAPL_RAM] = { 0, &rapl_events_ram_group, NULL, false, 0 }, + [PERF_RAPL_PP1] = { 0, &rapl_events_gpu_group, NULL, false, 0 }, + [PERF_RAPL_PSYS] = { 0, &rapl_events_psys_group, NULL, false, 0 }, }; static int rapl_cpu_offline(unsigned int cpu) -- 2.25.1