[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202008092212.lzkqJVnM%lkp@intel.com>
Date: Sun, 9 Aug 2020 22:52:29 +0800
From: kernel test robot <lkp@...el.com>
To: Oded Gabbay <oded.gabbay@...il.com>, linux-kernel@...r.kernel.org,
SW_Drivers@...ana.ai
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH 4/4] habanalabs: set max power according to card type
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (33590 bytes)
Powered by blists - more mailing lists