diff mbox series

[v2,8/8] cxl: remove locked check for dvsec_range_allowed()

Message ID 167330065180.975161.18302590071676919347.stgit@djiang5-mobl3.local
State Superseded
Headers show
Series cxl: Introduce HDM decoder emulation from DVSEC range registers | expand

Commit Message

Dave Jiang Jan. 9, 2023, 9:44 p.m. UTC
There is no reason that the CFMWS will always set the "Fixed Device
Configuration" bit in the "Window Restrictions" field. Remove the
CXL_DECODER_F_LOCK check.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/cxl/core/pci.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Jonathan Cameron Jan. 13, 2023, 2:08 p.m. UTC | #1
On Mon, 09 Jan 2023 14:44:13 -0700
Dave Jiang <dave.jiang@intel.com> wrote:

> There is no reason that the CFMWS will always set the "Fixed Device
> Configuration" bit in the "Window Restrictions" field. Remove the
> CXL_DECODER_F_LOCK check.
> 
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Makes sense to me though I'd be curious why someone added the check in
the first place...
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/cxl/core/pci.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
> index c6d6d7b720c5..931ac4be539a 100644
> --- a/drivers/cxl/core/pci.c
> +++ b/drivers/cxl/core/pci.c
> @@ -228,8 +228,6 @@ static int dvsec_range_allowed(struct device *dev, void *arg)
>  
>  	cxld = to_cxl_decoder(dev);
>  
> -	if (!(cxld->flags & CXL_DECODER_F_LOCK))
> -		return 0;
>  	if (!(cxld->flags & CXL_DECODER_F_RAM))
>  		return 0;
>  
> 
>
diff mbox series

Patch

diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index c6d6d7b720c5..931ac4be539a 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -228,8 +228,6 @@  static int dvsec_range_allowed(struct device *dev, void *arg)
 
 	cxld = to_cxl_decoder(dev);
 
-	if (!(cxld->flags & CXL_DECODER_F_LOCK))
-		return 0;
 	if (!(cxld->flags & CXL_DECODER_F_RAM))
 		return 0;