From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3E2DC76191 for ; Fri, 26 Jul 2019 13:47:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE28122CE8 for ; Fri, 26 Jul 2019 13:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564148855; bh=vf8Lnl1VmmLsZDZiRxuHThBIF7lydJtxpXe7pKXu8ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TzNHicHD9ohZd0iPo956vOYow4btjAQDxe4JwyWrtp5l00z92n6MYP2QP8FG2Srln wsTqfu9f608EjQPBSSGrK1WjWkikC+1qs7Ai+cdL0qCfniq7uys174nDQcoxj33mw8 AAbhsheYjku/qN5jRI74IfV9o3dmQvol0yIgjFwI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727681AbfGZNp7 (ORCPT ); Fri, 26 Jul 2019 09:45:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:55074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388584AbfGZNpw (ORCPT ); Fri, 26 Jul 2019 09:45:52 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A012522CBF; Fri, 26 Jul 2019 13:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564148751; bh=vf8Lnl1VmmLsZDZiRxuHThBIF7lydJtxpXe7pKXu8ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=USSbhaX5mYDlXrYh04QpTcFdvUVL3JVCn93LLfGwp2xY40CVpnxp/grlKyiwYcrGw sJ/qxz5Mqnu3PLq9U7DM6TkUt3IKrQCFYd6tVV5H8oWVP4K0M0Nd5dchz3oL68PCWc DPGoUohMIroiDSRH4vE73c5zN7q/G648+elRi41Y= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qian Cai , Thomas Gleixner , Sasha Levin Subject: [PATCH AUTOSEL 4.4 13/23] x86/apic: Silence -Wtype-limits compiler warnings Date: Fri, 26 Jul 2019 09:45:12 -0400 Message-Id: <20190726134522.13308-13-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190726134522.13308-1-sashal@kernel.org> References: <20190726134522.13308-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qian Cai [ Upstream commit ec6335586953b0df32f83ef696002063090c7aef ] There are many compiler warnings like this, In file included from ./arch/x86/include/asm/smp.h:13, from ./arch/x86/include/asm/mmzone_64.h:11, from ./arch/x86/include/asm/mmzone.h:5, from ./include/linux/mmzone.h:969, from ./include/linux/gfp.h:6, from ./include/linux/mm.h:10, from arch/x86/kernel/apic/io_apic.c:34: arch/x86/kernel/apic/io_apic.c: In function 'check_timer': ./arch/x86/include/asm/apic.h:37:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if ((v) <= apic_verbosity) \ ^~ arch/x86/kernel/apic/io_apic.c:2160:2: note: in expansion of macro 'apic_printk' apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X " ^~~~~~~~~~~ ./arch/x86/include/asm/apic.h:37:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if ((v) <= apic_verbosity) \ ^~ arch/x86/kernel/apic/io_apic.c:2207:4: note: in expansion of macro 'apic_printk' apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " ^~~~~~~~~~~ APIC_QUIET is 0, so silence them by making apic_verbosity type int. Signed-off-by: Qian Cai Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1562621805-24789-1-git-send-email-cai@lca.pw Signed-off-by: Sasha Levin --- arch/x86/include/asm/apic.h | 2 +- arch/x86/kernel/apic/apic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index fd810a57ab1b..3328a37ddc75 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -44,7 +44,7 @@ static inline void generic_apic_probe(void) #ifdef CONFIG_X86_LOCAL_APIC -extern unsigned int apic_verbosity; +extern int apic_verbosity; extern int local_apic_timer_c2_ok; extern int disable_apic; diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index deddc9b93299..cc6c33249850 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -171,7 +171,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR; /* * Debug level, exported for io_apic.c */ -unsigned int apic_verbosity; +int apic_verbosity; int pic_mode; -- 2.20.1