From mboxrd@z Thu Jan 1 00:00:00 1970 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 56CE727E7F2; Fri, 27 Jun 2025 08:51:25 +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=1751014288; cv=none; b=V53iZWwyoZkZ0kyLHxSKTOxoVB6lehf8UNcEdHG2hSDHg09ChaUOLW87Z4T/9MSDDyInrpGiWced0UeyuLdJFW2LwGQNri1I1zy5YGwhHmSxcnmtL7tfFEBCLmVWmdOzZ9eHk2uGfQS65rlhC16eP4s1NWUXS0l4185SyRSgf/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751014288; c=relaxed/simple; bh=Qmr1pWYNvkatuHEqNURtFgCKVmibYH6bu6vAsN3K8fE=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ytdy7ESj9O0n+ZEC4ePAmkl6qTV7GksYqtxXoSk0DejMeADcc30Bb2QM1kSdAljQQVDS8TNshSuQDDAZMbLU5xKLdsf6d7KYEpENHLSgYYPRDzZZNFP/5TT/RXBWzVJsWhnpxDjVWlci8iYjwZBYPDxKF6bTQaRNsiUox/lde0o= 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.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bT8Qg0V70z6M56y; Fri, 27 Jun 2025 16:50:35 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 780E514011D; Fri, 27 Jun 2025 16:51:23 +0800 (CST) Received: from localhost (10.48.153.213) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 27 Jun 2025 10:51:22 +0200 Date: Fri, 27 Jun 2025 09:51:20 +0100 From: Jonathan Cameron To: CC: , , , , , , , , , Alejandro Lucero , Martin Habets , Fan Ni , Edward Cree Subject: Re: [PATCH v17 09/22] sfc: create type2 cxl memdev Message-ID: <20250627095120.000056bf@huawei.com> In-Reply-To: <20250624141355.269056-10-alejandro.lucero-palau@amd.com> References: <20250624141355.269056-1-alejandro.lucero-palau@amd.com> <20250624141355.269056-10-alejandro.lucero-palau@amd.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To frapeml500008.china.huawei.com (7.182.85.71) On Tue, 24 Jun 2025 15:13:42 +0100 wrote: > From: Alejandro Lucero > > Use cxl API for creating a cxl memory device using the type2 > cxl_dev_state struct. > > Signed-off-by: Alejandro Lucero > Reviewed-by: Martin Habets > Reviewed-by: Fan Ni > Acked-by: Edward Cree > Reviewed-by: Jonathan Cameron > --- > drivers/net/ethernet/sfc/efx_cxl.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c > index 5d68ee4e818d..e2d52ed49535 100644 > --- a/drivers/net/ethernet/sfc/efx_cxl.c > +++ b/drivers/net/ethernet/sfc/efx_cxl.c > @@ -79,6 +79,13 @@ int efx_cxl_init(struct efx_probe_data *probe_data) > > cxl_set_capacity(&cxl->cxlds, EFX_CTPIO_BUFFER_SIZE); > > + cxl->cxlmd = devm_cxl_add_memdev(&pci_dev->dev, &cxl->cxlds); > + Trivial style thing but common practice (I haven't checked local style) is no blank line between call and associated error check. > + if (IS_ERR(cxl->cxlmd)) { > + pci_err(pci_dev, "CXL accel memdev creation failed"); > + return PTR_ERR(cxl->cxlmd); > + } > + > probe_data->cxl = cxl; > > return 0;