Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1084538pxj; Wed, 2 Jun 2021 20:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqEykKrPR3hQvu3t3H9d/oERZZ8wWTkwJ2aThVbB2IntzcUWFKnZWtiQiwQRNzsAjKhm9W X-Received: by 2002:a05:6402:204:: with SMTP id t4mr1695292edv.34.1622691627361; Wed, 02 Jun 2021 20:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622691627; cv=none; d=google.com; s=arc-20160816; b=mDqHnbgPQeSJPEtS7WvMLlyVJO5dlboNvCIYs9M/vUVgKgm2DWNMWSB7TJwu4NaFB9 k3SJXC2E+LYjJuCytYpNmR6ERdwd9U2Jt/oqGqMz8vV/n0fTdfgDHnz94dv6//2K98HV +1MkOCVoP43+JEnP9G/p7kW1DJht7laIUQ1UMhvKMTeCmELmFCBdg3Sg8+YYhHZYSuk0 p6nZr5o51QCN36jSRoIak6FZrTU/xENfNfoNdxuzMoXqYZGAVDykO3iAwQs3VafYtkdD HyjaiOEVoN1m1ielvpnIl2zhYVdg1DmB+dP8P/mGL269rtkkl/j1u68ab24dDJr6Ejxx eMBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=aXWQPnh9XQ80sEKYif/guzvYpg4G/74jatj7fte+XaM=; b=v/2IjJLvGncV8hyNl9VpjBN1M1uF9CNcm52FmUI3uA6BYgvv+KgtgpOr2zwouBIVVO gjdn5HSIbLSxgudcEnAPw6NilUB/p8bPp2zj0d6QbS9B744pLqEgvB8LViEa0uhjjQnx qq/vE42rQt4HDL0hjECKbWegTdirTlDSSYmtKFObbP4qIPBTt3rbZ3w820OsxR7coJAP HyRopMVKTpDrpG7xX+qf/zjKuB/YfVc+Jc9W9uDDpInkXQOZCc7hmH2ONAateYD1Jbi/ BLscVU2Oi5dlGOmoVp6jUZOSB5xHuxql5SPerl2C6JTyHijAnqaR5lIWg7x+unDNV80p CKiQ== 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=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si1283568ejm.343.2021.06.02.20.40.04; Wed, 02 Jun 2021 20:40:27 -0700 (PDT) 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=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbhFCDbZ (ORCPT + 99 others); Wed, 2 Jun 2021 23:31:25 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3520 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbhFCDbY (ORCPT ); Wed, 2 Jun 2021 23:31:24 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FwWXW2khMzZcG2; Thu, 3 Jun 2021 11:26:51 +0800 (CST) Received: from dggpeml500023.china.huawei.com (7.185.36.114) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 11:29:07 +0800 Received: from [10.67.77.175] (10.67.77.175) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 11:29:07 +0800 Subject: Re: drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:89:7: warning: variable 'val' set but not used To: kernel test robot CC: , , , Will Deacon , John Garry , Qi Liu References: <202106030815.nhs7gfMo-lkp@intel.com> From: Shaokun Zhang Message-ID: <3dde3f65-fd59-5ec4-5c1e-205d623f0cf3@hisilicon.com> Date: Thu, 3 Jun 2021 11:29:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <202106030815.nhs7gfMo-lkp@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.77.175] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2021/6/3 8:28, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 324c92e5e0ee0e993bdb106fac407846ed677f6b > commit: 932f6a99f9b0c6b7039a5e2ce961009a8dc8c07c drivers/perf: hisi: Add new functions for HHA PMU > date: 10 weeks ago > config: arm64-randconfig-r005-20210603 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d8e0ae9a76a62bdc6117630d59bf9967ac9bb4ea) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install arm64 cross compiling tool for clang build > # apt-get install binutils-aarch64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=932f6a99f9b0c6b7039a5e2ce961009a8dc8c07c > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout 932f6a99f9b0c6b7039a5e2ce961009a8dc8c07c > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > In file included from drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:11: > In file included from include/linux/acpi.h:35: > In file included from include/acpi/acpi_io.h:7: > In file included from arch/arm64/include/asm/acpi.h:12: > include/linux/efi.h:1093:34: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch] > status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, > ^ > include/linux/efi.h:1101:24: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch] > get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, &setupmode); > ^ >>> drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:89:7: warning: variable 'val' set but not used [-Wunused-but-set-variable] > u32 val; > Oops, my bad, there is a bug that shall be fixed. I will post it later. Thanks for the report, Shaokun ^ > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:103:7: warning: variable 'val' set but not used [-Wunused-but-set-variable] > u32 val; > ^ > 4 warnings generated. > > > vim +/val +89 drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > > 82 > 83 static void hisi_hha_pmu_config_ds(struct perf_event *event) > 84 { > 85 struct hisi_pmu *hha_pmu = to_hisi_pmu(event->pmu); > 86 u32 ds_skt = hisi_get_datasrc_skt(event); > 87 > 88 if (ds_skt) { > > 89 u32 val; > 90 > 91 val = readl(hha_pmu->base + HHA_DATSRC_CTRL); > 92 val |= HHA_DATSRC_SKT_EN; > 93 writel(ds_skt, hha_pmu->base + HHA_DATSRC_CTRL); > 94 } > 95 } > 96 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org >