mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oded Gabbay <oded.gabbay@gmail.com>,
	linux-kernel@vger.kernel.org, SW_Drivers@habana.ai
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 4/4] habanalabs: set max power according to card type
Date: Sun, 9 Aug 2020 22:52:29 +0800	[thread overview]
Message-ID: <202008092212.lzkqJVnM%lkp@intel.com> (raw)
In-Reply-To: <20200809115337.23402-4-oded.gabbay@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4576 bytes --]

Hi Oded,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on linus/master next-20200807]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Oded-Gabbay/habanalabs-verify-user-input-in-cs_ioctl_signal_wait/20200809-195558
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 47ec5303d73ea344e84f46660fff693c57641386
config: x86_64-randconfig-s022-20200809 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-118-ge1578773-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/misc/habanalabs/gaudi/gaudi.c:6025:34: sparse: sparse: restricted __le32 degrades to integer
   drivers/misc/habanalabs/gaudi/gaudi.c:1807:26: sparse: sparse: cast truncates bits from constant value (7ffc4f4000 becomes fc4f4000)
   drivers/misc/habanalabs/gaudi/gaudi.c:1811:25: sparse: sparse: cast truncates bits from constant value (7ffc4f2000 becomes fc4f2000)
   drivers/misc/habanalabs/gaudi/gaudi.c:1815:26: sparse: sparse: cast truncates bits from constant value (7ffc494000 becomes fc494000)
   drivers/misc/habanalabs/gaudi/gaudi.c:1819:25: sparse: sparse: cast truncates bits from constant value (7ffc492000 becomes fc492000)
   drivers/misc/habanalabs/gaudi/gaudi.c:1858:17: sparse: sparse: cast truncates bits from constant value (7ffc800040 becomes fc800040)
   drivers/misc/habanalabs/gaudi/gaudi.c:1896:9: sparse: sparse: cast truncates bits from constant value (7ffc800040 becomes fc800040)
   drivers/misc/habanalabs/gaudi/gaudi.c:1969:23: sparse: sparse: cast truncates bits from constant value (7ffc4f4000 becomes fc4f4000)
   drivers/misc/habanalabs/gaudi/gaudi.c:1973:22: sparse: sparse: cast truncates bits from constant value (7ffc4f2000 becomes fc4f2000)
   drivers/misc/habanalabs/gaudi/gaudi.c:2006:17: sparse: sparse: cast truncates bits from constant value (7ffc800040 becomes fc800040)
   drivers/misc/habanalabs/gaudi/gaudi.c:2079:23: sparse: sparse: cast truncates bits from constant value (7ffc4f4000 becomes fc4f4000)
   drivers/misc/habanalabs/gaudi/gaudi.c:2083:22: sparse: sparse: cast truncates bits from constant value (7ffc4f2000 becomes fc4f2000)
   drivers/misc/habanalabs/gaudi/gaudi.c:2118:17: sparse: sparse: cast truncates bits from constant value (7ffc800040 becomes fc800040)
   drivers/misc/habanalabs/gaudi/gaudi.c:2193:23: sparse: sparse: cast truncates bits from constant value (7ffc4f4000 becomes fc4f4000)
   drivers/misc/habanalabs/gaudi/gaudi.c:2197:22: sparse: sparse: cast truncates bits from constant value (7ffc4f2000 becomes fc4f2000)
   drivers/misc/habanalabs/gaudi/gaudi.c:2233:17: sparse: sparse: cast truncates bits from constant value (7ffc800040 becomes fc800040)
   drivers/misc/habanalabs/gaudi/gaudi.c:2728:27: sparse: sparse: cast truncates bits from constant value (7ff0000000 becomes f0000000)
   drivers/misc/habanalabs/gaudi/gaudi.c:6209:9: sparse: sparse: cast truncates bits from constant value (7ffc4f2000 becomes fc4f2000)

vim +6025 drivers/misc/habanalabs/gaudi/gaudi.c

  6005	
  6006	static int gaudi_armcp_info_get(struct hl_device *hdev)
  6007	{
  6008		struct gaudi_device *gaudi = hdev->asic_specific;
  6009		struct asic_fixed_properties *prop = &hdev->asic_prop;
  6010		int rc;
  6011	
  6012		if (!(gaudi->hw_cap_initialized & HW_CAP_CPU_Q))
  6013			return 0;
  6014	
  6015		rc = hl_fw_armcp_info_get(hdev);
  6016		if (rc)
  6017			return rc;
  6018	
  6019		if (!strlen(prop->armcp_info.card_name))
  6020			strncpy(prop->armcp_info.card_name, GAUDI_DEFAULT_CARD_NAME,
  6021					CARD_NAME_MAX_LEN);
  6022	
  6023		if (prop->armcp_info.card_type == armcp_card_type_pci)
  6024			prop->max_power_default = MAX_POWER_DEFAULT_PCI;
> 6025		else if (prop->armcp_info.card_type == armcp_card_type_pmc)
  6026			prop->max_power_default = MAX_POWER_DEFAULT_PMC;
  6027	
  6028		hdev->max_power = prop->max_power_default;
  6029	
  6030		return 0;
  6031	}
  6032	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33590 bytes --]

      reply	other threads:[~2020-08-09 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-09 11:53 [PATCH 1/4] habanalabs: verify user input in cs_ioctl_signal_wait Oded Gabbay
2020-08-09 11:53 ` [PATCH 2/4] habanalabs: set clock gating according to mask Oded Gabbay
2020-08-09 11:53 ` [PATCH 3/4] habanalabs: proper handling of alloc size in coresight Oded Gabbay
2020-08-09 11:53 ` [PATCH 4/4] habanalabs: set max power according to card type Oded Gabbay
2020-08-09 14:52   ` kernel test robot [this message]

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=202008092212.lzkqJVnM%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=SW_Drivers@habana.ai \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    /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®