Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752679AbbKNDXM (ORCPT ); Fri, 13 Nov 2015 22:23:12 -0500 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:9327 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbbKNDXL (ORCPT ); Fri, 13 Nov 2015 22:23:11 -0500 X-RM-TRANSID: 2eea5646a91c288-36919 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee95646a91a1f6-9e26a From: Yaowei Bai To: gleb@kernel.org, pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] KVM: kvm_para_has_feature can be boolean Date: Sat, 14 Nov 2015 11:21:07 +0800 Message-Id: <1447471267-3918-2-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447471267-3918-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1447471267-3918-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 38 This patch makes kvm_para_has_feature return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/kvm_para.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/kvm_para.h b/include/linux/kvm_para.h index 00a97bb..35e568f 100644 --- a/include/linux/kvm_para.h +++ b/include/linux/kvm_para.h @@ -4,10 +4,8 @@ #include -static inline int kvm_para_has_feature(unsigned int feature) +static inline bool kvm_para_has_feature(unsigned int feature) { - if (kvm_arch_para_features() & (1UL << feature)) - return 1; - return 0; + return !!(kvm_arch_para_features() & (1UL << feature)); } #endif /* __LINUX_KVM_PARA_H */ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/