From patchwork Sun Jun 10 11:07:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 138186 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2892773lji; Sun, 10 Jun 2018 04:08:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI+KxY2AWI+5aYy8NBCMMw/nPz0+B3cfS3pN14d+Q+0CRyo3zgvYVn/3JdNfvrTqmvN5K98 X-Received: by 2002:a17:902:5a4c:: with SMTP id f12-v6mr14164556plm.85.1528628932192; Sun, 10 Jun 2018 04:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528628932; cv=none; d=google.com; s=arc-20160816; b=fFInIbjplUZm+akONxWqhBcLJycUMuNxN3u9vG6tJq2+FqjKpCs/B9ceDgtlmjWnzH dNgr6ylINZqw+KY6Tw6f0YFfOk4ucfx7ikjpi0/GryENxERWiRfniYX+fgw6CSTBiOx/ BB2AkbMQBOj74rfmUQRsrofF/d1bb/DeY1WC3NMtQQ/FxYdFzd0ih5gR3HAjllDqXyfQ k4ylx7wJxJ5TP4Nf19tFMqyu9u7vYriPLKpNCuq+bMIrupQ3ATL/Hbw2i/1aZ4KKAChZ U+3CbmlwxJZmqk/tbIklhI0fid8w+NU3NaEQW8XshBVjGoEscYQrDScesu1DIixzvuTz GvmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Dqiu3WLCv4ZERoYgplhtT/SOIpAtuOlrStEp27w5kyc=; b=Md5oEcWLqSulPPHVrNQJEIYfwOTwI9jDZ9Gh8DYHcdb//S30C41ylZDaMMNPTVLcBK ATxjyc1pT/5chmIvpv8r1BbXUc9ZcrKJthTWb4jB3GJgb+U5Ux5oL19lBMCPK4pjhnUW Ic0HlukVuMqHutfOHYLsIfDfrjBafTEiSzl7a0DAPe0kgjqgHOHh22TJP8XzOo1p9Hm5 qrp82OHoSNH2ITPrOnAgt374h/9HmykHN8aGWA4eqZegNhorxOQ5dEiDX+fP9SMpFu6x Xcg9gvM/WxZSRZWku5QxGtPcPrmJ9rq+7BnnqU+g0mFgBsxIIQDjYHRvE/1UtcvMjtVp gSiw== ARC-Authentication-Results: i=1; mx.google.com; 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 t187-v6si12235159pgc.163.2018.06.10.04.08.51; Sun, 10 Jun 2018 04:08:52 -0700 (PDT) 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; 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 S1753943AbeFJLIn (ORCPT + 30 others); Sun, 10 Jun 2018 07:08:43 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35230 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753878AbeFJLIh (ORCPT ); Sun, 10 Jun 2018 07:08:37 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 44ACD150A446A; Sun, 10 Jun 2018 19:08:33 +0800 (CST) Received: from localhost (10.177.23.164) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.382.0; Sun, 10 Jun 2018 19:08:24 +0800 From: Zhen Lei To: Robin Murphy , Will Deacon , Joerg Roedel , iommu , linux-kernel CC: Zhen Lei , Hanjun Guo , Libin , Guozhu Li , "Xinwei Hu" Subject: [PATCH v2 3/5] iommu/amd: use default branch to deal with all non-supported capabilities Date: Sun, 10 Jun 2018 19:07:21 +0800 Message-ID: <1528628843-10280-4-git-send-email-thunder.leizhen@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1528628843-10280-1-git-send-email-thunder.leizhen@huawei.com> References: <1528628843-10280-1-git-send-email-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid below warning when new capabilities added: drivers/iommu/amd_iommu.c: In function 'amd_iommu_capable': drivers/iommu/amd_iommu.c:3053:2: warning: enumeration value 'IOMMU_CAP_NON_STRICT' not handled in switch [-Wswitch] switch (cap) { Signed-off-by: Zhen Lei --- drivers/iommu/amd_iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.8.3 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 1912e91..8b0ba6d 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -3059,11 +3059,9 @@ static bool amd_iommu_capable(enum iommu_cap cap) return true; case IOMMU_CAP_INTR_REMAP: return (irq_remapping_enabled == 1); - case IOMMU_CAP_NOEXEC: + default: return false; } - - return false; } static void amd_iommu_get_resv_regions(struct device *dev,