From: Dan Carpenter <dan.carpenter@oracle.com>
To: anurag.kumar.vulisha@xilinx.com
Cc: linux-ide@vger.kernel.org
Subject: [bug report] ata: ceva: Move sata port phy oob settings to device-tree
Date: Tue, 7 Nov 2017 14:41:43 +0300 [thread overview]
Message-ID: <20171107114142.x6bufnfrr5bnb4vg@mwanda> (raw)
Hello Anurag Kumar Vulisha,
The patch fe8365bbf8ac: "ata: ceva: Move sata port phy oob settings
to device-tree" from Aug 21, 2017, leads to the following static
checker warning:
drivers/ata/ahci_ceva.c:273 ceva_ahci_probe()
warn: passing casted pointer '&cevapriv->pp5c[1]' to 'of_property_read_u16_array()' 32 vs 16.
drivers/ata/ahci_ceva.c
260 if (of_property_read_u8_array(np, "ceva,p1-burst-params",
261 (u8 *)&cevapriv->pp4c[1], 4) < 0) {
262 dev_warn(dev, "ceva,p1-burst-params property not defined\n");
263 return -EINVAL;
264 }
265
266 /* Read phy RETRY interval timing value from device-tree */
267 if (of_property_read_u16_array(np, "ceva,p0-retry-params",
268 (u16 *)&cevapriv->pp5c[0], 2) < 0) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
269 dev_warn(dev, "ceva,p0-retry-params property not defined\n");
270 return -EINVAL;
271 }
272
273 if (of_property_read_u16_array(np, "ceva,p1-retry-params",
274 (u16 *)&cevapriv->pp5c[1], 2) < 0) {
^^^^^^^^^^^^^^^^^^^^^^^^^
I'm confused what's going on here. We're reading two arrays of u16 into
an array of u32. Why are we not just reading 2 separate u32 values?
Does this code have to work on big endian systems because I bet it
doesn't.
275 dev_warn(dev, "ceva,p1-retry-params property not defined\n");
276 return -EINVAL;
277 }
278
regards,
dan carpenter
next reply other threads:[~2017-11-07 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 11:41 Dan Carpenter [this message]
2017-11-07 12:31 ` [bug report] ata: ceva: Move sata port phy oob settings to device-tree Anurag Kumar Vulisha
2017-11-07 12:38 ` 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=20171107114142.x6bufnfrr5bnb4vg@mwanda \
--to=dan.carpenter@oracle.com \
--cc=anurag.kumar.vulisha@xilinx.com \
--cc=linux-ide@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