Re: [PATCH v4 1/2] staging: android: Remove BUG_ON from ion_page_pool.c
by kernel test robot
Hi Tomer,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Tomer-Samara/staging-android-Rem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git bc752d2f345bf55d71b3422a6a24890ea03168dc
config: s390-randconfig-r036-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/staging/android/ion/ion_page_pool.c:10:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/staging/android/ion/ion_page_pool.c:10:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/staging/android/ion/ion_page_pool.c:10:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/staging/android/ion/ion_page_pool.c:10:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/staging/android/ion/ion_page_pool.c:81:46: error: expected ';' after expression
WARN_ON(pool->order != compound_order(page))
^
;
20 warnings and 1 error generated.
# https://github.com/0day-ci/linux/commit/855a2d27af07d8bf02bc2f5cd75a7f87d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tomer-Samara/staging-android-Remove-BUG-BUG_ON-from-ion/20200821-233003
git checkout 855a2d27af07d8bf02bc2f5cd75a7f87d1e94686
vim +81 drivers/staging/android/ion/ion_page_pool.c
78
79 void ion_page_pool_free(struct ion_page_pool *pool, struct page *page)
80 {
> 81 WARN_ON(pool->order != compound_order(page))
82
83 ion_page_pool_add(pool, page);
84 }
85
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[dborkman:pr/bpf-tc-misc 3/4] net/ipv4/ip_output.c:185:5: warning: no previous prototype for 'ip_finish_output2'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tc-misc
head: e9a9577c7e49d2e122576b4066f156d8c83556ef
commit: 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3 [3/4] bpf, poc: redirect into neigh
config: ia64-randconfig-r031-20200821 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/ipv4/ip_output.c:185:5: warning: no previous prototype for 'ip_finish_output2' [-Wmissing-prototypes]
185 | int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?...
git remote add dborkman https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman pr/bpf-tc-misc
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
vim +/ip_finish_output2 +185 net/ipv4/ip_output.c
184
> 185 int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
186 {
187 struct dst_entry *dst = skb_dst(skb);
188 struct rtable *rt = (struct rtable *)dst;
189 struct net_device *dev = dst->dev;
190 unsigned int hh_len = LL_RESERVED_SPACE(dev);
191 struct neighbour *neigh;
192 bool is_v6gw = false;
193
194 if (rt->rt_type == RTN_MULTICAST) {
195 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTMCAST, skb->len);
196 } else if (rt->rt_type == RTN_BROADCAST)
197 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTBCAST, skb->len);
198
199 /* Be paranoid, rather than too clever. */
200 if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
201 struct sk_buff *skb2;
202
203 skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
204 if (!skb2) {
205 kfree_skb(skb);
206 return -ENOMEM;
207 }
208 if (skb->sk)
209 skb_set_owner_w(skb2, skb->sk);
210 consume_skb(skb);
211 skb = skb2;
212 }
213
214 if (lwtunnel_xmit_redirect(dst->lwtstate)) {
215 int res = lwtunnel_xmit(skb);
216
217 if (res < 0 || res == LWTUNNEL_XMIT_DONE)
218 return res;
219 }
220
221 rcu_read_lock_bh();
222 neigh = ip_neigh_for_gw(rt, skb, &is_v6gw);
223 if (!IS_ERR(neigh)) {
224 int res;
225
226 sock_confirm_neigh(skb, neigh);
227 /* if crossing protocols, can not use the cached header */
228 res = neigh_output(neigh, skb, is_v6gw);
229 rcu_read_unlock_bh();
230 return res;
231 }
232 rcu_read_unlock_bh();
233
234 net_dbg_ratelimited("%s: No header cache and no neighbour!\n",
235 __func__);
236 kfree_skb(skb);
237 return -EINVAL;
238 }
239
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[chrome-os:chromeos-4.4 37/52] /tmp/ngene-core-232503.s:14009: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 210f388d2ecd2c6aa08e0c97d0abb9f50a98e143
commit: 71a989418474b1d1b25bc898b3880ac63d6e57e9 [37/52] UPSTREAM: ACPI: properties: Align return codes of __acpi_node_get_property_reference()
config: x86_64-randconfig-a003-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 71a989418474b1d1b25bc898b3880ac63d6e57e9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/media/pci/ngene/ngene-core.c:36:
In file included from include/linux/pci.h:32:
In file included from include/linux/resource_ext.h:19:
In file included from include/linux/slab.h:113:
In file included from include/linux/kasan.h:4:
In file included from include/linux/sched.h:62:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_sub(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:154:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/media/pci/ngene/ngene-core.c:42:
In file included from drivers/media/pci/ngene/ngene.h:42:
In file included from drivers/media/dvb-core/dvb_net.h:26:
In file included from include/linux/netdevice.h:42:
In file included from include/linux/ethtool.h:16:
In file included from include/uapi/linux/ethtool.h:17:
In file included from include/linux/if_ether.h:23:
include/linux/skbuff.h:2675:23: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
&csum, from) == copy) {
~~~~~~~~~~~~ ^ ~~~~
include/linux/skbuff.h:2679:60: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
} else if (copy_from_iter(skb_put(skb, copy), copy, from) == copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
include/linux/skbuff.h:2693:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
off == frag->page_offset + skb_frag_size(frag);
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2921:51: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
return copy_from_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
include/linux/skbuff.h:2926:49: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
return copy_to_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
In file included from drivers/media/pci/ngene/ngene-core.c:42:
In file included from drivers/media/pci/ngene/ngene.h:42:
In file included from drivers/media/dvb-core/dvb_net.h:26:
In file included from include/linux/netdevice.h:43:
In file included from include/net/net_namespace.h:17:
In file included from include/net/netns/ipv4.h:9:
In file included from include/net/inet_frag.h:4:
include/linux/rhashtable.h:264:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
return atomic_read(&ht->nelems) > (tbl->size / 4 * 3) &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
include/linux/rhashtable.h:277:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
return atomic_read(&ht->nelems) < (tbl->size * 3 / 10) &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
include/linux/rhashtable.h:289:34: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
include/linux/rhashtable.h:302:34: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/media/pci/ngene/ngene-core.c:42:
In file included from drivers/media/pci/ngene/ngene.h:42:
In file included from drivers/media/dvb-core/dvb_net.h:26:
include/linux/netdevice.h:2413:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
skb_checksum_start_offset(skb) <
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/netdevice.h:3051:15: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
~~~~~ ^ ~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:58:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:182:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from drivers/media/pci/ngene/ngene-core.c:42:
In file included from drivers/media/pci/ngene/ngene.h:42:
In file included from drivers/media/dvb-core/dvb_net.h:26:
include/linux/netdevice.h:3325:37: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
drivers/media/pci/ngene/ngene-core.c:816:16: warning: comparison of integers of different signs: 'int' and 'u32' (aka 'unsigned int') [-Wsign-compare]
for (j = 0; j < tb->NumBuffers; j++, Cur = Cur->Next) {
~ ^ ~~~~~~~~~~~~~~
drivers/media/pci/ngene/ngene-core.c:1026:16: warning: comparison of integers of different signs: 'int' and 'u32' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < n; i++) {
~ ^ ~
19 warnings generated.
/tmp/ngene-core-232503.s: Assembler messages:
>> /tmp/ngene-core-232503.s:14009: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
/tmp/ngene-core-232503.s:14126: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[ti:ti-rt-linux-5.4.y 9600/9880] drivers/mtd/spi-nor/spi-nor.c:5721:18: error: implicit declaration of function 'of_read_number'
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.4.y
head: faf6e9701e288b121ddd899e131aedb871be6123
commit: 6f9db649f76819bbe6b9ee1a7758717d0f2e01ee [9600/9880] HACK: mtd: spi-nor: Look for PHY pattern partition
config: m68k-randconfig-r013-20200821 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6f9db649f76819bbe6b9ee1a7758717d0f2e01ee
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/mtd/spi-nor/spi-nor.c:10:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:47,
from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from drivers/mtd/spi-nor/spi-nor.c:13:
drivers/mtd/spi-nor/spi-nor.c: In function 'spi_nor_spimem_xfer_data':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
drivers/mtd/spi-nor/spi-nor.c:389:34: note: in expansion of macro 'virt_addr_valid'
389 | if (object_is_on_stack(buf) || !virt_addr_valid(buf))
| ^~~~~~~~~~~~~~~
drivers/mtd/spi-nor/spi-nor.c: In function 'spi_nor_scan':
>> drivers/mtd/spi-nor/spi-nor.c:5721:18: error: implicit declaration of function 'of_read_number' [-Werror=implicit-function-declaration]
5721 | op.addr.val = of_read_number(reg, a_cells);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.4.y
git checkout 6f9db649f76819bbe6b9ee1a7758717d0f2e01ee
vim +/of_read_number +5721 drivers/mtd/spi-nor/spi-nor.c
5556
5557 int spi_nor_scan(struct spi_nor *nor, const char *name,
5558 const struct spi_nor_hwcaps *hwcaps)
5559 {
5560 const struct flash_info *info;
5561 struct device *dev = nor->dev;
5562 struct mtd_info *mtd = &nor->mtd;
5563 struct device_node *np = spi_nor_get_flash_node(nor);
5564 struct device_node *child;
5565 struct spi_nor_flash_parameter *params = &nor->params;
5566 struct spi_mem_op op;
5567 int ret;
5568 int i;
5569
5570 ret = spi_nor_check(nor);
5571 if (ret)
5572 return ret;
5573
5574 /* Reset SPI protocol for all commands. */
5575 nor->reg_proto = SNOR_PROTO_1_1_1;
5576 nor->read_proto = SNOR_PROTO_1_1_1;
5577 nor->write_proto = SNOR_PROTO_1_1_1;
5578
5579 /*
5580 * We need the bounce buffer early to read/write registers when going
5581 * through the spi-mem layer (buffers have to be DMA-able).
5582 * For spi-mem drivers, we'll reallocate a new buffer if
5583 * nor->page_size turns out to be greater than PAGE_SIZE (which
5584 * shouldn't happen before long since NOR pages are usually less
5585 * than 1KB) after spi_nor_scan() returns.
5586 */
5587 nor->bouncebuf_size = PAGE_SIZE;
5588 nor->bouncebuf = devm_kmalloc(dev, nor->bouncebuf_size,
5589 GFP_KERNEL);
5590 if (!nor->bouncebuf)
5591 return -ENOMEM;
5592
5593 info = spi_nor_get_flash_info(nor, name);
5594 if (IS_ERR(info))
5595 return PTR_ERR(info);
5596
5597 nor->info = info;
5598
5599 spi_nor_debugfs_init(nor, info);
5600
5601 mutex_init(&nor->lock);
5602
5603 /*
5604 * Make sure the XSR_RDY flag is set before calling
5605 * spi_nor_wait_till_ready(). Xilinx S3AN share MFR
5606 * with Atmel spi-nor
5607 */
5608 if (info->flags & SPI_NOR_XSR_RDY)
5609 nor->flags |= SNOR_F_READY_XSR_RDY;
5610
5611 if (info->flags & SPI_NOR_HAS_LOCK)
5612 nor->flags |= SNOR_F_HAS_LOCK;
5613
5614 /*
5615 * Atmel, SST, Intel/Numonyx, and others serial NOR tend to power up
5616 * with the software protection bits set.
5617 */
5618 if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
5619 JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
5620 JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
5621 nor->info->flags & SPI_NOR_HAS_LOCK)
5622 nor->clear_sr_bp = spi_nor_clear_sr_bp;
5623
5624 /* Init flash parameters based on flash_info struct and SFDP */
5625 spi_nor_init_params(nor);
5626
5627 if (!mtd->name)
5628 mtd->name = dev_name(dev);
5629 mtd->priv = nor;
5630 mtd->type = MTD_NORFLASH;
5631 mtd->writesize = 1;
5632 mtd->flags = MTD_CAP_NORFLASH;
5633 mtd->size = params->size;
5634 mtd->_erase = spi_nor_erase;
5635 mtd->_read = spi_nor_read;
5636 mtd->_suspend = spi_nor_suspend;
5637 mtd->_resume = spi_nor_resume;
5638
5639 if (nor->params.locking_ops) {
5640 mtd->_lock = spi_nor_lock;
5641 mtd->_unlock = spi_nor_unlock;
5642 mtd->_is_locked = spi_nor_is_locked;
5643 }
5644
5645 /* sst nor chips use AAI word program */
5646 if (info->flags & SST_WRITE)
5647 mtd->_write = sst_write;
5648 else
5649 mtd->_write = spi_nor_write;
5650
5651 if (info->flags & USE_FSR)
5652 nor->flags |= SNOR_F_USE_FSR;
5653 if (info->flags & SPI_NOR_HAS_TB)
5654 nor->flags |= SNOR_F_HAS_SR_TB;
5655 if (info->flags & NO_CHIP_ERASE)
5656 nor->flags |= SNOR_F_NO_OP_CHIP_ERASE;
5657 if (info->flags & USE_CLSR)
5658 nor->flags |= SNOR_F_USE_CLSR;
5659
5660 if (info->flags & SPI_NOR_NO_ERASE)
5661 mtd->flags |= MTD_NO_ERASE;
5662
5663 mtd->dev.parent = dev;
5664 nor->page_size = params->page_size;
5665 mtd->writebufsize = nor->page_size;
5666
5667 if (of_property_read_bool(np, "broken-flash-reset"))
5668 nor->flags |= SNOR_F_BROKEN_RESET;
5669
5670 /*
5671 * Configure the SPI memory:
5672 * - select op codes for (Fast) Read, Page Program and Sector Erase.
5673 * - set the number of dummy cycles (mode cycles + wait states).
5674 * - set the SPI protocols for register and memory accesses.
5675 */
5676 ret = spi_nor_setup(nor, hwcaps);
5677 if (ret)
5678 return ret;
5679
5680 if (info->flags & SPI_NOR_4B_OPCODES)
5681 nor->flags |= SNOR_F_4B_OPCODES;
5682
5683 ret = spi_nor_set_addr_width(nor);
5684 if (ret)
5685 return ret;
5686
5687 /* Send all the required SPI flash commands to initialize device */
5688 ret = spi_nor_init(nor);
5689 if (ret)
5690 return ret;
5691
5692 /*
5693 * Find out if a PHY pattern partition is present.
5694 *
5695 * TODO: Teach the mtd core to find the partition for us so we don't
5696 * have to repeat the parsing logic here that mtd already has.
5697 */
5698 child = NULL;
5699 do {
5700 int len;
5701 char *label = NULL;
5702
5703 child = of_get_next_child(np, child);
5704 if (child)
5705 label = (char *)of_get_property(child, "label", &len);
5706
5707 if (label && !strcmp(label, "ospi.phypattern")) {
5708 const __be32 *reg;
5709 int a_cells, s_cells;
5710
5711 reg = of_get_property(child, "reg", &len);
5712 if (!reg)
5713 continue;
5714
5715 a_cells = of_n_addr_cells(child);
5716 s_cells = of_n_size_cells(child);
5717 if (len / 4 != a_cells + s_cells)
5718 continue;
5719
5720 op = spi_nor_spimem_read_op(nor);
> 5721 op.addr.val = of_read_number(reg, a_cells);
5722 spi_mem_set_calibration_read_op(nor->spimem, &op);
5723 break;
5724 }
5725 } while (child);
5726
5727 dev_info(dev, "%s (%lld Kbytes)\n", info->name,
5728 (long long)mtd->size >> 10);
5729
5730 dev_dbg(dev,
5731 "mtd .name = %s, .size = 0x%llx (%lldMiB), "
5732 ".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
5733 mtd->name, (long long)mtd->size, (long long)(mtd->size >> 20),
5734 mtd->erasesize, mtd->erasesize / 1024, mtd->numeraseregions);
5735
5736 if (mtd->numeraseregions)
5737 for (i = 0; i < mtd->numeraseregions; i++)
5738 dev_dbg(dev,
5739 "mtd.eraseregions[%d] = { .offset = 0x%llx, "
5740 ".erasesize = 0x%.8x (%uKiB), "
5741 ".numblocks = %d }\n",
5742 i, (long long)mtd->eraseregions[i].offset,
5743 mtd->eraseregions[i].erasesize,
5744 mtd->eraseregions[i].erasesize / 1024,
5745 mtd->eraseregions[i].numblocks);
5746 return 0;
5747 }
5748 EXPORT_SYMBOL_GPL(spi_nor_scan);
5749
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] PCI: Add support for LTR
by kernel test robot
Hi Puranjay,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.8]
[cannot apply to pci/next pm/linux-next v5.9-rc1 next-20200821]
[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/Puranjay-Mohan/PCI-Add-support-f...
base: bcf876870b95592b52519ed4aafcf9d95999bc9c
config: x86_64-randconfig-a003-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/pci/pci-acpi.c:1236:8: error: no member named 'max_snoop_latency' in 'struct pci_dev'
dev->max_snoop_latency = (u16)elements[1].integer.value |
~~~ ^
>> drivers/pci/pci-acpi.c:1238:8: error: no member named 'max_nosnoop_latency' in 'struct pci_dev'
dev->max_nosnoop_latency = (u16)elements[3].integer.value |
~~~ ^
2 errors generated.
# https://github.com/0day-ci/linux/commit/2aef8c301151afccc59ac8c0ad321f4e0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Puranjay-Mohan/PCI-Add-support-for-LTR/20200822-031519
git checkout 2aef8c301151afccc59ac8c0ad321f4e0f77d453
vim +1236 drivers/pci/pci-acpi.c
1215
1216 /* pci_acpi_evaluate_ltr_latency
1217 *
1218 * @dev - the pci_dev to evaluate and save latencies
1219 */
1220 void pci_acpi_evaluate_ltr_latency(struct pci_dev *dev)
1221 {
1222 union acpi_object *obj, *elements;
1223 struct acpi_device *handle;
1224
1225 handle = ACPI_HANDLE(&dev->dev);
1226 if (!handle)
1227 return;
1228
1229 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
1230 DSM_PCI_LTR_MAX_LATENCY, NULL);
1231 if (!obj)
1232 return;
1233
1234 if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 4) {
1235 elements = obj->package.elements;
> 1236 dev->max_snoop_latency = (u16)elements[1].integer.value |
1237 ((u16)elements[0].integer.value << PCI_LTR_SCALE_SHIFT);
> 1238 dev->max_nosnoop_latency = (u16)elements[3].integer.value |
1239 ((u16)elements[2].integer.value << PCI_LTR_SCALE_SHIFT);
1240 }
1241 ACPI_FREE(obj);
1242 }
1243
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] PCI: Add support for LTR
by kernel test robot
Hi Puranjay,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.8]
[cannot apply to pci/next pm/linux-next v5.9-rc1 next-20200821]
[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/Puranjay-Mohan/PCI-Add-support-f...
base: bcf876870b95592b52519ed4aafcf9d95999bc9c
config: x86_64-randconfig-s022-20200820 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-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(a)intel.com>
All errors (new ones prefixed by >>):
drivers/pci/pci-acpi.c: In function 'pci_acpi_evaluate_ltr_latency':
>> drivers/pci/pci-acpi.c:1236:6: error: 'struct pci_dev' has no member named 'max_snoop_latency'
1236 | dev->max_snoop_latency = (u16)elements[1].integer.value |
| ^~
>> drivers/pci/pci-acpi.c:1238:6: error: 'struct pci_dev' has no member named 'max_nosnoop_latency'
1238 | dev->max_nosnoop_latency = (u16)elements[3].integer.value |
| ^~
# https://github.com/0day-ci/linux/commit/2aef8c301151afccc59ac8c0ad321f4e0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Puranjay-Mohan/PCI-Add-support-for-LTR/20200822-031519
git checkout 2aef8c301151afccc59ac8c0ad321f4e0f77d453
vim +1236 drivers/pci/pci-acpi.c
1215
1216 /* pci_acpi_evaluate_ltr_latency
1217 *
1218 * @dev - the pci_dev to evaluate and save latencies
1219 */
1220 void pci_acpi_evaluate_ltr_latency(struct pci_dev *dev)
1221 {
1222 union acpi_object *obj, *elements;
1223 struct acpi_device *handle;
1224
1225 handle = ACPI_HANDLE(&dev->dev);
1226 if (!handle)
1227 return;
1228
1229 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
1230 DSM_PCI_LTR_MAX_LATENCY, NULL);
1231 if (!obj)
1232 return;
1233
1234 if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 4) {
1235 elements = obj->package.elements;
> 1236 dev->max_snoop_latency = (u16)elements[1].integer.value |
1237 ((u16)elements[0].integer.value << PCI_LTR_SCALE_SHIFT);
> 1238 dev->max_nosnoop_latency = (u16)elements[3].integer.value |
1239 ((u16)elements[2].integer.value << PCI_LTR_SCALE_SHIFT);
1240 }
1241 ACPI_FREE(obj);
1242 }
1243
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[dborkman:pr/bpf-tc-misc 3/4] net/ipv4/ip_output.c:185:5: warning: no previous prototype for function 'ip_finish_output2'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tc-misc
head: e9a9577c7e49d2e122576b4066f156d8c83556ef
commit: 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3 [3/4] bpf, poc: redirect into neigh
config: x86_64-randconfig-r034-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/ipv4/ip_output.c:185:5: warning: no previous prototype for function 'ip_finish_output2' [-Wmissing-prototypes]
int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
^
net/ipv4/ip_output.c:185:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
^
static
1 warning generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?...
git remote add dborkman https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman pr/bpf-tc-misc
git checkout 72a4e02bd0f8299a3fae97459ffa3bd3cd1ba1c3
vim +/ip_finish_output2 +185 net/ipv4/ip_output.c
184
> 185 int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb)
186 {
187 struct dst_entry *dst = skb_dst(skb);
188 struct rtable *rt = (struct rtable *)dst;
189 struct net_device *dev = dst->dev;
190 unsigned int hh_len = LL_RESERVED_SPACE(dev);
191 struct neighbour *neigh;
192 bool is_v6gw = false;
193
194 if (rt->rt_type == RTN_MULTICAST) {
195 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTMCAST, skb->len);
196 } else if (rt->rt_type == RTN_BROADCAST)
197 IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTBCAST, skb->len);
198
199 /* Be paranoid, rather than too clever. */
200 if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
201 struct sk_buff *skb2;
202
203 skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
204 if (!skb2) {
205 kfree_skb(skb);
206 return -ENOMEM;
207 }
208 if (skb->sk)
209 skb_set_owner_w(skb2, skb->sk);
210 consume_skb(skb);
211 skb = skb2;
212 }
213
214 if (lwtunnel_xmit_redirect(dst->lwtstate)) {
215 int res = lwtunnel_xmit(skb);
216
217 if (res < 0 || res == LWTUNNEL_XMIT_DONE)
218 return res;
219 }
220
221 rcu_read_lock_bh();
222 neigh = ip_neigh_for_gw(rt, skb, &is_v6gw);
223 if (!IS_ERR(neigh)) {
224 int res;
225
226 sock_confirm_neigh(skb, neigh);
227 /* if crossing protocols, can not use the cached header */
228 res = neigh_output(neigh, skb, is_v6gw);
229 rcu_read_unlock_bh();
230 return res;
231 }
232 rcu_read_unlock_bh();
233
234 net_dbg_ratelimited("%s: No header cache and no neighbour!\n",
235 __func__);
236 kfree_skb(skb);
237 return -EINVAL;
238 }
239
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[chrome-os:chromeos-4.4 51/52] drivers/bluetooth/btintel.c:715:27: warning: comparison of integers of different signs: 'long' and 'const size_t' (aka 'const unsigned long')
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 210f388d2ecd2c6aa08e0c97d0abb9f50a98e143
commit: aa8cabb7e77643809d00003ffa1f8187294b9ab2 [51/52] BACKPORT: UPSTREAM: Bluetooth: btusb: Add support to read Intel debug feature
config: arm64-randconfig-r001-20200820 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout aa8cabb7e77643809d00003ffa1f8187294b9ab2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
include/linux/rhashtable.h:289:34: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
return atomic_read(&ht->nelems) > tbl->size &&
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
include/linux/rhashtable.h:302:34: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:51:
include/linux/netdevice.h:2413:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
skb_checksum_start_offset(skb) <
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/linux/netdevice.h:3051:15: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
~~~~~ ^ ~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:58:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:182:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:51:
include/linux/netdevice.h:3325:37: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:58:
In file included from include/linux/memcontrol.h:30:
In file included from include/linux/writeback.h:192:
include/linux/bio.h:424:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (sectors >= bio_sectors(bio))
~~~~~~~ ^ ~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
In file included from include/net/sch_generic.h:12:
In file included from include/net/rtnetlink.h:5:
include/net/netlink.h:345:18: warning: comparison of integers of different signs: 'const __u32' (aka 'const unsigned int') and 'int' [-Wsign-compare]
nlh->nlmsg_len <= remaining);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~
include/net/netlink.h:380:21: warning: comparison of integers of different signs: 'const __u32' (aka 'const unsigned int') and 'int' [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
include/net/netlink.h:413:21: warning: comparison of integers of different signs: 'const __u32' (aka 'const unsigned int') and 'int' [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
In file included from include/net/sch_generic.h:12:
include/net/rtnetlink.h:20:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
In file included from include/linux/filter.h:16:
include/net/sch_generic.h:267:33: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
BUILD_BUG_ON(sizeof(qcb->data) < sz);
~~~~~~~~~~~~~~~~~ ^ ~~
include/linux/build_bug.h:71:19: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~
include/linux/build_bug.h:47:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~
include/linux/compiler.h:509:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler.h:497:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler.h:489:19: note: expanded from macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
In file included from include/net/sock.h:63:
include/linux/filter.h:517:16: warning: comparison of integers of different signs: 'const __u32' (aka 'const unsigned int') and 'int' [-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/bluetooth/btintel.c:28:
In file included from include/net/bluetooth/bluetooth.h:29:
include/net/sock.h:1878:54: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (csum_and_copy_from_iter(to, copy, &csum, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
include/net/sock.h:1882:46: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
if (copy_from_iter_nocache(to, copy, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
include/net/sock.h:1884:44: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
} else if (copy_from_iter(to, copy, from) != copy)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
drivers/bluetooth/btintel.c:288:18: warning: comparison of integers of different signs: 'const size_t' (aka 'const unsigned long') and 'long' [-Wsign-compare]
while (fw->size > fw_ptr - fw->data) {
~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
>> drivers/bluetooth/btintel.c:715:27: warning: comparison of integers of different signs: 'long' and 'const size_t' (aka 'const unsigned long') [-Wsign-compare]
while (fw_ptr - fw->data < fw->size) {
~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
26 warnings generated.
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout aa8cabb7e77643809d00003ffa1f8187294b9ab2
vim +715 drivers/bluetooth/btintel.c
677
678 int btintel_download_firmware(struct hci_dev *hdev, const struct firmware *fw,
679 u32 *boot_param)
680 {
681 int err;
682 const u8 *fw_ptr;
683 u32 frag_len;
684
685 /* Start the firmware download transaction with the Init fragment
686 * represented by the 128 bytes of CSS header.
687 */
688 err = btintel_secure_send(hdev, 0x00, 128, fw->data);
689 if (err < 0) {
690 bt_dev_err(hdev, "Failed to send firmware header (%d)", err);
691 goto done;
692 }
693
694 /* Send the 256 bytes of public key information from the firmware
695 * as the PKey fragment.
696 */
697 err = btintel_secure_send(hdev, 0x03, 256, fw->data + 128);
698 if (err < 0) {
699 bt_dev_err(hdev, "Failed to send firmware pkey (%d)", err);
700 goto done;
701 }
702
703 /* Send the 256 bytes of signature information from the firmware
704 * as the Sign fragment.
705 */
706 err = btintel_secure_send(hdev, 0x02, 256, fw->data + 388);
707 if (err < 0) {
708 bt_dev_err(hdev, "Failed to send firmware signature (%d)", err);
709 goto done;
710 }
711
712 fw_ptr = fw->data + 644;
713 frag_len = 0;
714
> 715 while (fw_ptr - fw->data < fw->size) {
716 struct hci_command_hdr *cmd = (void *)(fw_ptr + frag_len);
717
718 /* Each SKU has a different reset parameter to use in the
719 * HCI_Intel_Reset command and it is embedded in the firmware
720 * data. So, instead of using static value per SKU, check
721 * the firmware data and save it for later use.
722 */
723 if (le16_to_cpu(cmd->opcode) == 0xfc0e) {
724 /* The boot parameter is the first 32-bit value
725 * and rest of 3 octets are reserved.
726 */
727 *boot_param = __get_unaligned_cpu32(fw_ptr + sizeof(*cmd));
728
729
730 bt_dev_dbg(hdev, "boot_param=0x%x", *boot_param);
731 }
732
733 frag_len += sizeof(*cmd) + cmd->plen;
734
735 /* The parameter length of the secure send command requires
736 * a 4 byte alignment. It happens so that the firmware file
737 * contains proper Intel_NOP commands to align the fragments
738 * as needed.
739 *
740 * Send set of commands with 4 byte alignment from the
741 * firmware data buffer as a single Data fragement.
742 */
743 if (!(frag_len % 4)) {
744 err = btintel_secure_send(hdev, 0x01, frag_len, fw_ptr);
745 if (err < 0) {
746 bt_dev_err(hdev,
747 "Failed to send firmware data (%d)",
748 err);
749 goto done;
750 }
751
752 fw_ptr += frag_len;
753 frag_len = 0;
754 }
755 }
756
757 done:
758 return err;
759 }
760 EXPORT_SYMBOL_GPL(btintel_download_firmware);
761
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 1039/2546] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1989:25: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 605cbf3d5f20470ec303b79feda3202935f4a142
commit: e098bc9612c2b60f94920461d71c92962a916e73 [1039/2546] drm/amd/pm: optimize the power related source code layout
config: parisc-randconfig-s032-20200820 (attached as .config)
compiler: hppa-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.2-191-g10164920-dirty
git checkout e098bc9612c2b60f94920461d71c92962a916e73
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1235:9: sparse: expected unsigned int [usertype] SpllSpreadSpectrum
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1235:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1236:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SpllSpreadSpectrum2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1236:9: sparse: expected unsigned int [usertype] SpllSpreadSpectrum2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1236:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1237:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] CcPwrDynRm @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1237:9: sparse: expected unsigned int [usertype] CcPwrDynRm
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1237:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1238:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] CcPwrDynRm1 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1238:9: sparse: expected unsigned int [usertype] CcPwrDynRm1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1238:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1247:48: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MinMvdd @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1247:48: sparse: expected unsigned int [usertype] MinMvdd
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1247:48: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1270:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] DllCntl @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1270:51: sparse: expected unsigned int [usertype] DllCntl
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1270:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1272:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MclkPwrmgtCntl @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1272:51: sparse: expected unsigned int [usertype] MclkPwrmgtCntl
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1272:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1274:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllAdFuncCntl @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1274:51: sparse: expected unsigned int [usertype] MpllAdFuncCntl
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1274:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1276:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllDqFuncCntl @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1276:51: sparse: expected unsigned int [usertype] MpllDqFuncCntl
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1276:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1278:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllFuncCntl @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1278:51: sparse: expected unsigned int [usertype] MpllFuncCntl
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1278:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1280:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllFuncCntl_1 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1280:51: sparse: expected unsigned int [usertype] MpllFuncCntl_1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1280:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1282:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllFuncCntl_2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1282:51: sparse: expected unsigned int [usertype] MpllFuncCntl_2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1282:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1284:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllSs1 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1284:51: sparse: expected unsigned int [usertype] MpllSs1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1284:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1286:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MpllSs2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1286:51: sparse: expected unsigned int [usertype] MpllSs2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1286:51: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1295:46: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] ActivityLevel @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1295:46: sparse: expected unsigned short [usertype] ActivityLevel
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1295:46: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1359:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] VclkFrequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1359:17: sparse: expected unsigned int [usertype] VclkFrequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1359:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1360:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] DclkFrequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1360:17: sparse: expected unsigned int [usertype] DclkFrequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1360:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1407:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Frequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1407:17: sparse: expected unsigned int [usertype] Frequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1407:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1451:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Frequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1451:17: sparse: expected unsigned int [usertype] Frequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1451:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1479:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] McArbDramTiming @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1479:36: sparse: expected unsigned int [usertype] McArbDramTiming
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1479:36: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1480:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] McArbDramTiming2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1480:36: sparse: expected unsigned int [usertype] McArbDramTiming2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1480:36: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1568:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] BootMVdd @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1568:9: sparse: expected unsigned short [usertype] BootMVdd
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1568:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1673:37: sparse: sparse: cast to restricted __be32
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1689:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] minFreq @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1689:9: sparse: expected unsigned short [usertype] minFreq
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1689:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1691:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] maxFreq @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1691:9: sparse: expected unsigned short [usertype] maxFreq
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1691:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1717:38: sparse: sparse: cast to restricted __be32
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1732:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] setting @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1732:17: sparse: expected unsigned short [usertype] setting
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1732:17: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1838:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] DefaultTdp @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1838:31: sparse: expected unsigned short [usertype] DefaultTdp
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1838:31: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1840:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] TargetTdp @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1840:30: sparse: expected unsigned short [usertype] TargetTdp
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1840:30: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1852:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] BAPM_TEMP_GRADIENT @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1852:39: sparse: expected unsigned int [usertype] BAPM_TEMP_GRADIENT
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1852:39: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1860:62: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1860:62: sparse: expected unsigned short
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1860:62: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1862:63: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1862:63: sparse: expected unsigned short
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1862:63: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1901:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tdc_limit @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1901:25: sparse: expected unsigned short [assigned] [usertype] tdc_limit
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1901:25: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1954:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] FuzzyFan_PwmSetDelta @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1954:57: sparse: expected signed short [usertype] FuzzyFan_PwmSetDelta
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1954:57: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1987:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] hi_sidd @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1987:25: sparse: expected unsigned short [assigned] [usertype] hi_sidd
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1987:25: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1989:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] lo_sidd @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1989:25: sparse: expected unsigned short [assigned] [usertype] lo_sidd
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:1989:25: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2077:53: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] s0 @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2077:53: sparse: expected unsigned short [usertype] s0
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2077:53: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2079:53: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] s1 @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2079:53: sparse: expected unsigned short [usertype] s1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2079:53: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2100:40: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2100:40: sparse: expected unsigned int
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2100:40: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2423:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2423:32: sparse: expected unsigned int
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2423:32: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2424:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SystemFlags @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2424:9: sparse: expected unsigned int [usertype] SystemFlags
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2424:9: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2425:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] VRConfig @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2425:9: sparse: expected unsigned int [usertype] VRConfig
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2425:9: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2426:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SmioMask1 @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2426:9: sparse: expected unsigned int [usertype] SmioMask1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2426:9: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2427:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SmioMask2 @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2427:9: sparse: expected unsigned int [usertype] SmioMask2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2427:9: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2428:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SclkStepSize @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2428:9: sparse: expected unsigned int [usertype] SclkStepSize
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2428:9: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2429:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] TemperatureLimitHigh @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2429:9: sparse: expected unsigned short [usertype] TemperatureLimitHigh
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2429:9: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2430:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] TemperatureLimitLow @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2430:9: sparse: expected unsigned short [usertype] TemperatureLimitLow
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2430:9: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2431:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] VoltageResponseTime @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2431:9: sparse: expected unsigned short [usertype] VoltageResponseTime
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2431:9: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2432:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] PhaseResponseTime @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2432:9: sparse: expected unsigned short [usertype] PhaseResponseTime
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2432:9: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2515:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMin @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2515:27: sparse: expected signed short [usertype] TempMin
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2515:27: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2516:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMed @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2516:27: sparse: expected signed short [usertype] TempMed
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2516:27: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2517:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMax @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2517:27: sparse: expected signed short [usertype] TempMax
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2517:27: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2519:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] Slope1 @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2519:26: sparse: expected signed short [usertype] Slope1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2519:26: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2520:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] Slope2 @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2520:26: sparse: expected signed short [usertype] Slope2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2520:26: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2522:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] FdoMin @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2522:26: sparse: expected signed short [usertype] FdoMin
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2522:26: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2524:28: sparse: sparse: too many warnings
--
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1452:17: sparse: expected unsigned int [usertype] Frequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1452:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1453:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MinVoltage @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1453:17: sparse: expected unsigned int [usertype] MinVoltage
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1453:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1488:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] Frequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1488:17: sparse: expected unsigned int [usertype] Frequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1488:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1489:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MinVoltage @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1489:17: sparse: expected unsigned int [usertype] MinVoltage
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1489:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1516:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] McArbDramTiming @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1516:36: sparse: expected unsigned int [usertype] McArbDramTiming
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1516:36: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1517:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] McArbDramTiming2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1517:36: sparse: expected unsigned int [usertype] McArbDramTiming2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1517:36: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1593:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] VclkFrequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1593:17: sparse: expected unsigned int [usertype] VclkFrequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1593:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1594:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] DclkFrequency @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1594:17: sparse: expected unsigned int [usertype] DclkFrequency
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1594:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1595:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] MinVoltage @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1595:17: sparse: expected unsigned int [usertype] MinVoltage
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1595:17: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1626:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] BootVddc @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1626:9: sparse: expected unsigned short [usertype] BootVddc
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1626:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1627:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] BootVddci @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1627:9: sparse: expected unsigned short [usertype] BootVddci
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1627:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1628:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] BootMVdd @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1628:9: sparse: expected unsigned short [usertype] BootMVdd
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1628:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1746:37: sparse: sparse: cast to restricted __be32
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1762:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] minFreq @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1762:9: sparse: expected unsigned short [usertype] minFreq
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1762:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1764:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] maxFreq @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1764:9: sparse: expected unsigned short [usertype] maxFreq
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1764:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1790:38: sparse: sparse: cast to restricted __be32
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1807:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] setting @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1807:17: sparse: expected unsigned short [usertype] setting
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1807:17: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2093:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2093:32: sparse: expected unsigned int
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2093:32: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2095:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SystemFlags @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2095:9: sparse: expected unsigned int [usertype] SystemFlags
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2095:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2096:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] VRConfig @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2096:9: sparse: expected unsigned int [usertype] VRConfig
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2096:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2097:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SmioMask1 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2097:9: sparse: expected unsigned int [usertype] SmioMask1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2097:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2098:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SmioMask2 @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2098:9: sparse: expected unsigned int [usertype] SmioMask2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2098:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2099:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] SclkStepSize @@ got restricted __be32 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2099:9: sparse: expected unsigned int [usertype] SclkStepSize
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2099:9: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2100:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] TemperatureLimitHigh @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2100:9: sparse: expected unsigned short [usertype] TemperatureLimitHigh
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2100:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2101:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] TemperatureLimitLow @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2101:9: sparse: expected unsigned short [usertype] TemperatureLimitLow
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2101:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2102:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] VoltageResponseTime @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2102:9: sparse: expected unsigned short [usertype] VoltageResponseTime
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2102:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2103:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] PhaseResponseTime @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2103:9: sparse: expected unsigned short [usertype] PhaseResponseTime
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2103:9: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2181:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMin @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2181:27: sparse: expected signed short [usertype] TempMin
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2181:27: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2183:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMed @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2183:27: sparse: expected signed short [usertype] TempMed
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2183:27: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2185:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempMax @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2185:27: sparse: expected signed short [usertype] TempMax
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2185:27: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2188:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] Slope1 @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2188:26: sparse: expected signed short [usertype] Slope1
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2188:26: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2189:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] Slope2 @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2189:26: sparse: expected signed short [usertype] Slope2
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2189:26: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2191:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] FdoMin @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2191:26: sparse: expected signed short [usertype] FdoMin
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2191:26: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2193:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] HystDown @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2193:28: sparse: expected signed short [usertype] HystDown
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2193:28: sparse: got restricted __be16 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2196:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] HystUp @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2196:26: sparse: expected signed short [usertype] HystUp
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2196:26: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2198:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] HystSlope @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2198:29: sparse: expected signed short [usertype] HystSlope
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2198:29: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2200:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] TempRespLim @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2200:31: sparse: expected signed short [usertype] TempRespLim
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2200:31: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2204:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] RefreshPeriod @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2204:33: sparse: expected unsigned int [usertype] RefreshPeriod
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2204:33: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2208:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed short [usertype] FdoMax @@ got restricted __be16 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2208:26: sparse: expected signed short [usertype] FdoMax
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2208:26: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2277:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] low_sclk_interrupt_threshold @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2277:17: sparse: expected unsigned int [assigned] [usertype] low_sclk_interrupt_threshold
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2277:17: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2579:33: sparse: sparse: restricted __be16 degrades to integer
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2580:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] ActivityLevel @@ got restricted __be16 [usertype] @@
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2580:57: sparse: expected unsigned short [usertype] ActivityLevel
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2580:57: sparse: got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2585:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] tmp @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2585:37: sparse: expected unsigned int [usertype] tmp
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2585:37: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2587:33: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2587:33: sparse: expected unsigned int [usertype] value
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2587:33: sparse: got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2599:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [assigned] [usertype] tmp @@ got restricted __be32 [usertype] @@
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2599:37: sparse: expected unsigned int [assigned] [usertype] tmp
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2599:37: sparse: got restricted __be32 [usertype]
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:2602:33: sparse: sparse: too many warnings
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
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 e098bc9612c2b60f94920461d71c92962a916e73
vim +1989 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1886
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1887 static int tonga_populate_tdc_limit(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1888 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1889 uint16_t tdc_limit;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1890 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1891 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1892 const struct tonga_pt_defaults *defaults = smu_data->power_tune_defaults;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1893 struct phm_ppt_v1_information *table_info =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1894 (struct phm_ppt_v1_information *)(hwmgr->pptable);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1895
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1896 /* TDC number of fraction bits are changed from 8 to 7
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1897 * for Fiji as requested by SMC team
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1898 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1899 tdc_limit = (uint16_t)(table_info->cac_dtp_table->usTDC * 256);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1900 smu_data->power_tune_table.TDC_VDDC_PkgLimit =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @1901 CONVERT_FROM_HOST_TO_SMC_US(tdc_limit);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1902 smu_data->power_tune_table.TDC_VDDC_ThrottleReleaseLimitPerc =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1903 defaults->tdc_vddc_throttle_release_limit_perc;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1904 smu_data->power_tune_table.TDC_MAWt = defaults->tdc_mawt;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1905
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1906 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1907 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1908
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1909 static int tonga_populate_dw8(struct pp_hwmgr *hwmgr, uint32_t fuse_table_offset)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1910 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1911 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1912 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1913 const struct tonga_pt_defaults *defaults = smu_data->power_tune_defaults;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1914 uint32_t temp;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1915
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1916 if (smu7_read_smc_sram_dword(hwmgr,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1917 fuse_table_offset +
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1918 offsetof(SMU72_Discrete_PmFuses, TdcWaterfallCtl),
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1919 (uint32_t *)&temp, SMC_RAM_END))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1920 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1921 "Attempt to read PmFuses.DW6 "
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1922 "(SviLoadLineEn) from SMC Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1923 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1924 else
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1925 smu_data->power_tune_table.TdcWaterfallCtl = defaults->tdc_waterfall_ctl;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1926
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1927 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1928 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1929
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1930 static int tonga_populate_temperature_scaler(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1931 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1932 int i;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1933 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1934 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1935
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1936 /* Currently not used. Set all to zero. */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1937 for (i = 0; i < 16; i++)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1938 smu_data->power_tune_table.LPMLTemperatureScaler[i] = 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1939
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1940 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1941 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1942
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1943 static int tonga_populate_fuzzy_fan(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1944 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1945 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1946
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1947 if ((hwmgr->thermal_controller.advanceFanControlParameters.
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1948 usFanOutputSensitivity & (1 << 15)) ||
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1949 (hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity == 0))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1950 hwmgr->thermal_controller.advanceFanControlParameters.
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1951 usFanOutputSensitivity = hwmgr->thermal_controller.
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1952 advanceFanControlParameters.usDefaultFanOutputSensitivity;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1953
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @1954 smu_data->power_tune_table.FuzzyFan_PwmSetDelta =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1955 PP_HOST_TO_SMC_US(hwmgr->thermal_controller.
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1956 advanceFanControlParameters.usFanOutputSensitivity);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1957 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1958 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1959
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1960 static int tonga_populate_gnb_lpml(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1961 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1962 int i;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1963 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1964 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1965
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1966 /* Currently not used. Set all to zero. */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1967 for (i = 0; i < 16; i++)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1968 smu_data->power_tune_table.GnbLPML[i] = 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1969
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1970 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1971 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1972
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1973 static int tonga_populate_bapm_vddc_base_leakage_sidd(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1974 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1975 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1976 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1977 struct phm_ppt_v1_information *table_info =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1978 (struct phm_ppt_v1_information *)(hwmgr->pptable);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1979 uint16_t hi_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageHiSidd;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1980 uint16_t lo_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageLoSidd;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1981 struct phm_cac_tdp_table *cac_table = table_info->cac_dtp_table;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1982
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1983 hi_sidd = (uint16_t)(cac_table->usHighCACLeakage / 100 * 256);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1984 lo_sidd = (uint16_t)(cac_table->usLowCACLeakage / 100 * 256);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1985
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1986 smu_data->power_tune_table.BapmVddCBaseLeakageHiSidd =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @1987 CONVERT_FROM_HOST_TO_SMC_US(hi_sidd);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1988 smu_data->power_tune_table.BapmVddCBaseLeakageLoSidd =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @1989 CONVERT_FROM_HOST_TO_SMC_US(lo_sidd);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1990
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1991 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1992 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1993
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1994 static int tonga_populate_pm_fuses(struct pp_hwmgr *hwmgr)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1995 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1996 struct tonga_smumgr *smu_data =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1997 (struct tonga_smumgr *)(hwmgr->smu_backend);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1998 uint32_t pm_fuse_table_offset;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 1999
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2000 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2001 PHM_PlatformCaps_PowerContainment)) {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2002 if (smu7_read_smc_sram_dword(hwmgr,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2003 SMU72_FIRMWARE_HEADER_LOCATION +
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2004 offsetof(SMU72_Firmware_Header, PmFuseTable),
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2005 &pm_fuse_table_offset, SMC_RAM_END))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2006 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2007 "Attempt to get pm_fuse_table_offset Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2008 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2009
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2010 /* DW6 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2011 if (tonga_populate_svi_load_line(hwmgr))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2012 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2013 "Attempt to populate SviLoadLine Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2014 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2015 /* DW7 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2016 if (tonga_populate_tdc_limit(hwmgr))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2017 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2018 "Attempt to populate TDCLimit Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2019 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2020 /* DW8 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2021 if (tonga_populate_dw8(hwmgr, pm_fuse_table_offset))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2022 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2023 "Attempt to populate TdcWaterfallCtl Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2024 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2025
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2026 /* DW9-DW12 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2027 if (tonga_populate_temperature_scaler(hwmgr) != 0)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2028 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2029 "Attempt to populate LPMLTemperatureScaler Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2030 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2031
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2032 /* DW13-DW14 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2033 if (tonga_populate_fuzzy_fan(hwmgr))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2034 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2035 "Attempt to populate Fuzzy Fan "
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2036 "Control parameters Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2037 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2038
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2039 /* DW15-DW18 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2040 if (tonga_populate_gnb_lpml(hwmgr))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2041 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2042 "Attempt to populate GnbLPML Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2043 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2044
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2045 /* DW20 */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2046 if (tonga_populate_bapm_vddc_base_leakage_sidd(hwmgr))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2047 PP_ASSERT_WITH_CODE(
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2048 false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2049 "Attempt to populate BapmVddCBaseLeakage "
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2050 "Hi and Lo Sidd Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2051 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2052
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2053 if (smu7_copy_bytes_to_smc(hwmgr, pm_fuse_table_offset,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2054 (uint8_t *)&smu_data->power_tune_table,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2055 sizeof(struct SMU72_Discrete_PmFuses), SMC_RAM_END))
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2056 PP_ASSERT_WITH_CODE(false,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2057 "Attempt to download PmFuseTable Failed !",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2058 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2059 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2060 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2061 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2062
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2063 static int tonga_populate_mc_reg_address(struct pp_hwmgr *hwmgr,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2064 SMU72_Discrete_MCRegisters *mc_reg_table)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2065 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2066 const struct tonga_smumgr *smu_data = (struct tonga_smumgr *)hwmgr->smu_backend;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2067
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2068 uint32_t i, j;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2069
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2070 for (i = 0, j = 0; j < smu_data->mc_reg_table.last; j++) {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2071 if (smu_data->mc_reg_table.validflag & 1<<j) {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2072 PP_ASSERT_WITH_CODE(
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2073 i < SMU72_DISCRETE_MC_REGISTER_ARRAY_SIZE,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2074 "Index of mc_reg_table->address[] array "
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2075 "out of boundary",
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2076 return -EINVAL);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @2077 mc_reg_table->address[i].s0 =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2078 PP_HOST_TO_SMC_US(smu_data->mc_reg_table.mc_reg_address[j].s0);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @2079 mc_reg_table->address[i].s1 =
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2080 PP_HOST_TO_SMC_US(smu_data->mc_reg_table.mc_reg_address[j].s1);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2081 i++;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2082 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2083 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2084
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2085 mc_reg_table->last = (uint8_t)i;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2086
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2087 return 0;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2088 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2089
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2090 /*convert register values from driver to SMC format */
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2091 static void tonga_convert_mc_registers(
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2092 const struct tonga_mc_reg_entry *entry,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2093 SMU72_Discrete_MCRegisterSet *data,
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2094 uint32_t num_entries, uint32_t valid_flag)
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2095 {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2096 uint32_t i, j;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2097
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2098 for (i = 0, j = 0; j < num_entries; j++) {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2099 if (valid_flag & 1<<j) {
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 @2100 data->value[i] = PP_HOST_TO_SMC_UL(entry->mc_data[j]);
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2101 i++;
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2102 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2103 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2104 }
4dddc212a354cc3 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c Rex Zhu 2017-10-09 2105
:::::: The code at line 1989 was first introduced by commit
:::::: 4dddc212a354cc3924d60ca240cd338b0a3f6c49 drm/amd/pp: remove tonga_smc/smumgr split.
:::::: TO: Rex Zhu <Rex.Zhu(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v2 09/10] fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile
by kernel test robot
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.9-rc1 next-20200821]
[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/Konstantin-Komarov/fs-NTFS-read-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/ntfs3/inode.c: In function 'ntfs_read_mft':
>> fs/ntfs3/inode.c:40:7: warning: variable 'is_encrypted' set but not used [-Wunused-but-set-variable]
40 | bool is_encrypted = false;
| ^~~~~~~~~~~~
--
fs/ntfs3/fsntfs.c: In function 'ntfs_extend_init':
>> fs/ntfs3/fsntfs.c:171:14: warning: variable 'ni' set but not used [-Wunused-but-set-variable]
171 | ntfs_inode *ni;
| ^~
fs/ntfs3/fsntfs.c: In function 'ntfs_loadlog_and_replay':
>> fs/ntfs3/fsntfs.c:241:11: warning: variable 'log_size' set but not used [-Wunused-but-set-variable]
241 | u32 idx, log_size;
| ^~~~~~~~
fs/ntfs3/fsntfs.c: In function 'ntfs_insert_security':
>> fs/ntfs3/fsntfs.c:1764:6: warning: variable 'used' set but not used [-Wunused-but-set-variable]
1764 | u32 used, next, left;
| ^~~~
--
fs/ntfs3/frecord.c: In function 'ni_ins_attr_ext':
>> fs/ntfs3/frecord.c:670:11: warning: variable 'rec' set but not used [-Wunused-but-set-variable]
670 | MFT_REC *rec;
| ^~~
--
fs/ntfs3/index.c: In function 'indx_find_sort':
>> fs/ntfs3/index.c:1148:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
1148 | int err;
| ^~~
--
fs/ntfs3/attrib.c: In function 'attr_set_size':
>> fs/ntfs3/attrib.c:478:10: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
478 | size_t cnt, free;
| ^~~
fs/ntfs3/attrib.c: In function 'attr_data_get_block':
>> fs/ntfs3/attrib.c:769:28: warning: variable 'new_alloc' set but not used [-Wunused-but-set-variable]
769 | u64 new_size, total_size, new_alloc;
| ^~~~~~~~~
--
fs/ntfs3/super.c: In function 'ntfs_fill_super':
>> fs/ntfs3/super.c:831:16: warning: unsigned conversion from 'long long int' to 'long unsigned int' changes value from '220979426414' to '1936094318' [-Woverflow]
831 | sb->s_magic = 0x337366746e; // "ntfs3"
| ^~~~~~~~~~~~
--
fs/ntfs3/fslog.c: In function 'log_replay':
>> fs/ntfs3/fslog.c:3895:7: warning: variable 'vbo_to_clear' set but not used [-Wunused-but-set-variable]
3895 | u32 vbo_to_clear = page_size * 2;
| ^~~~~~~~~~~~
>> fs/ntfs3/fslog.c:3894:8: warning: variable 'clear_log' set but not used [-Wunused-but-set-variable]
3894 | bool clear_log = true;
| ^~~~~~~~~
>> fs/ntfs3/fslog.c:3780:17: warning: variable 'clst_off' set but not used [-Wunused-but-set-variable]
3780 | u32 saved_len, clst_off, rec_len, transact_id;
| ^~~~~~~~
# https://github.com/0day-ci/linux/commit/cc8413bd463338b0ad2b6369a619196d5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Komarov/fs-NTFS-read-write-driver-GPL-implementation-by-Paragon-Software/20200822-003353
git checkout cc8413bd463338b0ad2b6369a619196d5b77798a
vim +/is_encrypted +40 fs/ntfs3/inode.c
9106c639ce09ddc Konstantin Komarov 2020-08-21 22
9106c639ce09ddc Konstantin Komarov 2020-08-21 23 /*
9106c639ce09ddc Konstantin Komarov 2020-08-21 24 * ntfs_read_mft
9106c639ce09ddc Konstantin Komarov 2020-08-21 25 *
9106c639ce09ddc Konstantin Komarov 2020-08-21 26 * reads record and parses MFT
9106c639ce09ddc Konstantin Komarov 2020-08-21 27 */
9106c639ce09ddc Konstantin Komarov 2020-08-21 28 static struct inode *ntfs_read_mft(struct inode *inode,
9106c639ce09ddc Konstantin Komarov 2020-08-21 29 const struct cpu_str *name,
9106c639ce09ddc Konstantin Komarov 2020-08-21 30 const MFT_REF *ref)
9106c639ce09ddc Konstantin Komarov 2020-08-21 31 {
9106c639ce09ddc Konstantin Komarov 2020-08-21 32 int err = 0;
9106c639ce09ddc Konstantin Komarov 2020-08-21 33 ntfs_inode *ni = ntfs_i(inode);
9106c639ce09ddc Konstantin Komarov 2020-08-21 34 struct super_block *sb = inode->i_sb;
9106c639ce09ddc Konstantin Komarov 2020-08-21 35 ntfs_sb_info *sbi = sb->s_fs_info;
9106c639ce09ddc Konstantin Komarov 2020-08-21 36 mode_t mode = 0;
9106c639ce09ddc Konstantin Komarov 2020-08-21 37 ATTR_STD_INFO5 *std5 = NULL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 38 ATTR_LIST_ENTRY *le;
9106c639ce09ddc Konstantin Komarov 2020-08-21 39 ATTRIB *attr;
9106c639ce09ddc Konstantin Komarov 2020-08-21 @40 bool is_encrypted = false;
9106c639ce09ddc Konstantin Komarov 2020-08-21 41 bool is_match = false;
9106c639ce09ddc Konstantin Komarov 2020-08-21 42 bool is_root = false;
9106c639ce09ddc Konstantin Komarov 2020-08-21 43 bool is_dir;
9106c639ce09ddc Konstantin Komarov 2020-08-21 44 unsigned long ino = inode->i_ino;
9106c639ce09ddc Konstantin Komarov 2020-08-21 45 u32 rp_fa = 0, asize, t32;
9106c639ce09ddc Konstantin Komarov 2020-08-21 46 u16 roff, rsize, names = 0;
9106c639ce09ddc Konstantin Komarov 2020-08-21 47 const ATTR_FILE_NAME *fname = NULL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 48 const INDEX_ROOT *root;
9106c639ce09ddc Konstantin Komarov 2020-08-21 49 REPARSE_DATA_BUFFER rp; // 0x18 bytes
9106c639ce09ddc Konstantin Komarov 2020-08-21 50 u64 t64;
9106c639ce09ddc Konstantin Komarov 2020-08-21 51 MFT_REC *rec;
9106c639ce09ddc Konstantin Komarov 2020-08-21 52 struct runs_tree *run;
9106c639ce09ddc Konstantin Komarov 2020-08-21 53
9106c639ce09ddc Konstantin Komarov 2020-08-21 54 inode->i_op = NULL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 55
9106c639ce09ddc Konstantin Komarov 2020-08-21 56 err = mi_init(&ni->mi, sbi, ino);
9106c639ce09ddc Konstantin Komarov 2020-08-21 57 if (err)
9106c639ce09ddc Konstantin Komarov 2020-08-21 58 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 59
9106c639ce09ddc Konstantin Komarov 2020-08-21 60 if (!sbi->mft.ni && ino == MFT_REC_MFT && !sb->s_root) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 61 t64 = sbi->mft.lbo >> sbi->cluster_bits;
9106c639ce09ddc Konstantin Komarov 2020-08-21 62 t32 = bytes_to_cluster(sbi, MFT_REC_VOL * sbi->record_size);
9106c639ce09ddc Konstantin Komarov 2020-08-21 63 sbi->mft.ni = ni;
9106c639ce09ddc Konstantin Komarov 2020-08-21 64 init_rwsem(&ni->file.run_lock);
9106c639ce09ddc Konstantin Komarov 2020-08-21 65
9106c639ce09ddc Konstantin Komarov 2020-08-21 66 if (!run_add_entry(&ni->file.run, 0, t64, t32)) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 67 err = -ENOMEM;
9106c639ce09ddc Konstantin Komarov 2020-08-21 68 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 69 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 70 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 71
9106c639ce09ddc Konstantin Komarov 2020-08-21 72 err = mi_read(&ni->mi, ino == MFT_REC_MFT);
9106c639ce09ddc Konstantin Komarov 2020-08-21 73
9106c639ce09ddc Konstantin Komarov 2020-08-21 74 if (err)
9106c639ce09ddc Konstantin Komarov 2020-08-21 75 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 76
9106c639ce09ddc Konstantin Komarov 2020-08-21 77 rec = ni->mi.mrec;
9106c639ce09ddc Konstantin Komarov 2020-08-21 78
9106c639ce09ddc Konstantin Komarov 2020-08-21 79 if (sbi->flags & NTFS_FLAGS_LOG_REPLAING)
9106c639ce09ddc Konstantin Komarov 2020-08-21 80 ;
9106c639ce09ddc Konstantin Komarov 2020-08-21 81 else if (ref->seq != rec->seq) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 82 err = -EINVAL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 83 ntfs_error(sb, "MFT: r=%lx, expect seq=%x instead of %x!", ino,
9106c639ce09ddc Konstantin Komarov 2020-08-21 84 le16_to_cpu(ref->seq), le16_to_cpu(rec->seq));
9106c639ce09ddc Konstantin Komarov 2020-08-21 85 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 86 } else if (!is_rec_inuse(rec)) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 87 err = -EINVAL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 88 ntfs_error(sb, "Inode r=%x is not in use!", (u32)ino);
9106c639ce09ddc Konstantin Komarov 2020-08-21 89 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 90 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 91
9106c639ce09ddc Konstantin Komarov 2020-08-21 92 if (le32_to_cpu(rec->total) != sbi->record_size) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 93 // bad inode?
9106c639ce09ddc Konstantin Komarov 2020-08-21 94 err = -EINVAL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 95 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 96 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 97
9106c639ce09ddc Konstantin Komarov 2020-08-21 98 if (!is_rec_base(rec))
9106c639ce09ddc Konstantin Komarov 2020-08-21 99 goto Ok;
9106c639ce09ddc Konstantin Komarov 2020-08-21 100
9106c639ce09ddc Konstantin Komarov 2020-08-21 101 /* record should contain $I30 root */
9106c639ce09ddc Konstantin Komarov 2020-08-21 102 is_dir = rec->flags & RECORD_FLAG_DIR;
9106c639ce09ddc Konstantin Komarov 2020-08-21 103
9106c639ce09ddc Konstantin Komarov 2020-08-21 104 inode->i_generation = le16_to_cpu(rec->seq);
9106c639ce09ddc Konstantin Komarov 2020-08-21 105
9106c639ce09ddc Konstantin Komarov 2020-08-21 106 /* Enumerate all struct Attributes MFT */
9106c639ce09ddc Konstantin Komarov 2020-08-21 107 le = NULL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 108 attr = NULL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 109 next_attr:
9106c639ce09ddc Konstantin Komarov 2020-08-21 110 err = -EINVAL;
9106c639ce09ddc Konstantin Komarov 2020-08-21 111 attr = ni_enum_attr_ex(ni, attr, &le);
9106c639ce09ddc Konstantin Komarov 2020-08-21 112 if (!attr)
9106c639ce09ddc Konstantin Komarov 2020-08-21 113 goto end_enum;
9106c639ce09ddc Konstantin Komarov 2020-08-21 114
9106c639ce09ddc Konstantin Komarov 2020-08-21 115 if (le && le->vcn) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 116 if (ino == MFT_REC_MFT && attr->type == ATTR_DATA) {
9106c639ce09ddc Konstantin Komarov 2020-08-21 117 run = &ni->file.run;
9106c639ce09ddc Konstantin Komarov 2020-08-21 118 asize = le32_to_cpu(attr->size);
9106c639ce09ddc Konstantin Komarov 2020-08-21 119 goto attr_unpack_run;
9106c639ce09ddc Konstantin Komarov 2020-08-21 120 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 121 goto next_attr;
9106c639ce09ddc Konstantin Komarov 2020-08-21 122 }
9106c639ce09ddc Konstantin Komarov 2020-08-21 123
9106c639ce09ddc Konstantin Komarov 2020-08-21 124 roff = attr->non_res ? 0 : le16_to_cpu(attr->res.data_off);
9106c639ce09ddc Konstantin Komarov 2020-08-21 125 rsize = attr->non_res ? 0 : le32_to_cpu(attr->res.data_size);
9106c639ce09ddc Konstantin Komarov 2020-08-21 126 asize = le32_to_cpu(attr->size);
9106c639ce09ddc Konstantin Komarov 2020-08-21 127
9106c639ce09ddc Konstantin Komarov 2020-08-21 128 if (attr->type != ATTR_STD)
9106c639ce09ddc Konstantin Komarov 2020-08-21 129 goto check_list;
9106c639ce09ddc Konstantin Komarov 2020-08-21 130
9106c639ce09ddc Konstantin Komarov 2020-08-21 131 if (attr->non_res)
9106c639ce09ddc Konstantin Komarov 2020-08-21 132 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 133
9106c639ce09ddc Konstantin Komarov 2020-08-21 134 if (asize < sizeof(ATTR_STD_INFO) + roff)
9106c639ce09ddc Konstantin Komarov 2020-08-21 135 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 136 if (rsize < sizeof(ATTR_STD_INFO))
9106c639ce09ddc Konstantin Komarov 2020-08-21 137 goto out;
9106c639ce09ddc Konstantin Komarov 2020-08-21 138
9106c639ce09ddc Konstantin Komarov 2020-08-21 139 if (std5)
9106c639ce09ddc Konstantin Komarov 2020-08-21 140 goto next_attr;
9106c639ce09ddc Konstantin Komarov 2020-08-21 141
9106c639ce09ddc Konstantin Komarov 2020-08-21 142 std5 = Add2Ptr(attr, roff);
9106c639ce09ddc Konstantin Komarov 2020-08-21 143
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years