From: Dan Carpenter <dan.carpenter@oracle.com>
To: Patrice CHOTARD <patrice.chotard@st.com>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Loic PALLARDY <loic.pallardy@st.com>
Subject: Re: [PATCH] remoteproc: fix a.vs ~ typo
Date: Thu, 20 Dec 2018 10:14:02 +0000 [thread overview]
Message-ID: <20181220101402.GQ19692@kadam> (raw)
In-Reply-To: <5ed56497-be6f-f4e2-642d-47e2b0f45f42@st.com>
On Thu, Dec 20, 2018 at 10:05:55AM +0000, Patrice CHOTARD wrote:
> > - writel(!SLIM_EN_RUN, slim_rproc->slimcore + SLIM_EN_OFST);
> > + writel((unsigned int)~SLIM_EN_RUN, slim_rproc->slimcore + SLIM_EN_OFST);
> >
> > val = readl(slim_rproc->slimcore + SLIM_EN_OFST);
> > if (val & SLIM_EN_RUN)
> >
>
> Writing !SLIM_CLK_GATE_DIS or (unsigned int)~SLIM_CLK_GATE_DIS don't
> give the same result:
>
> !SLIM_CLK_GATE_DIS = 0
>
> (unsigned int)~SLIM_CLK_GATE_DIS = 0xfffffffe
Right. !BIT(0) is zero. I'm pretty sure we meant to do a bitwise
negate and not a logical negate from looking at the code, but I don't
know the real world impact and can't test it. It's kind of a crap
patch, but I think it's correct.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Patrice CHOTARD <patrice.chotard@st.com>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Loic PALLARDY <loic.pallardy@st.com>
Subject: Re: [PATCH] remoteproc: fix a ! vs ~ typo
Date: Thu, 20 Dec 2018 13:14:02 +0300 [thread overview]
Message-ID: <20181220101402.GQ19692@kadam> (raw)
In-Reply-To: <5ed56497-be6f-f4e2-642d-47e2b0f45f42@st.com>
On Thu, Dec 20, 2018 at 10:05:55AM +0000, Patrice CHOTARD wrote:
> > - writel(!SLIM_EN_RUN, slim_rproc->slimcore + SLIM_EN_OFST);
> > + writel((unsigned int)~SLIM_EN_RUN, slim_rproc->slimcore + SLIM_EN_OFST);
> >
> > val = readl(slim_rproc->slimcore + SLIM_EN_OFST);
> > if (val & SLIM_EN_RUN)
> >
>
> Writing !SLIM_CLK_GATE_DIS or (unsigned int)~SLIM_CLK_GATE_DIS don't
> give the same result:
>
> !SLIM_CLK_GATE_DIS = 0
>
> (unsigned int)~SLIM_CLK_GATE_DIS = 0xfffffffe
Right. !BIT(0) is zero. I'm pretty sure we meant to do a bitwise
negate and not a logical negate from looking at the code, but I don't
know the real world impact and can't test it. It's kind of a crap
patch, but I think it's correct.
regards,
dan carpenter
next prev parent reply other threads:[~2018-12-20 10:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 8:16 [PATCH] remoteproc: fix a.vs ~ typo Dan Carpenter
2018-12-18 8:16 ` [PATCH] remoteproc: fix a ! vs " Dan Carpenter
2018-12-20 10:05 ` [PATCH] remoteproc: fix a.vs " Patrice CHOTARD
2018-12-20 10:05 ` [PATCH] remoteproc: fix a ! vs " Patrice CHOTARD
2018-12-20 10:14 ` Dan Carpenter [this message]
2018-12-20 10:14 ` Dan Carpenter
2018-12-20 10:17 ` [PATCH] remoteproc: fix a.vs " Dan Carpenter
2018-12-20 10:17 ` [PATCH] remoteproc: fix a ! vs " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181220101402.GQ19692@kadam \
--to=dan.carpenter@oracle.com \
--cc=bjorn.andersson@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=ohad@wizery.com \
--cc=patrice.chotard@st.com \
--cc=peter.griffin@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.