RE: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch
-Original Message- From: Greg KH [mailto:gre...@linuxfoundation.org] Sent: Thursday, March 1, 2018 6:32 PM To: Ruxandra Ioana Ciocoi Radulescu Cc: de...@driverdev.osuosl.org; Roy Pledge ; Bogdan Purcareata ; linux-kernel@vger.kernel.org; Laurentiu Tudor Subject: Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch On Mon, Feb 26, 2018 at 10:28:07AM -0600, Ioana Radulescu wrote: > Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), > thus allowing this driver to compile on all architectures supported by > the fsl-mc bus driver. > > This was compile tested on: > - powerpc (corenet_basic_defconfig, ppc64_defconfig) > - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) > - arm64 (defconfig) Seems you need to compile it on more things, based on the kbuild warnings :( Yes I do, sorry for the slip :( I've added allmodconfig and the sparse endianness flag to my list of tests. Will send a v2 early next week. Thanks, Ioana
Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch
On Mon, Feb 26, 2018 at 10:28:07AM -0600, Ioana Radulescu wrote: > Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), > thus allowing this driver to compile on all architectures supported > by the fsl-mc bus driver. > > This was compile tested on: > - powerpc (corenet_basic_defconfig, ppc64_defconfig) > - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) > - arm64 (defconfig) Seems you need to compile it on more things, based on the kbuild warnings :( Please fix up and resend. thanks, greg k-h
Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch
Hi Ioana, I love your patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.16-rc3 next-20180227] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ioana-Radulescu/staging-fsl-mc-dpio-fsl-dpaa2-eth-Enable-multi-arch-compile/20180228-062457 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: >> sparse: cast from restricted __le64 >> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: >> sparse: cast to restricted __le64 >> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: >> sparse: cast from restricted __le64 >> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:290:16: >> sparse: cast to restricted __le64 >> drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h:421:30: >> sparse: cast truncates bits from constant value (7fff becomes 7fff) -- >> drivers/staging/fsl-dpaa2/ethernet/dpni.c:1624:22: sparse: cast to >> restricted __le16 drivers/staging/fsl-dpaa2/ethernet/dpni.c:1625:22: sparse: cast to restricted __le16 vim +290 drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-fd.h d3269bdc Roy Pledge 2017-03-13 281 d3269bdc Roy Pledge 2017-03-13 282 /** d3269bdc Roy Pledge 2017-03-13 283 * dpaa2_sg_get_addr() - Get the address from SG entry d3269bdc Roy Pledge 2017-03-13 284 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 285 * d3269bdc Roy Pledge 2017-03-13 286 * Return the address. d3269bdc Roy Pledge 2017-03-13 287 */ d3269bdc Roy Pledge 2017-03-13 288 static inline dma_addr_t dpaa2_sg_get_addr(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 289 { d3269bdc Roy Pledge 2017-03-13 @290 return le64_to_cpu((dma_addr_t)sg->addr); d3269bdc Roy Pledge 2017-03-13 291 } d3269bdc Roy Pledge 2017-03-13 292 d3269bdc Roy Pledge 2017-03-13 293 /** d3269bdc Roy Pledge 2017-03-13 294 * dpaa2_sg_set_addr() - Set the address in SG entry d3269bdc Roy Pledge 2017-03-13 295 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 296 * @addr: the address to be set d3269bdc Roy Pledge 2017-03-13 297 */ d3269bdc Roy Pledge 2017-03-13 298 static inline void dpaa2_sg_set_addr(struct dpaa2_sg_entry *sg, dma_addr_t addr) d3269bdc Roy Pledge 2017-03-13 299 { d3269bdc Roy Pledge 2017-03-13 300 sg->addr = cpu_to_le64(addr); d3269bdc Roy Pledge 2017-03-13 301 } d3269bdc Roy Pledge 2017-03-13 302 d3269bdc Roy Pledge 2017-03-13 303 static inline bool dpaa2_sg_short_len(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 304 { d3269bdc Roy Pledge 2017-03-13 305 return !!((le16_to_cpu(sg->format_offset) >> SG_SHORT_LEN_FLAG_SHIFT) d3269bdc Roy Pledge 2017-03-13 306 & SG_SHORT_LEN_FLAG_MASK); d3269bdc Roy Pledge 2017-03-13 307 } d3269bdc Roy Pledge 2017-03-13 308 d3269bdc Roy Pledge 2017-03-13 309 /** d3269bdc Roy Pledge 2017-03-13 310 * dpaa2_sg_get_len() - Get the length in SG entry d3269bdc Roy Pledge 2017-03-13 311 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 312 * d3269bdc Roy Pledge 2017-03-13 313 * Return the length. d3269bdc Roy Pledge 2017-03-13 314 */ d3269bdc Roy Pledge 2017-03-13 315 static inline u32 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 316 { d3269bdc Roy Pledge 2017-03-13 317 if (dpaa2_sg_short_len(sg)) d3269bdc Roy Pledge 2017-03-13 318 return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK; d3269bdc Roy Pledge 2017-03-13 319 d3269bdc Roy Pledge 2017-03-13 320 return le32_to_cpu(sg->len); d3269bdc Roy Pledge 2017-03-13 321 } d3269bdc Roy Pledge 2017-03-13 322 d3269bdc Roy Pledge 2017-03-13 323 /** d3269bdc Roy Pledge 2017-03-13 324 * dpaa2_sg_set_len() - Set the length in SG entry d3269bdc Roy Pledge 2017-03-13 325 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 326 * @len: the length to be set d3269bdc Roy Pledge 2017-03-13 327 */ d3269bdc Roy Pledge 2017-03-13 328 static inline void dpaa2_sg_set_len(struct dpaa2_sg_entry *sg, u32 len) d3269bdc Roy Pledge 2017-03-13 329 { d3269bdc Roy Pledge 2017-03-13 330 sg->len = cpu_to_le32(len); d3269bdc Roy Pledge 2017-03-13 331 } d3269bdc Roy Pledge 2017-03-13 332 d3269bdc Roy Pledge 2017-03-13 333 /** d3269bdc Roy Pledge 2017-03-13 334 * dpaa2_sg_get_offset() - Get the offset in SG entry d3269bdc Roy Pledge 2017-03-13 335 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 336 * d3269bdc Roy Pledge 2017-03-13 337 * Return the offset. d3269bdc Roy Pledge 2017-