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 X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, PDS_BAD_THREAD_QP_64,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A752C47082 for ; Mon, 7 Jun 2021 14:56:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2EE0F60FE5 for ; Mon, 7 Jun 2021 14:56:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EE0F60FE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C13E06B006E; Mon, 7 Jun 2021 10:56:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE9CF6B0070; Mon, 7 Jun 2021 10:56:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A63CA6B0071; Mon, 7 Jun 2021 10:56:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0204.hostedemail.com [216.40.44.204]) by kanga.kvack.org (Postfix) with ESMTP id 70EA36B006E for ; Mon, 7 Jun 2021 10:56:29 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F13F7BEF9 for ; Mon, 7 Jun 2021 14:56:28 +0000 (UTC) X-FDA: 78227228856.21.A5ABAE0 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf15.hostedemail.com (Postfix) with ESMTP id 3DA03A000247 for ; Mon, 7 Jun 2021 14:56:25 +0000 (UTC) IronPort-SDR: JcYawpHBE6hrtc2w6VvK2q+DocLM6FdzEt3T+MvZs9OUvK2dxYrxf0cgZG6Eljlkz3o1nZMCWn 73eM9bE0Wy1w== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="265790744" X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="265790744" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 07:56:25 -0700 IronPort-SDR: 8+4ocV+A7FNEgTC5Yf9XPppafDHHQnKyMP4h1p5MFhBB4lCKixubJH8jgrAP5IdcbQeMZTH6yg gkxx3CwZOUcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="551256165" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 07 Jun 2021 07:56:25 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 7 Jun 2021 07:56:24 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 7 Jun 2021 22:56:22 +0800 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2242.008; Mon, 7 Jun 2021 07:56:20 -0700 From: "Saleem, Shiraz" To: lkp CC: "kbuild-all@lists.01.org" , "Linux Memory Management List" , Jason Gunthorpe Subject: RE: [linux-next:master 6312/7430] drivers/infiniband/hw/irdma/hw.c:579:44: sparse: sparse: non size-preserving integer to pointer cast Thread-Topic: [linux-next:master 6312/7430] drivers/infiniband/hw/irdma/hw.c:579:44: sparse: sparse: non size-preserving integer to pointer cast Thread-Index: AQHXWWXGGdc7AxuQE0qKyXYf1MtqpqsEnVag Date: Mon, 7 Jun 2021 14:56:20 +0000 Message-ID: <66756db9b00f427a9d202e2aaf3d3638@intel.com> References: <202106050138.LzIEgZmE-lkp@intel.com> In-Reply-To: <202106050138.LzIEgZmE-lkp@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3DA03A000247 Authentication-Results: imf15.hostedemail.com; dkim=none; spf=none (imf15.hostedemail.com: domain of shiraz.saleem@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=shiraz.saleem@intel.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none) X-Stat-Signature: yiqfj3r8gkx43xo9yzzu4wosy8qpcfay X-HE-Tag: 1623077785-799761 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > Subject: [linux-next:master 6312/7430] drivers/infiniband/hw/irdma/hw.c:5= 79:44: > sparse: sparse: non size-preserving integer to pointer cast >=20 > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: ccc252d2e818f6a479441119ad453c3ce7c7c461 > commit: fa0cf568fd76550c1ddb806c03a65a1a4a1ea909 [6312/7430] RDMA/irdma: > Add irdma Kconfig/Makefile and remove i40iw > config: mips-allyesconfig (attached as .config) > compiler: mips-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux- > next.git/commit/?id=3Dfa0cf568fd76550c1ddb806c03a65a1a4a1ea909 > 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 fa0cf568fd76550c1ddb806c03a65a1a4a1ea909 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cros= s > C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=3D1 ARCH=3Dmips >=20 > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot >=20 >=20 > sparse warnings: (new ones prefixed by >>) > command-line: note: in included file: > builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redef= ined > builtin:0:0: sparse: this was the original definition > builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redef= ined > builtin:0:0: sparse: this was the original definition > builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redef= ined > builtin:0:0: sparse: this was the original definition > builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redef= ined > builtin:0:0: sparse: this was the original definition > >> drivers/infiniband/hw/irdma/hw.c:579:44: sparse: sparse: non=20 > >> size-preserving integer to pointer cast >=20 > vim +579 drivers/infiniband/hw/irdma/hw.c >=20 > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 574 > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 575 static void=20 > irdma_destroy_virt_aeq(struct irdma_pci_f *rf) > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 576 { > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 577 struct irdma_aeq *aeq =3D > &rf->aeq; > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 578 u32 pg_cnt =3D > DIV_ROUND_UP(aeq->mem.size, PAGE_SIZE); > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 @579 dma_addr_t *pg_arr =3D > (dma_addr_t *)aeq->palloc.level1.addr; I think this is because a u64 addr is typecasted to dma_addr_t type ptr whi= ch could be of different size based on arch. I will inspect and send a fix. > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 580 > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 581 > irdma_unmap_vm_page_list(&rf->hw, pg_arr, pg_cnt); > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 582 irdma_free_pble(rf- > >pble_rsrc, &aeq->palloc); > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 583 vfree(aeq->mem.va); > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 584 } > 44d9e52977a1b9 Mustafa Ismail 2021-06-02 585 >=20 > :::::: The code at line 579 was first introduced by commit > :::::: 44d9e52977a1b90b0db1c7f8b197c218e9226520 RDMA/irdma: Implement=20 > device initialization definitions >=20 > :::::: TO: Mustafa Ismail > :::::: CC: Jason Gunthorpe >=20 > --- > 0-DAY CI Kernel Test Service, Intel Corporation=20 > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org