Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753558AbbKYNM4 (ORCPT ); Wed, 25 Nov 2015 08:12:56 -0500 Received: from m50-135.163.com ([123.125.50.135]:60000 "EHLO m50-135.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753430AbbKYNMz (ORCPT ); Wed, 25 Nov 2015 08:12:55 -0500 From: Geliang Tang To: Alex Williamson Cc: Geliang Tang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] vfio: fix a problematic usage of WARN() Date: Wed, 25 Nov 2015 21:12:18 +0800 Message-Id: X-Mailer: git-send-email 2.5.0 In-Reply-To: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> References: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> In-Reply-To: <7701ed112cc71a9a17ba5b3022166011a98d0dca.1448456395.git.geliangtang@163.com> References: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> <8bb789c0803579a01e1ee977ed67408c422acd79.1448456395.git.geliangtang@163.com> <582529c23f77af64373f59fa92e29186df700d79.1448456395.git.geliangtang@163.com> <7701ed112cc71a9a17ba5b3022166011a98d0dca.1448456395.git.geliangtang@163.com> X-CM-TRANSID: D9GowACn5YDDs1VWmDtWAA--.2207S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7GF48tFW5Gw4xZry3uw1UGFg_yoWxKrX_Gw 4kZa1xJrW7KrWvkw1S9FZav39Fy3yaqFZ7tF45tas3XFy3Xr1DCF9xZr13trZ7Jrn7CF45 u34fXr1UAr1fWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUUksqtUUUUU== X-Originating-IP: [116.77.146.156] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiGRm9mVXlPfPnlAABso Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 30 WARN() takes a condition and a format string. The condition was omitted. So I added it. Signed-off-by: Geliang Tang --- drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index de632da..9da0703 100644 --- a/drivers/vfio/vfio.c +++ b/drivers/vfio/vfio.c @@ -682,7 +682,7 @@ static int vfio_group_nb_add_dev(struct vfio_group *group, struct device *dev) return 0; /* TODO Prevent device auto probing */ - WARN("Device %s added to live group %d!\n", dev_name(dev), + WARN(1, "Device %s added to live group %d!\n", dev_name(dev), iommu_group_id(group->iommu_group)); return 0; -- 2.5.0 -- 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/