From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.codeaurora.org by pdx-caf-mail.web.codeaurora.org (Dovecot) with LMTP id aRlSN/cEHVvuMgAAmS7hNA ; Sun, 10 Jun 2018 11:08:49 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8580E607BB; Sun, 10 Jun 2018 11:08:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by smtp.codeaurora.org (Postfix) with ESMTP id 12443606FA; Sun, 10 Jun 2018 11:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 12443606FA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753943AbeFJLIn (ORCPT + 25 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 Content-Type: text/plain 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(-) 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, -- 1.8.3