Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11814293pjo; Thu, 2 Jan 2020 14:45:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzkE7eA9zc9HvB0LjGzY33qF9TjNxRSJfoy1DM5VSrallcPCOGe3Hm4F/zwVcxdZuqbM7u6 X-Received: by 2002:a9d:6251:: with SMTP id i17mr21909644otk.14.1578005102020; Thu, 02 Jan 2020 14:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005102; cv=none; d=google.com; s=arc-20160816; b=FlPHL+0YA+zpBTvJR0KNvxqX/X4lKa3abEOGmylMAF2t54pG2qEhSU5spFJjfSuYDC lneP4ZKMA4/gOV8K4pYIFs5PGe+7IyFwUPCXLkSGVIW7tYNQMp88POm41mObthNYFBRU elW+bW7BY1v8SwAQlJ7bzeUyPnZq5lUiHFgZiXYPwbB9tObUpMpe/8eLNNx2PcYJUuar 3WUk9xOL/UAHDvojJUTor1O42Tpnv2zvSP5ihvOcnh5WbICCIr4ZKp/5UBBU4MRb/7O7 3dPmxgBVr3A6NMwEBDI88+8OjB3MLF0W1+NvyeEvWr0Z8/qyAve3CV6pfMHRdtNhCy7T C7kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pu17e4ny2UpgEtuFDEU0ELdmAsYxNyKHQiwxyEV+c5k=; b=r86uoEzuvGboOQBvxW6EX3nRSqAANNlf6EdV1P9FumlkkMrewILSK2lEJ+/2Fe0bYe AwI0XRuiH3XMX7vGGz+aY+OOGLU7rxh60RbOQTiTr2uOinOc3CyE47gUDPNuOgNUQCap R8RX98clApuNbCJneaGwA3ebWymjLnfzaBM59SyKC47la7n/qJ1DBBjHXRPd5JmPqghJ 4EwR9dgf8ssjf5VYpjpmhdNDS7rQ6AP8k89OZSbxr9+Ds92UcYyIL+13LO8pViUAa0sO pgYj8zryBiHQMVJN73j2H0JFWPSYVmkDrdwTwlmx/nZpiI5F8NM1TYTdqlqQZOUCz61k 5OjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uY3/rh9F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si29113446oto.205.2020.01.02.14.44.50; Thu, 02 Jan 2020 14:45:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uY3/rh9F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730701AbgABWeU (ORCPT + 99 others); Thu, 2 Jan 2020 17:34:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:42690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730692AbgABWeQ (ORCPT ); Thu, 2 Jan 2020 17:34:16 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EACEF20866; Thu, 2 Jan 2020 22:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004456; bh=dpgVr1QVj+B+LzMWGayZ6JEGYI7stkUsUlNTDoGhtTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uY3/rh9FYj15jh/3gTNaJrUbPGoazsBgcPkxK16tTWUwg1+Su7XjabbrltQBDVdAy LnaJQL+m59Fhhbdu4cM7e3HCTFoleUp5SvpOFgH8uFiSWuhhVegzDuIUFUwcHKkNZ7 RLurezpKkH1b2yFEgalKwl6Tz8mMqTUVV2s6JLOw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Shuah Khan , Sasha Levin Subject: [PATCH 4.4 015/137] tools/power/cpupower: Fix initializer override in hsw_ext_cstates Date: Thu, 2 Jan 2020 23:06:28 +0100 Message-Id: <20200102220548.748117111@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 7e5705c635ecfccde559ebbbe1eaf05b5cc60529 ] When building cpupower with clang, the following warning appears: utils/idle_monitor/hsw_ext_idle.c:42:16: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .desc = N_("Processor Package C2"), ^~~~~~~~~~~~~~~~~~~~~~ ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_' #define N_(String) gettext_noop(String) ^~~~~~ ./utils/helpers/helpers.h:23:30: note: expanded from macro 'gettext_noop' #define gettext_noop(String) String ^~~~~~ utils/idle_monitor/hsw_ext_idle.c:41:16: note: previous initialization is here .desc = N_("Processor Package C9"), ^~~~~~~~~~~~~~~~~~~~~~ ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_' #define N_(String) gettext_noop(String) ^~~~~~ ./utils/helpers/helpers.h:23:30: note: expanded from macro 'gettext_noop' #define gettext_noop(String) String ^~~~~~ 1 warning generated. This appears to be a copy and paste or merge mistake because the name and id fields both have PC9 in them, not PC2. Remove the second assignment to fix the warning. Fixes: 7ee767b69b68 ("cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states") Link: https://github.com/ClangBuiltLinux/linux/issues/718 Signed-off-by: Nathan Chancellor Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c b/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c index ebeaba6571a3..475e18e04318 100644 --- a/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c +++ b/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c @@ -40,7 +40,6 @@ static cstate_t hsw_ext_cstates[HSW_EXT_CSTATE_COUNT] = { { .name = "PC9", .desc = N_("Processor Package C9"), - .desc = N_("Processor Package C2"), .id = PC9, .range = RANGE_PACKAGE, .get_count_percent = hsw_ext_get_count_percent, -- 2.20.1