mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Moti Haimovski <mhaimovski@habana.ai>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Oded Gabbay <ogabbay@kernel.org>
Subject: [ogabbay:gaudi2 60/61] drivers/misc/habanalabs/common/mmu/mmu.c:998:19: sparse: sparse: non size-preserving integer to pointer cast
Date: Wed, 29 Jun 2022 07:08:51 +0800	[thread overview]
Message-ID: <202206290743.xHHvh1c5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git gaudi2
head:   f645d04ce63b73c46a8839a621e34a28f1b2a7ba
commit: 374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b [60/61] habanalabs: add gaudi2 MMU support
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220629/202206290743.xHHvh1c5-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-31-g4880bd19-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay gaudi2
        git checkout 374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/misc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/misc/habanalabs/common/mmu/mmu.c:998:19: sparse: sparse: non size-preserving integer to pointer cast

vim +998 drivers/misc/habanalabs/common/mmu/mmu.c

   980	
   981	/**
   982	 * hl_mmu_hr_write_pte() - write HR PTE
   983	 * @ctx: pointer to the context structure
   984	 * @pgt_info: HOP's page table info structure
   985	 * @phys_pte_addr: phys PTE address
   986	 * @val: raw PTE data
   987	 * @hop_table_size: HOP table size
   988	 */
   989	void hl_mmu_hr_write_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
   990									u64 val, u32 hop_table_size)
   991	{
   992		/*
   993		 * The value to write is the phys address of the next hop +
   994		 * flags at the 12 LSBs.
   995		 */
   996		u64 virt_addr = hl_mmu_hr_pte_phys_to_virt(ctx, pgt_info, phys_pte_addr, hop_table_size);
   997	
 > 998		*((u64 *) virt_addr) = val;
   999	}
  1000	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-06-28 23:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206290743.xHHvh1c5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhaimovski@habana.ai \
    --cc=ogabbay@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®