From patchwork Wed Jan 24 12:40:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13529203 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBDD977655 for ; Wed, 24 Jan 2024 12:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706100309; cv=none; b=UhFTUHmogSN1vEuCrdkS6hLn9map70Ncs+KRwzD0En6SyoaLR7/hSP+H27LXK8T+f/1K93sIVNAt9Nzm1AUSVzVwdOMpxrICPNiWdiAzJAWnk4XXIqU9KAasclzhPPE8A0caCGfv4gaxBRfRqylPSy9ACpu2pMiBWMvl7kUOhQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706100309; c=relaxed/simple; bh=Ktb1jiwrb7Qj00vjHKi1UJxkksW2tVg3ct4gVCsFG3I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b9nsbZ27HQ7GAbWrVJaCbAhlLW05p86JLpExwJyCFPuNEPpxcc/9yWDSOk29KhgLyD0OARHBuXXi8bEKdWiRg/DzEoIlIAIBN75JxFiDNCeasWZeYJfZk+5ln/y/I2r5vhHGDZHu2NekDU55UsDr263WvLNngPDSWqciQ11PJCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TKk9n5GrGz6JBLl; Wed, 24 Jan 2024 20:42:05 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id A1C38140684; Wed, 24 Jan 2024 20:45:05 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Jan 2024 12:45:05 +0000 From: Jonathan Cameron To: , , Fan Ni , Michael Tsirkin CC: Ira Weiny , Huai-Cheng Kuo , Dave Jiang , Peter Maydell , Davidlohr Bueso , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Li Zhijian , Stefan Hajnoczi , , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 08/12] hw/cxl: Pass NULL for a NULL MemoryRegionOps Date: Wed, 24 Jan 2024 12:40:56 +0000 Message-ID: <20240124124100.8218-9-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240124124100.8218-1-Jonathan.Cameron@huawei.com> References: <20240124124100.8218-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) From: Li Zhijian a NULL parameter is enough for a NULL MemoryRegionOps Signed-off-by: Li Zhijian Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni --- hw/cxl/cxl-component-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index 9dfde6c0b3..5ddd47ed8d 100644 --- a/hw/cxl/cxl-component-utils.c +++ b/hw/cxl/cxl-component-utils.c @@ -197,7 +197,7 @@ void cxl_component_register_block_init(Object *obj, CXL2_COMPONENT_BLOCK_SIZE); /* io registers controls link which we don't care about in QEMU */ - memory_region_init_io(&cregs->io, obj, NULL, cregs, ".io", + memory_region_init_io(&cregs->io, obj, NULL, NULL, ".io", CXL2_COMPONENT_IO_REGION_SIZE); memory_region_init_io(&cregs->cache_mem, obj, &cache_mem_ops, cxl_cstate, ".cache_mem", CXL2_COMPONENT_CM_REGION_SIZE);