From patchwork Tue Nov 27 05:37:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lei Li X-Patchwork-Id: 202097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 641992C008C for ; Tue, 27 Nov 2012 16:38:14 +1100 (EST) Received: from localhost ([::1]:60532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdDs4-0002fQ-Iz for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2012 00:38:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdDrx-0002et-FT for qemu-devel@nongnu.org; Tue, 27 Nov 2012 00:38:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdDrw-0005B5-F3 for qemu-devel@nongnu.org; Tue, 27 Nov 2012 00:38:05 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:35978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdDrv-0005Ad-QZ for qemu-devel@nongnu.org; Tue, 27 Nov 2012 00:38:04 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Nov 2012 11:07:59 +0530 Received: from d28relay01.in.ibm.com (9.184.220.58) by e28smtp03.in.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Nov 2012 11:07:56 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAR5bt5i33095800 for ; Tue, 27 Nov 2012 11:07:55 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAR5btDM005322 for ; Tue, 27 Nov 2012 16:37:55 +1100 Received: from localhost.cn.ibm.com ([9.115.122.89]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qAR5bsUs005189; Tue, 27 Nov 2012 16:37:54 +1100 From: Lei Li To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2012 13:37:52 +0800 Message-Id: <1353994672-20714-1-git-send-email-lilei@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.7.6 x-cbid: 12112705-3864-0000-0000-000005BBE120 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.3 Cc: pbonzini@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, Lei Li Subject: [Qemu-devel] [PATCH] scsi: Remove SCSI_BUS macro 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 As step behind Paolo's fix for RHBZ#879657 and according to the current fix in Commit b5007bc (hmp: do not crash on invalid SCSI hotplug), the macro SCSI_BUS has already been replaced to object_dynamic_cast which has been improved when try to cast to NULL value and it is also what DO_UPCAST macro does. And due to the potential Segmentation risk of SCSI_BUS, remove this macro. Signed-off-by: Lei Li --- hw/scsi.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/scsi.h b/hw/scsi.h index b8f7357..ad063e5 100644 --- a/hw/scsi.h +++ b/hw/scsi.h @@ -142,7 +142,6 @@ struct SCSIBusInfo { }; #define TYPE_SCSI_BUS "SCSI" -#define SCSI_BUS(obj) OBJECT_CHECK(SCSIBus, (obj), TYPE_SCSI_BUS) struct SCSIBus { BusState qbus;