* [PATCH] cxl/mbox: fix logical vs bitwise typo
@ 2022-04-28 9:38 Dan Carpenter
2022-04-28 17:01 ` Dan Williams
2022-04-29 2:37 ` Alison Schofield
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-04-28 9:38 UTC (permalink / raw)
To: Alison Schofield
Cc: Vishal Verma, Ira Weiny, Ben Widawsky, Dan Williams,
Jonathan Cameron, Davidlohr Bueso, linux-cxl, kernel-janitors
This should be bitwise & instead of &&.
Fixes: 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/cxl/core/mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index 731cb43b570e..54f434733b56 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)
case CXL_MBOX_OP_SET_PARTITION_INFO: {
struct cxl_mbox_set_partition_info *pi = payload_in;
- if (pi->flags && CXL_SET_PARTITION_IMMEDIATE_FLAG)
+ if (pi->flags & CXL_SET_PARTITION_IMMEDIATE_FLAG)
return false;
break;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl/mbox: fix logical vs bitwise typo
2022-04-28 9:38 [PATCH] cxl/mbox: fix logical vs bitwise typo Dan Carpenter
@ 2022-04-28 17:01 ` Dan Williams
2022-04-29 2:37 ` Alison Schofield
1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2022-04-28 17:01 UTC (permalink / raw)
To: Dan Carpenter
Cc: Alison Schofield, Vishal Verma, Ira Weiny, Ben Widawsky,
Jonathan Cameron, Davidlohr Bueso, linux-cxl, kernel-janitors
On Thu, Apr 28, 2022 at 2:39 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> This should be bitwise & instead of &&.
>
> Fixes: 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks Dan, good find.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl/mbox: fix logical vs bitwise typo
2022-04-28 9:38 [PATCH] cxl/mbox: fix logical vs bitwise typo Dan Carpenter
2022-04-28 17:01 ` Dan Williams
@ 2022-04-29 2:37 ` Alison Schofield
2022-05-06 13:50 ` Dan Carpenter
1 sibling, 1 reply; 4+ messages in thread
From: Alison Schofield @ 2022-04-29 2:37 UTC (permalink / raw)
To: Dan Carpenter
Cc: Verma, Vishal L, Weiny, Ira, Widawsky, Ben, Williams, Dan J,
Jonathan Cameron, Davidlohr Bueso, linux-cxl, kernel-janitors
On Thu, Apr 28, 2022 at 02:38:25AM -0700, Dan Carpenter wrote:
> This should be bitwise & instead of &&.
Thanks Dan. How'd you find this?
>
> Fixes: 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/cxl/core/mbox.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index 731cb43b570e..54f434733b56 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)
> case CXL_MBOX_OP_SET_PARTITION_INFO: {
> struct cxl_mbox_set_partition_info *pi = payload_in;
>
> - if (pi->flags && CXL_SET_PARTITION_IMMEDIATE_FLAG)
> + if (pi->flags & CXL_SET_PARTITION_IMMEDIATE_FLAG)
> return false;
> break;
> }
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl/mbox: fix logical vs bitwise typo
2022-04-29 2:37 ` Alison Schofield
@ 2022-05-06 13:50 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-05-06 13:50 UTC (permalink / raw)
To: Alison Schofield
Cc: Verma, Vishal L, Weiny, Ira, Widawsky, Ben, Williams, Dan J,
Jonathan Cameron, Davidlohr Bueso, linux-cxl, kernel-janitors
On Thu, Apr 28, 2022 at 07:37:00PM -0700, Alison Schofield wrote:
> On Thu, Apr 28, 2022 at 02:38:25AM -0700, Dan Carpenter wrote:
> > This should be bitwise & instead of &&.
>
> Thanks Dan. How'd you find this?
>
Sorry for the delayed response. This was from some Smatch work that I
hadn't published yet. I've pushed it now.
It doesn't find anything else though.
regards,
dan carpenter
> >
> > Fixes: 6179045ccc0c ("cxl/mbox: Block immediate mode in SET_PARTITION_INFO command")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > drivers/cxl/core/mbox.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> > index 731cb43b570e..54f434733b56 100644
> > --- a/drivers/cxl/core/mbox.c
> > +++ b/drivers/cxl/core/mbox.c
> > @@ -243,7 +243,7 @@ static bool cxl_payload_from_user_allowed(u16 opcode, void *payload_in)
> > case CXL_MBOX_OP_SET_PARTITION_INFO: {
> > struct cxl_mbox_set_partition_info *pi = payload_in;
> >
> > - if (pi->flags && CXL_SET_PARTITION_IMMEDIATE_FLAG)
> > + if (pi->flags & CXL_SET_PARTITION_IMMEDIATE_FLAG)
> > return false;
> > break;
> > }
> > --
> > 2.35.1
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-06 13:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 9:38 [PATCH] cxl/mbox: fix logical vs bitwise typo Dan Carpenter
2022-04-28 17:01 ` Dan Williams
2022-04-29 2:37 ` Alison Schofield
2022-05-06 13:50 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).