From patchwork Fri Jul 25 13:27:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 4622931 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AAB2DC033A for ; Fri, 25 Jul 2014 13:27:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0163E201DD for ; Fri, 25 Jul 2014 13:27:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1483A201F4 for ; Fri, 25 Jul 2014 13:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760050AbaGYN1N (ORCPT ); Fri, 25 Jul 2014 09:27:13 -0400 Received: from mga02.intel.com ([134.134.136.20]:59757 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760017AbaGYN1M (ORCPT ); Fri, 25 Jul 2014 09:27:12 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 25 Jul 2014 06:27:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,731,1400050800"; d="scan'208";a="578913627" Received: from eouldahm-mobl8.amr.corp.intel.com (HELO jtkirshe-mobl.amr.corp.intel.com) ([10.255.75.180]) by orsmga002.jf.intel.com with ESMTP; 25 Jul 2014 06:27:08 -0700 From: Jeff Kirsher To: gleb@kernel.org, pbonzini@redhat.com Cc: Mark Rustad , kvm@vger.kernel.org, Jeff Kirsher Subject: [PATCH 4/4] x86/kvm: Resolve shadow warning from min macro Date: Fri, 25 Jul 2014 06:27:05 -0700 Message-Id: <1406294825-21393-4-git-send-email-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1406294825-21393-1-git-send-email-jeffrey.t.kirsher@intel.com> References: <1406294825-21393-1-git-send-email-jeffrey.t.kirsher@intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Rustad Resolve a shadow warning generated in W=2 builds by the nested use of the min macro by instead using the min3 macro for the minimum of 3 values. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- arch/x86/kvm/emulate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e4e833d..2d6c97a 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1315,8 +1315,7 @@ static int pio_in_emulated(struct x86_emulate_ctxt *ctxt, in_page = (ctxt->eflags & EFLG_DF) ? offset_in_page(reg_read(ctxt, VCPU_REGS_RDI)) : PAGE_SIZE - offset_in_page(reg_read(ctxt, VCPU_REGS_RDI)); - n = min(min(in_page, (unsigned int)sizeof(rc->data)) / size, - count); + n = min3(in_page, (unsigned int)sizeof(rc->data) / size, count); if (n == 0) n = 1; rc->pos = rc->end = 0;