From patchwork Sat Jun 22 08:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 167479 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1734113ilk; Sat, 22 Jun 2019 01:51:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwc/KYtFK3BTUdV9FLq7Pu7cRXIOwRQ53hj7KtVaEI23SHujhPMioJo+nDS7Ztchzg/LIC1 X-Received: by 2002:a17:902:124:: with SMTP id 33mr76442107plb.145.1561193479937; Sat, 22 Jun 2019 01:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561193479; cv=none; d=google.com; s=arc-20160816; b=BhNfFf561NkL8AOb2JRbJnEkHzTO1qbKG8/XPNOvra/AlTihlZjYqvHZWEeuth1YxB 1GAWZ19172o7r9gY2LftvoZnSMaCFgT11rB20dqSCKmkZ4Wx3XHWAUuvvkLLUtZ36J2q WCUozHAyR/XPnQ3DP+qhagT/OgYyNJLZiZRezgixSrWtRU512vvTLux2o0NOqbEySgFW ogyUdJ5U3mra5E1iEChRbruxN/MKcIZCka38d2GBzIGYOFCZjJB/TAgvYuU6nMSYgr6D B2kmPYUbSQ5RBl571351WhDrR3dPWhHwq7tNFlmRyLP+Rwbr4QN64pQlP0poSESRMIve +Y+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u9crTsB/UrpUqqHUWXJKG+JkHwY6C6DtrEmHZcdZhy8=; b=za3YzdwPkU12qm3krWpLYTM7pLtCMAXGrowQO91W4+btDQDwrSfkVOyQIEsFMbDypm zJG1d/+V8401mkS2ug9B/4HHfi7ysgDA5h8cIcDKBqSxyL6fWEzjuNbmhgeMmcMxsw2M Ken4TFzlolp0en6UAzmxZp4OJaVyk9sfWRdgGv4kDe9lwTnfBZoe2tEclyIzPb5U5MUR oUEqcWLB1kk7xxk1faU8JdKYjAGKtePAmTP/96PN45KI6VhmnSF715MqjZHLanMbycqZ 3zO14VZbfOvjRs3ChDmKlSeUtD75aASopRZmLzXHuAxKQ2UnfDS4ZxmgM/UHqTZ/r42l 4CAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aw5AY8Lx; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si4917528pfd.273.2019.06.22.01.51.19; Sat, 22 Jun 2019 01:51:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=@linaro.org header.s=google header.b=Aw5AY8Lx; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbfFVIvS (ORCPT + 3 others); Sat, 22 Jun 2019 04:51:18 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40443 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbfFVIvR (ORCPT ); Sat, 22 Jun 2019 04:51:17 -0400 Received: by mail-wr1-f65.google.com with SMTP id p11so8718057wre.7 for ; Sat, 22 Jun 2019 01:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u9crTsB/UrpUqqHUWXJKG+JkHwY6C6DtrEmHZcdZhy8=; b=Aw5AY8LxmwqzQm5h+un10GlowGYa2zi9DKB9ANx/rA9mkgDgc08z6KR4kCiOEtTISn M65JF8S/jPwJY8MDUGqlujppgDB46RZlKKvQEUxw4lXogAnaup8P13uMbys8QN8cIpUD bFR/ggkFZZWluEem+8XG1X5wamCkMtO5mnzi6pgorB3QSjrGQ6hmhU5BWrtCU1phnJk/ p+ZFw5RFgn8yjr9YLuptDXmZzT+N7rDcnG0wuDwq+TOq7dXZ8hEXvEr6xVExV9lbTqll VAQdhSWWRA0h3ZVVVpNMzMTEc/MPGkiUHl3xYLkFoY9sSSE+ZVHHXCFHoUS2IMNG1hc/ pKyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u9crTsB/UrpUqqHUWXJKG+JkHwY6C6DtrEmHZcdZhy8=; b=Z70M1ix5sfv87kht44LwGexDWL19WYyH9D9pyaCLb/Mt9XkTMrXE8AdAwW8DwNJH7A 1c01oKw5DKF4ZxJlLK3+J64oJ7L6D9J2ryBzG814L5F84PDuqCbMnGRh1Q0QIEbiHEBM MhAvSkk4kDifcGSq0JgvN8RiLJjTUKVJy90IwUti+d3fyMrA6P2WMpALsVmLr3uN0Q// ubyYgf0XQgDUSgafjpqNWAYeULFcFbdvfgJ6oLhxGa6Dx/8v3h19oT2BAutRwCGoWGKE uz/eA2vRCMizl8vNtIEnWNyoEDvrgZHzysUBira5j2W4hneiLJAc9NZyCucskS6FiGLD GydA== X-Gm-Message-State: APjAAAVmlTpyzin9dVCgM13nyYLUqsGiCUfXLw8PTlyqwIGCq4sHckGj VQmg3sgLHbsCAMFigMrOqLN5w/sFGBuwXf2H X-Received: by 2002:adf:c506:: with SMTP id q6mr85043928wrf.219.1561193475344; Sat, 22 Jun 2019 01:51:15 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:4bd:3f91:4ef8:ae7e]) by smtp.gmail.com with ESMTPSA id v15sm4863589wrt.25.2019.06.22.01.51.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2019 01:51:14 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Hans de Goede , Jonathan Richardson , Luo XinanX , "Prakhya, Sai Praneeth" , Qian Cai , Tian Baofeng Subject: [PATCH 3/4] x86/efi: fix a -Wtype-limits compilation warning Date: Sat, 22 Jun 2019 10:51:05 +0200 Message-Id: <20190622085106.24859-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190622085106.24859-1-ard.biesheuvel@linaro.org> References: <20190622085106.24859-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Qian Cai Compiling a kernel with W=1 generates this warning, arch/x86/platform/efi/quirks.c:731:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Fixes: 3425d934fc03 ("efi/x86: Handle page faults occurring while running ...") Signed-off-by: Qian Cai Acked-by: "Prakhya, Sai Praneeth" Signed-off-by: Ard Biesheuvel --- arch/x86/platform/efi/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 632b83885867..3b9fd679cea9 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -728,7 +728,7 @@ void efi_recover_from_page_fault(unsigned long phys_addr) * Address range 0x0000 - 0x0fff is always mapped in the efi_pgd, so * page faulting on these addresses isn't expected. */ - if (phys_addr >= 0x0000 && phys_addr <= 0x0fff) + if (phys_addr <= 0x0fff) return; /*