Subject: Re: [PATCH] cxl: use correct operator when writing pcie config space values

From: Michael Ellerman <[email-masked]>
Date: Fri, 06 Nov 2015 10:43:42 +1100

On Fri, 2015-11-06 at 10:05 +1100, Daniel Axtens wrote:

> Andrew Donnellan <[email-masked]> writes:
> 

> > When writing a value to config space, cxl_pcie_write_config() calls
> > cxl_pcie_config_info() to obtain a mask and shift value, shifts the new
> > value accordingly, then uses the mask to combine the shifted value with the
> > existing value at the address as part of a read-modify-write pattern.
> > 
> > Currently, we use a logical OR operator rather than a bitwise OR operator,
> > which means any use of this function results in an incorrect value being
> > written. Replace the logical OR operator with a bitwise OR operator so the
> > value is written correctly.
> > 
> > Reported-by: Michael Ellerman <[email-masked]>
> > Cc: [email-masked]
> 
> Given that there are no current users of this function, does this need
> to go to stable? Does it actually fix a real (as opposed to theoretical)
> bug?

If it's unused *and* broken then we should just remove it.

cheers