From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4140EC433EF for ; Wed, 18 May 2022 17:22:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240853AbiERRWC (ORCPT ); Wed, 18 May 2022 13:22:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240847AbiERRWC (ORCPT ); Wed, 18 May 2022 13:22:02 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486F695DFB for ; Wed, 18 May 2022 10:22:01 -0700 (PDT) Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L3KSj0RC3z687wL; Thu, 19 May 2022 01:18:13 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 18 May 2022 19:21:59 +0200 Received: from localhost (10.202.226.42) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 18 May 2022 18:21:58 +0100 Date: Wed, 18 May 2022 18:21:57 +0100 From: Jonathan Cameron To: Dan Williams CC: , , , , Subject: Re: [PATCH 01/14] cxl/mem: Drop mem_enabled check from wait_for_media() Message-ID: <20220518182157.0000348a@Huawei.com> In-Reply-To: <165237926188.3832067.15441813087107623945.stgit@dwillia2-desk3.amr.corp.intel.com> References: <165237925642.3832067.15995008431029494571.stgit@dwillia2-desk3.amr.corp.intel.com> <165237926188.3832067.15441813087107623945.stgit@dwillia2-desk3.amr.corp.intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml753-chm.china.huawei.com (10.201.108.203) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Thu, 12 May 2022 11:14:21 -0700 Dan Williams wrote: > Media ready is asserted by the device independent of whether mem_enabled > was ever set. Drop this check to allow for dropping wait_for_media() in > favor of ->wait_media_ready(). > > Fixes: 8dd2bc0f8e02 ("cxl/mem: Add the cxl_mem driver") > Signed-off-by: Dan Williams Reviewed-by: Jonathan Cameron > --- > drivers/cxl/mem.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index 401b0fbe21db..c2d9dadf4a2e 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -27,12 +27,8 @@ > static int wait_for_media(struct cxl_memdev *cxlmd) > { > struct cxl_dev_state *cxlds = cxlmd->cxlds; > - struct cxl_endpoint_dvsec_info *info = &cxlds->info; > int rc; > > - if (!info->mem_enabled) > - return -EBUSY; > - > rc = cxlds->wait_media_ready(cxlds); > if (rc) > return rc; >