From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA00CC3A5A7 for ; Thu, 8 Dec 2022 09:05:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49EC18E0003; Thu, 8 Dec 2022 04:05:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44F368E0001; Thu, 8 Dec 2022 04:05:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 316C48E0003; Thu, 8 Dec 2022 04:05:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 23AB68E0001 for ; Thu, 8 Dec 2022 04:05:00 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E782BC0F48 for ; Thu, 8 Dec 2022 09:04:59 +0000 (UTC) X-FDA: 80218554318.16.676EFB1 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf25.hostedemail.com (Postfix) with ESMTP id 62044A001F for ; Thu, 8 Dec 2022 09:04:57 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=CpStkrs9; spf=pass (imf25.hostedemail.com: domain of rong.a.chen@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=rong.a.chen@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670490298; a=rsa-sha256; cv=none; b=qutN4Pp0wgl5/O3+HSx2p4ARdf+PE24TSFcrRK4r2kuQaXC3q8mrX3pm/b5kT3FL0K2z+g TnDkkbairFyaO+DRHIrgBLDuWaTHD/+Z7WZyLnXMOtGKVJky0tRgwec7VNNBusXe7uIE4D yVw65C9vjrWs6grr72zVA+VulzVLZKo= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=CpStkrs9; spf=pass (imf25.hostedemail.com: domain of rong.a.chen@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=rong.a.chen@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670490298; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OaJzQMj2C9K/cNRTvREWkxBNSxguCPI72VDXGw1kJbI=; b=CL+bgS5Q75BFYMSWy5j4BRivZPfySVaePMWl1+WNdB4WoodttPZRhhZUs+jmFCQPQ2WjLN CaEbAp8l36JLiY8Cqza9bLM/PumALUwkz3SWeoQSHU+k/SLsrCr3bAWSk57bUIUGZ5wlgr NvuCxPiyU4bDCm+sG2EQfU8WVQbWUEw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670490297; x=1702026297; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=a6vkwZSA6/oadYV/o3Z42RiyjF6U3/79UY6HJ4cesJ4=; b=CpStkrs9605K/x7zX6ScBWp01vTuGx9ppuYuFx3NNlV9pf3jnF8we4HI GnxzlK7AA+HR4SzBK+O14FwSAm6Z1lZs4Rzw7moDsNcQA2lIg2e9E1Pd1 M28CyklhivOOqKjLQaozfuov5I2BU7wdIEjJEEAnHaH53lRpNnzTrArW1 k5at6gR9vdctaYr0v8FXLcvJVl8mIMRu/QuXbRokxIkW8AontNmJfALty qzjU5qhxT3z03R4WHeikwKxo1ZQVi1tmrGSNCoJM3BNMAbvDMFzNlMXDJ 2KNBMAJoZMRAH2OEyNb1XoeHWus6J97t/nrObCIFCSho25wqclKKgVIyw w==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="314769270" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="314769270" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 01:03:20 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="597276816" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="597276816" Received: from rongch2-mobl.ccr.corp.intel.com (HELO [10.254.215.59]) ([10.254.215.59]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 01:03:19 -0800 Subject: Re: [linux-next:master 11969/13282] drivers/net/thunderbolt.c:733:47: sparse: sparse: restricted __le32 degrades to integer To: Andy Shevchenko Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, Linux Memory Management List References: <202212061455.6GE7y0jg-lkp@intel.com> From: "Chen, Rong A" Message-ID: <814dd916-42dc-a6c2-37d6-dc5227cdfc5a@intel.com> Date: Thu, 8 Dec 2022 17:03:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 62044A001F X-Stat-Signature: x4u47bs3r9zdfdyt5rkkkoic4kpcjdwc X-HE-Tag: 1670490297-653004 X-HE-Meta: U2FsdGVkX197wp0EnB2+tc0peOMicsewtJUmrEgW60cpZCrIqTxLxk0iU3eiffUAek5EZUZgdTfGFmLAdO5Bn1aAAaZiiUs4peITrk700MWqMhbP1x1vDneAF05d03mx0kTtyATAlxDmccxWGBcYKos4LqqUMNrqHPk/WBiknX55YLKtcI6S/uyN7OFaP0GpErzgJDnnDEGz3b9OHPzWgHNM2S7NXH9ljL9IKdhQ8FQ8/bsHnDvotkq35et7chJwkh3QqujpopRs7dsq2ZuqVW7He2cxpUy3pjKvZQWGos1ofuq+jEnbLqM7jVJPhC9mw+HckRmt76LjRo4QdPZdRgc0viwXL/6Kn545/JDDghsxEQbSGLny+BYPtlaROIJsA5Ei5IjAi9YgOX8BOwK1VjeJGrA6dTbgWkBdF8wKhrqkQVFS72hDrS4fzOqPOTYq8kVeInZIWb2GRB23fz0EA2z99OoplrS56ROgAColiNcl4oyM+kfMD2Dx+u15t842DLVSfsLdzX9/hHA5dLl14brPGlyuaNS6bUSpgSoXYdigb5oAmDQMj7h/FcEEXGlDne5xyBRfdkCupNtOyYQAYdDjEX4Y20MmPyWr9zx/T0mWhDamazG9a4jo44Gg9rwgbeW4hXXlQe9dPJm6G34kpWwru80GNSaP4chyEcQfzO2Yven8jKoRjxbpEpV1k+3WMEL0kw+E1vyQDBcqJqoaxgy1+DbDn2Y5um1RL4quRQt+KGNIIgKVM1I5wMVE/L+rMhIqmQjpk2ld1ogAPS3gUUcu+9pf0gDlPUsNA7As8ukutHOPBOlJ4ddd10ZPjrUMSFeBLYCVjn4B9RjS8S24RBZY/eUVTZuVHvcUKAaYN5DgrISTr9O+09TfbmnfRZnLqpoXn0VDg4GH+YYaahM1kw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/8/2022 4:47 PM, Andy Shevchenko wrote: > On Thu, Dec 08, 2022 at 03:04:52PM +0800, Chen, Rong A wrote: >> On 12/6/2022 11:07 PM, Andy Shevchenko wrote: >>> On Tue, Dec 06, 2022 at 02:40:16PM +0800, kernel test robot wrote: >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master >>>> head: 5d562c48a21eeb029a8fd3f18e1b31fd83660474 >>>> commit: a479f9264bddfd0c266615b83f784222eccf9b91 [11969/13282] net: thunderbolt: Use bitwise types in the struct thunderbolt_ip_frame_header >>>> config: openrisc-randconfig-s041-20221205 >>>> compiler: or1k-linux-gcc (GCC) 12.1.0 >>>> reproduce: >>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >>>> chmod +x ~/bin/make.cross >>>> # apt-get install sparse >>>> # sparse version: v0.6.4-39-gce1a6720-dirty >>>> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a479f9264bddfd0c266615b83f784222eccf9b91 >>>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >>>> git fetch --no-tags linux-next master >>>> git checkout a479f9264bddfd0c266615b83f784222eccf9b91 >>>> # save the config file >>>> mkdir build_dir && cp config build_dir/.config >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/net/ drivers/nvme/target/ >>>> >>>> If you fix the issue, kindly add following tag where applicable >>>> | Reported-by: kernel test robot >>> >>> Yes, it's expected. The change flip-flopped the warnings. As a result the >>> amount of warnings has been reduced from 17 to 9. >> >> Hi Andy, >> >> Sorry for the inconvenience, we'll add it to our ignore list. > > Ideally you should have compared the warnings before and after the change and > tell something like warnings number dropped or increased to N (arbitrary > number, should be real one based on the parser's output) and leave new warnings > to be produced. Hi Andy, Thanks for your advice, We have similar logic under internal reviewing to avoid such false positive. Best Regards, Rong Chen > >>> (wsum warning is not counted in the above statistics) > > And this warning is still in place, so it shouldn't be reflected in the > statistics. > >>>> sparse warnings: (new ones prefixed by >>) >>>>>> drivers/net/thunderbolt.c:733:47: sparse: sparse: restricted __le32 degrades to integer >>>>>> drivers/net/thunderbolt.c:741:47: sparse: sparse: restricted __le16 degrades to integer >>>> drivers/net/thunderbolt.c:742:44: sparse: sparse: restricted __le16 degrades to integer >>>>>> drivers/net/thunderbolt.c:838:40: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] frame_size @@ got unsigned int [assigned] [usertype] frame_size @@ >>>> drivers/net/thunderbolt.c:838:40: sparse: expected restricted __le32 [usertype] frame_size >>>> drivers/net/thunderbolt.c:838:40: sparse: got unsigned int [assigned] [usertype] frame_size >>>>>> drivers/net/thunderbolt.c:839:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] frame_count @@ got unsigned int [usertype] @@ >>>> drivers/net/thunderbolt.c:839:41: sparse: expected restricted __le32 [usertype] frame_count >>>> drivers/net/thunderbolt.c:839:41: sparse: got unsigned int [usertype] >>>>>> drivers/net/thunderbolt.c:840:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] frame_index @@ got unsigned short [usertype] @@ >>>> drivers/net/thunderbolt.c:840:41: sparse: expected restricted __le16 [usertype] frame_index >>>> drivers/net/thunderbolt.c:840:41: sparse: got unsigned short [usertype] >>>>>> drivers/net/thunderbolt.c:841:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] frame_id @@ got unsigned short [usertype] @@ >>>> drivers/net/thunderbolt.c:841:38: sparse: expected restricted __le16 [usertype] frame_id >>>> drivers/net/thunderbolt.c:841:38: sparse: got unsigned short [usertype] >>>> drivers/net/thunderbolt.c:842:62: sparse: sparse: restricted __le32 degrades to integer >>>> drivers/net/thunderbolt.c:842:35: sparse: sparse: restricted __le16 degrades to integer >>>> drivers/net/thunderbolt.c:953:23: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __wsum [usertype] wsum @@ got restricted __be32 [usertype] @@ >>>> drivers/net/thunderbolt.c:953:23: sparse: expected restricted __wsum [usertype] wsum >>>> drivers/net/thunderbolt.c:953:23: sparse: got restricted __be32 [usertype] >>> >