Commit Graph

5 Commits

Author SHA1 Message Date
Ioana Radulescu 0f4e601467 staging: fsl-mc/dpio: Fix cast truncate warning
Sparse reports the following warning:
drivers/staging/fsl-mc/include/dpaa2-fd.h:421:30:
warning: cast truncates bits from constant value (ffff7fff becomes 7fff)

Fix this by explicitly masking the value with 0xffff.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08 09:57:37 -08:00
Ioana Radulescu c674f4aab4 staging: fsl-mc/dpio: Fix incorrect cast
Move the cast in dpaa2_sg_get_addr() to the right place.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08 09:56:15 -08:00
Bogdan Purcareata 203e2de32b staging: fsl-mc: Add SPDX license identifiers
The fsl-mc bus and dpio driver files use a combination of GPL-2.0 and
GPL-2.0+ OR BSD-3-Clause licenses. Add SPDX tags and delete the full
license text, keeping the existing license for each file. Add GPL-2.0
for Kconfig / Makefile, where not present.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-22 11:45:21 +01:00
Horia Geantă 11270059e8 staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd
While dpaa2_fd.simple structure fields are marked __leXX,
corresponding cpu_to_leXX / leXX_to_cpu conversions are missing.

While here, fix dpaa2_fd_{get,set}_bpid such that BMT, IVP bits
sharing the 16-bit field with BPID are not affected.

Fixes: d3269bdc7e ("bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28 17:51:54 +02:00
Roy Pledge d3269bdc7e bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs
Add global definitions for DPAA2 frame descriptors and scatter
gather entries.

Signed-off-by: Roy Pledge <Roy.Pledge@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14 11:19:52 +08:00