From: Michal Simek <michal.simek@xilinx.com>
To: Dhaval Rajeshbhai Shah <dhaval.shah@xilinx.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
Michal Simek <michal.simek@xilinx.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on clkoutdiv
Date: Tue, 16 Jan 2018 15:50:04 +0100 [thread overview]
Message-ID: <f3bb9fc3-2ba8-459d-a9f2-7c222b7a2dff@xilinx.com> (raw)
In-Reply-To: <SN4PR0201MB3535C5F4A553730F0CFF9441C1EA0@SN4PR0201MB3535.namprd02.prod.outlook.com>
On 16.1.2018 15:22, Dhaval Rajeshbhai Shah wrote:
> Hi,
>
>> -----Original Message-----
>> From: Gustavo A. R. Silva [mailto:garsilva@embeddedor.com]
>> Sent: Monday, January 15, 2018 11:15 AM
>> To: Michal Simek <michal.simek@xilinx.com>; Dhaval Rajeshbhai Shah
>> <DSHAH@xilinx.com>
>> Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
>> Gustavo A. R. Silva <garsilva@embeddedor.com>
>> Subject: [PATCH] soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on
>> clkoutdiv
>>
>> Currently clkoutdiv is being operated on by a logical && operator rather than a
>> bitwise & operator. This looks incorrect as these should be bit flag operations.
>>
>> Addresses-Coverity-ID: 1463959 ("Logical vs. bitwise operator")
>> Fixes: cee8113a295a ("soc: xilinx: xlnx_vcu: Add Xilinx ZYNQMP VCU logicoreIP
>> init driver")
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>> drivers/soc/xilinx/xlnx_vcu.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/xilinx/xlnx_vcu.c b/drivers/soc/xilinx/xlnx_vcu.c index
>> c1d6f1b..a840c02 100644
>> --- a/drivers/soc/xilinx/xlnx_vcu.c
>> +++ b/drivers/soc/xilinx/xlnx_vcu.c
>> @@ -334,7 +334,7 @@ static int xvcu_set_vcu_pll_info(struct xvcu_device
>> *xvcu)
>> */
>> vcu_pll_ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_CTRL);
>> clkoutdiv = vcu_pll_ctrl >> VCU_PLL_CTRL_CLKOUTDIV_SHIFT;
>> -clkoutdiv = clkoutdiv && VCU_PLL_CTRL_CLKOUTDIV_MASK;
>> +clkoutdiv = clkoutdiv & VCU_PLL_CTRL_CLKOUTDIV_MASK;
>> if (clkoutdiv != 1) {
>> dev_err(xvcu->dev, "clkoutdiv value is invalid\n");
>> return -EINVAL;
>> --
>> 2.7.4
>
> Acked-by: Dhaval Shah <dshah@xilinx.com>
Applied.
Thanks,
Michal
next prev parent reply other threads:[~2018-01-16 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 19:15 Gustavo A. R. Silva
2018-01-16 14:22 ` Dhaval Rajeshbhai Shah
2018-01-16 14:50 ` Michal Simek [this message]
2018-01-16 17:04 ` Gustavo A. R. Silva
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=f3bb9fc3-2ba8-459d-a9f2-7c222b7a2dff@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=dhaval.shah@xilinx.com \
--cc=garsilva@embeddedor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®