Received: by 10.223.185.116 with SMTP id b49csp5717036wrg; Tue, 27 Feb 2018 19:44:38 -0800 (PST) X-Google-Smtp-Source: AH8x227z2jgamWehZN331KNJZarV9rbkvM4M5K3YWQt6BYjT0qp/e8c+LNpP0WvSSpmjp33p7zUf X-Received: by 2002:a17:902:8f95:: with SMTP id z21-v6mr16528729plo.132.1519789478740; Tue, 27 Feb 2018 19:44:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519789478; cv=none; d=google.com; s=arc-20160816; b=J5aaBLqKLqWgSNE1ol761hqcVc2kdG2XZyW+W/nBYnuhaIM6/h8oaH43xLdjUpDYqk t9DZkZwmqMJp3SEAaIe7AmtsM9XMF9+U+x6tgtD1aD3jvx5qriNX2BYmqCKUTWIt5KdN qKFDTesFHvEchGXUNUySknzGz01uMnnMdWJpckdVh9qdsAiBwgfIaVCndOH+g8LfS7kL JvRspxjXKpmXyH5qDNZ1x0Q1LOq/oPk5FAB7SAbFe275yzEiT6k5QYuFlCz57TBzx2Lr dYSYa3ZLlNaWw6RmSxoHHP8VeSoWb5wkpKtjAEDzzw+c1ih/9cjroBrAVZfjuBDAVx5y nhdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=FOLEEIbcRONmluB+DkDhcki0dwXXlQum/O2ilCbvSmA=; b=bEebFZl9n5Ese7tYAgVQBo/i8Lxo3rq4TPR1leXsXr4BRWSjQqA0Q+0zMx2zkLeoiv 18EUf8j3XhmHuHHgsx/Bg1nhJE5SOkwv+Q14VHVNv+kNnb1ua6V9rLeW083JtIbj1BIu gyGsL7JkFN+0oPtqHIaqWQFFQ4LqW/EytW2GUKCt/yYhRK3tpyNrnmPUmCeY73el5OPT juuORaTr7XFBjDiFR0dWFyanFr6RxrB5Ai4ggVNkZaLCbZxdJIdboe+9+u5P+N/yjTjO 8lbuIvdvlqS4vr6jzGp41nU1GtViok5sbWy7J9zVMMBZKIZR5OXb3z4rI3EfKwKkCoC5 FBlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si541622plp.193.2018.02.27.19.44.23; Tue, 27 Feb 2018 19:44:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751721AbeB1Dns (ORCPT + 99 others); Tue, 27 Feb 2018 22:43:48 -0500 Received: from mga12.intel.com ([192.55.52.136]:61486 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbeB1Dnr (ORCPT ); Tue, 27 Feb 2018 22:43:47 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 19:43:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="204287486" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga005.jf.intel.com with ESMTP; 27 Feb 2018 19:43:44 -0800 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1eqsem-000DIo-GF; Wed, 28 Feb 2018 11:43:52 +0800 Date: Wed, 28 Feb 2018 11:43:30 +0800 From: kbuild test robot To: Ioana Radulescu Cc: kbuild-all@01.org, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, roy.pledge@nxp.com, bogdan.purcareata@nxp.com, linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com Subject: Re: [PATCH 4/4] staging: fsl-dpaa2/eth: allow the driver to compile multi-arch Message-ID: <201802281140.9iVUkdHa%fengguang.wu@intel.com> References: <20180226162807.20649-5-ruxandra.radulescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180226162807.20649-5-ruxandra.radulescu@nxp.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (ffff7fff 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-03-13 338 */ d3269bdc Roy Pledge 2017-03-13 339 static inline u16 dpaa2_sg_get_offset(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 340 { d3269bdc Roy Pledge 2017-03-13 341 return le16_to_cpu(sg->format_offset) & SG_OFFSET_MASK; d3269bdc Roy Pledge 2017-03-13 342 } d3269bdc Roy Pledge 2017-03-13 343 d3269bdc Roy Pledge 2017-03-13 344 /** d3269bdc Roy Pledge 2017-03-13 345 * dpaa2_sg_set_offset() - Set the offset in SG entry d3269bdc Roy Pledge 2017-03-13 346 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 347 * @offset: the offset to be set d3269bdc Roy Pledge 2017-03-13 348 */ d3269bdc Roy Pledge 2017-03-13 349 static inline void dpaa2_sg_set_offset(struct dpaa2_sg_entry *sg, d3269bdc Roy Pledge 2017-03-13 350 u16 offset) d3269bdc Roy Pledge 2017-03-13 351 { d3269bdc Roy Pledge 2017-03-13 352 sg->format_offset &= cpu_to_le16(~SG_OFFSET_MASK); d3269bdc Roy Pledge 2017-03-13 353 sg->format_offset |= cpu_to_le16(offset); d3269bdc Roy Pledge 2017-03-13 354 } d3269bdc Roy Pledge 2017-03-13 355 d3269bdc Roy Pledge 2017-03-13 356 /** d3269bdc Roy Pledge 2017-03-13 357 * dpaa2_sg_get_format() - Get the SG format in SG entry d3269bdc Roy Pledge 2017-03-13 358 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 359 * d3269bdc Roy Pledge 2017-03-13 360 * Return the format. d3269bdc Roy Pledge 2017-03-13 361 */ d3269bdc Roy Pledge 2017-03-13 362 static inline enum dpaa2_sg_format d3269bdc Roy Pledge 2017-03-13 363 dpaa2_sg_get_format(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 364 { d3269bdc Roy Pledge 2017-03-13 365 return (enum dpaa2_sg_format)((le16_to_cpu(sg->format_offset) d3269bdc Roy Pledge 2017-03-13 366 >> SG_FORMAT_SHIFT) & SG_FORMAT_MASK); d3269bdc Roy Pledge 2017-03-13 367 } d3269bdc Roy Pledge 2017-03-13 368 d3269bdc Roy Pledge 2017-03-13 369 /** d3269bdc Roy Pledge 2017-03-13 370 * dpaa2_sg_set_format() - Set the SG format in SG entry d3269bdc Roy Pledge 2017-03-13 371 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 372 * @format: the format to be set d3269bdc Roy Pledge 2017-03-13 373 */ d3269bdc Roy Pledge 2017-03-13 374 static inline void dpaa2_sg_set_format(struct dpaa2_sg_entry *sg, d3269bdc Roy Pledge 2017-03-13 375 enum dpaa2_sg_format format) d3269bdc Roy Pledge 2017-03-13 376 { d3269bdc Roy Pledge 2017-03-13 377 sg->format_offset &= cpu_to_le16(~(SG_FORMAT_MASK << SG_FORMAT_SHIFT)); d3269bdc Roy Pledge 2017-03-13 378 sg->format_offset |= cpu_to_le16(format << SG_FORMAT_SHIFT); d3269bdc Roy Pledge 2017-03-13 379 } d3269bdc Roy Pledge 2017-03-13 380 d3269bdc Roy Pledge 2017-03-13 381 /** d3269bdc Roy Pledge 2017-03-13 382 * dpaa2_sg_get_bpid() - Get the buffer pool id in SG entry d3269bdc Roy Pledge 2017-03-13 383 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 384 * d3269bdc Roy Pledge 2017-03-13 385 * Return the bpid. d3269bdc Roy Pledge 2017-03-13 386 */ d3269bdc Roy Pledge 2017-03-13 387 static inline u16 dpaa2_sg_get_bpid(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 388 { d3269bdc Roy Pledge 2017-03-13 389 return le16_to_cpu(sg->bpid) & SG_BPID_MASK; d3269bdc Roy Pledge 2017-03-13 390 } d3269bdc Roy Pledge 2017-03-13 391 d3269bdc Roy Pledge 2017-03-13 392 /** d3269bdc Roy Pledge 2017-03-13 393 * dpaa2_sg_set_bpid() - Set the buffer pool id in SG entry d3269bdc Roy Pledge 2017-03-13 394 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 395 * @bpid: the bpid to be set d3269bdc Roy Pledge 2017-03-13 396 */ d3269bdc Roy Pledge 2017-03-13 397 static inline void dpaa2_sg_set_bpid(struct dpaa2_sg_entry *sg, u16 bpid) d3269bdc Roy Pledge 2017-03-13 398 { d3269bdc Roy Pledge 2017-03-13 399 sg->bpid &= cpu_to_le16(~(SG_BPID_MASK)); d3269bdc Roy Pledge 2017-03-13 400 sg->bpid |= cpu_to_le16(bpid); d3269bdc Roy Pledge 2017-03-13 401 } d3269bdc Roy Pledge 2017-03-13 402 d3269bdc Roy Pledge 2017-03-13 403 /** d3269bdc Roy Pledge 2017-03-13 404 * dpaa2_sg_is_final() - Check final bit in SG entry d3269bdc Roy Pledge 2017-03-13 405 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 406 * d3269bdc Roy Pledge 2017-03-13 407 * Return bool. d3269bdc Roy Pledge 2017-03-13 408 */ d3269bdc Roy Pledge 2017-03-13 409 static inline bool dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg) d3269bdc Roy Pledge 2017-03-13 410 { d3269bdc Roy Pledge 2017-03-13 411 return !!(le16_to_cpu(sg->format_offset) >> SG_FINAL_FLAG_SHIFT); d3269bdc Roy Pledge 2017-03-13 412 } d3269bdc Roy Pledge 2017-03-13 413 d3269bdc Roy Pledge 2017-03-13 414 /** d3269bdc Roy Pledge 2017-03-13 415 * dpaa2_sg_set_final() - Set the final bit in SG entry d3269bdc Roy Pledge 2017-03-13 416 * @sg: the given scatter-gathering object d3269bdc Roy Pledge 2017-03-13 417 * @final: the final boolean to be set d3269bdc Roy Pledge 2017-03-13 418 */ d3269bdc Roy Pledge 2017-03-13 419 static inline void dpaa2_sg_set_final(struct dpaa2_sg_entry *sg, bool final) d3269bdc Roy Pledge 2017-03-13 420 { d3269bdc Roy Pledge 2017-03-13 @421 sg->format_offset &= cpu_to_le16(~(SG_FINAL_FLAG_MASK d3269bdc Roy Pledge 2017-03-13 422 << SG_FINAL_FLAG_SHIFT)); d3269bdc Roy Pledge 2017-03-13 423 sg->format_offset |= cpu_to_le16(final << SG_FINAL_FLAG_SHIFT); d3269bdc Roy Pledge 2017-03-13 424 } d3269bdc Roy Pledge 2017-03-13 425 :::::: The code at line 290 was first introduced by commit :::::: d3269bdc7ebcf8bce7969a68d7108ec5890d8173 bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs :::::: TO: Roy Pledge :::::: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation