From patchwork Wed May 13 13:15:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 471670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E7A011402C2 for ; Wed, 13 May 2015 15:15:59 +1000 (AEST) Received: from localhost ([::1]:46427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsP1R-0007VH-OM for incoming@patchwork.ozlabs.org; Wed, 13 May 2015 01:15:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsP0y-0006wc-Ew for qemu-devel@nongnu.org; Wed, 13 May 2015 01:15:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsP0v-0005u8-9C for qemu-devel@nongnu.org; Wed, 13 May 2015 01:15:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsP0v-0005tt-1f; Wed, 13 May 2015 01:15:25 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4D5FOMt018826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 May 2015 01:15:24 -0400 Received: from cpc-pc.redhat.com (vpn1-5-226.pek2.redhat.com [10.72.5.226]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4D5FLOZ032584; Wed, 13 May 2015 01:15:22 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 13 May 2015 13:15:28 +0000 Message-Id: <1431522928-5292-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH] iscsi: Remove pointless runtime check of macro value X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org raw_bsd already has QEMU_BUILD_BUG_ON(BDRV_SECTOR_SIZE != 512), so iscsi should relax. Signed-off-by: Fam Zheng --- block/iscsi.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 8fca1d3..14e97a6 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1323,13 +1323,6 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, const char *filename; int i, ret = 0; - if ((BDRV_SECTOR_SIZE % 512) != 0) { - error_setg(errp, "iSCSI: Invalid BDRV_SECTOR_SIZE. " - "BDRV_SECTOR_SIZE(%lld) is not a multiple " - "of 512", BDRV_SECTOR_SIZE); - return -EINVAL; - } - opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (local_err) {