[iommu:x86/vt-d 41/59] drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d
head: 423d39d8518c1bba12e0889a92beeddbb1502392
commit: a8e5f04458c4e496eada2b029ce96713bb6c388d [41/59] iommu/io-pgtable: Remove non-strict quirk
config: nds32-buildonly-randconfig-r001-20210820 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/commit/?id...
git remote add iommu https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
git fetch --no-tags iommu x86/vt-d
git checkout a8e5f04458c4e496eada2b029ce96713bb6c388d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/iommu/
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/init.h:5,
from arch/nds32/include/asm/nds32.h:11,
from arch/nds32/include/asm/irqflags.h:4,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg.h:15,
from ./arch/nds32/include/generated/asm/cmpxchg.h:1,
from include/asm-generic/atomic.h:12,
from ./arch/nds32/include/generated/asm/atomic.h:1,
from include/linux/atomic.h:7,
from drivers/iommu/io-pgtable-arm-v7s.c:24:
drivers/iommu/io-pgtable-arm-v7s.c: In function '__arm_v7s_unmap':
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
703 | } else if (!gather->queued) {
| ^~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
703 | } else if (!gather->queued) {
| ^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
703 | } else if (!gather->queued) {
| ^~
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
703 | } else if (!gather->queued) {
| ^~
>> drivers/iommu/io-pgtable-arm-v7s.c:703:43: error: 'struct iommu_iotlb_gather' has no member named 'queued'
703 | } else if (!gather->queued) {
| ^~
include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value'
69 | (cond) ? \
| ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm-v7s.c:703:32: note: in expansion of macro 'if'
703 | } else if (!gather->queued) {
| ^~
vim +703 drivers/iommu/io-pgtable-arm-v7s.c
650
651 static size_t __arm_v7s_unmap(struct arm_v7s_io_pgtable *data,
652 struct iommu_iotlb_gather *gather,
653 unsigned long iova, size_t size, int lvl,
654 arm_v7s_iopte *ptep)
655 {
656 arm_v7s_iopte pte[ARM_V7S_CONT_PAGES];
657 struct io_pgtable *iop = &data->iop;
658 int idx, i = 0, num_entries = size >> ARM_V7S_LVL_SHIFT(lvl);
659
660 /* Something went horribly wrong and we ran out of page table */
661 if (WARN_ON(lvl > 2))
662 return 0;
663
664 idx = ARM_V7S_LVL_IDX(iova, lvl, &iop->cfg);
665 ptep += idx;
666 do {
667 pte[i] = READ_ONCE(ptep[i]);
668 if (WARN_ON(!ARM_V7S_PTE_IS_VALID(pte[i])))
669 return 0;
670 } while (++i < num_entries);
671
672 /*
673 * If we've hit a contiguous 'large page' entry at this level, it
674 * needs splitting first, unless we're unmapping the whole lot.
675 *
676 * For splitting, we can't rewrite 16 PTEs atomically, and since we
677 * can't necessarily assume TEX remap we don't have a software bit to
678 * mark live entries being split. In practice (i.e. DMA API code), we
679 * will never be splitting large pages anyway, so just wrap this edge
680 * case in a lock for the sake of correctness and be done with it.
681 */
682 if (num_entries <= 1 && arm_v7s_pte_is_cont(pte[0], lvl)) {
683 unsigned long flags;
684
685 spin_lock_irqsave(&data->split_lock, flags);
686 pte[0] = arm_v7s_split_cont(data, iova, idx, lvl, ptep);
687 spin_unlock_irqrestore(&data->split_lock, flags);
688 }
689
690 /* If the size matches this level, we're in the right place */
691 if (num_entries) {
692 size_t blk_size = ARM_V7S_BLOCK_SIZE(lvl);
693
694 __arm_v7s_set_pte(ptep, 0, num_entries, &iop->cfg);
695
696 for (i = 0; i < num_entries; i++) {
697 if (ARM_V7S_PTE_IS_TABLE(pte[i], lvl)) {
698 /* Also flush any partial walks */
699 io_pgtable_tlb_flush_walk(iop, iova, blk_size,
700 ARM_V7S_BLOCK_SIZE(lvl + 1));
701 ptep = iopte_deref(pte[i], lvl, data);
702 __arm_v7s_free_table(ptep, lvl + 1, data);
> 703 } else if (!gather->queued) {
704 io_pgtable_tlb_add_page(iop, gather, iova, blk_size);
705 }
706 iova += blk_size;
707 }
708 return size;
709 } else if (lvl == 1 && !ARM_V7S_PTE_IS_TABLE(pte[0], lvl)) {
710 /*
711 * Insert a table at the next level to map the old region,
712 * minus the part we want to unmap
713 */
714 return arm_v7s_split_blk_unmap(data, gather, iova, size, pte[0],
715 ptep);
716 }
717
718 /* Keep on walkin' */
719 ptep = iopte_deref(pte[0], lvl, data);
720 return __arm_v7s_unmap(data, gather, iova, size, lvl + 1, ptep);
721 }
722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.10 2/13] include/linux/page_pinner.h:73:78: warning: unused parameter 'page_list'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 25a0835d5ec1cc4462d853326945cd4dfec4fe17
commit: ddc4a48797352076586ef3ab79c6bfaba08fd06e [2/13] ANDROID: mm: page_pinner: introduce failure_tracking feature
config: i386-randconfig-r021-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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 remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout ddc4a48797352076586ef3ab79c6bfaba08fd06e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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/pgtable.h:630:13: warning: unused parameter 'orig_pte' [-Wunused-parameter]
pte_t orig_pte)
^
include/linux/pgtable.h:642:53: warning: unused parameter 'page' [-Wunused-parameter]
static inline int arch_prepare_to_swap(struct page *page)
^
include/linux/pgtable.h:649:50: warning: unused parameter 'type' [-Wunused-parameter]
static inline void arch_swap_invalidate_page(int type, pgoff_t offset)
^
include/linux/pgtable.h:649:64: warning: unused parameter 'offset' [-Wunused-parameter]
static inline void arch_swap_invalidate_page(int type, pgoff_t offset)
^
include/linux/pgtable.h:653:50: warning: unused parameter 'type' [-Wunused-parameter]
static inline void arch_swap_invalidate_area(int type)
^
include/linux/pgtable.h:659:50: warning: unused parameter 'entry' [-Wunused-parameter]
static inline void arch_swap_restore(swp_entry_t entry, struct page *page)
^
include/linux/pgtable.h:659:70: warning: unused parameter 'page' [-Wunused-parameter]
static inline void arch_swap_restore(swp_entry_t entry, struct page *page)
^
include/linux/pgtable.h:828:28: warning: unused parameter 'old_pte' [-Wunused-parameter]
pte_t *ptep, pte_t old_pte, pte_t pte)
^
include/linux/pgtable.h:942:40: warning: unused parameter 'pte' [-Wunused-parameter]
static inline int pte_soft_dirty(pte_t pte)
^
include/linux/pgtable.h:947:40: warning: unused parameter 'pmd' [-Wunused-parameter]
static inline int pmd_soft_dirty(pmd_t pmd)
^
include/linux/pgtable.h:977:44: warning: unused parameter 'pte' [-Wunused-parameter]
static inline int pte_swp_soft_dirty(pte_t pte)
^
include/linux/pgtable.h:992:44: warning: unused parameter 'pmd' [-Wunused-parameter]
static inline int pmd_swp_soft_dirty(pmd_t pmd)
^
include/linux/pgtable.h:1084:55: warning: unused parameter 'addr' [-Wunused-parameter]
static inline unsigned long my_zero_pfn(unsigned long addr)
^
include/linux/pgtable.h:1116:36: warning: unused parameter 'pmd' [-Wunused-parameter]
static inline int pmd_devmap(pmd_t pmd)
^
include/linux/pgtable.h:1120:36: warning: unused parameter 'pud' [-Wunused-parameter]
static inline int pud_devmap(pud_t pud)
^
include/linux/pgtable.h:1124:36: warning: unused parameter 'pgd' [-Wunused-parameter]
static inline int pgd_devmap(pgd_t pgd)
^
include/linux/pgtable.h:1133:40: warning: unused parameter 'pud' [-Wunused-parameter]
static inline int pud_trans_huge(pud_t pud)
^
include/linux/pgtable.h:1154:45: warning: unused parameter 'pud' [-Wunused-parameter]
static inline int pud_trans_unstable(pud_t *pud)
^
include/linux/pgtable.h:1286:38: warning: unused parameter 'pte' [-Wunused-parameter]
static inline int pte_protnone(pte_t pte)
^
include/linux/pgtable.h:1291:38: warning: unused parameter 'pmd' [-Wunused-parameter]
static inline int pmd_protnone(pmd_t pmd)
^
include/linux/pgtable.h:1305:39: warning: unused parameter 'p4d' [-Wunused-parameter]
static inline int p4d_set_huge(p4d_t *p4d, phys_addr_t addr, pgprot_t prot)
^
include/linux/pgtable.h:1305:56: warning: unused parameter 'addr' [-Wunused-parameter]
static inline int p4d_set_huge(p4d_t *p4d, phys_addr_t addr, pgprot_t prot)
^
include/linux/pgtable.h:1305:71: warning: unused parameter 'prot' [-Wunused-parameter]
static inline int p4d_set_huge(p4d_t *p4d, phys_addr_t addr, pgprot_t prot)
^
include/linux/pgtable.h:1309:41: warning: unused parameter 'p4d' [-Wunused-parameter]
static inline int p4d_clear_huge(p4d_t *p4d)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:35:
include/linux/page_pinner.h:58:51: warning: unused parameter 'page' [-Wunused-parameter]
static inline void reset_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:58:70: warning: unused parameter 'order' [-Wunused-parameter]
static inline void reset_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:61:50: warning: unused parameter 'page' [-Wunused-parameter]
static inline void free_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:61:69: warning: unused parameter 'order' [-Wunused-parameter]
static inline void free_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:64:49: warning: unused parameter 'page' [-Wunused-parameter]
static inline void set_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:64:68: warning: unused parameter 'order' [-Wunused-parameter]
static inline void set_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:67:50: warning: unused parameter 'page' [-Wunused-parameter]
static inline void dump_page_pinner(struct page *page)
^
include/linux/page_pinner.h:70:62: warning: unused parameter 'page' [-Wunused-parameter]
static inline void page_pinner_migration_failed(struct page *page)
^
>> include/linux/page_pinner.h:73:78: warning: unused parameter 'page_list' [-Wunused-parameter]
static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:738:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
include/linux/percpu-rwsem.h:142:11: warning: unused parameter 'read' [-Wunused-parameter]
bool read, unsigned long ip)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:738:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:240:
In file included from include/linux/quota.h:40:
include/linux/percpu_counter.h:102:17: warning: unused parameter 'gfp' [-Wunused-parameter]
gfp_t gfp)
^
include/linux/percpu_counter.h:108:66: warning: unused parameter 'fbc' [-Wunused-parameter]
static inline void percpu_counter_destroy(struct percpu_counter *fbc)
^
include/linux/percpu_counter.h:128:67: warning: unused parameter 'batch' [-Wunused-parameter]
__percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)
^
include/linux/percpu_counter.h:142:70: warning: unused parameter 'batch' [-Wunused-parameter]
percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
^
include/linux/percpu_counter.h:171:70: warning: unused parameter 'fbc' [-Wunused-parameter]
static inline bool percpu_counter_initialized(struct percpu_counter *fbc)
^
include/linux/percpu_counter.h:176:63: warning: unused parameter 'fbc' [-Wunused-parameter]
static inline void percpu_counter_sync(struct percpu_counter *fbc)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:738:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:240:
include/linux/quota.h:520:51: warning: unused parameter 'qid' [-Wunused-parameter]
static inline void quota_send_warning(struct kqid qid, dev_t dev,
^
include/linux/quota.h:520:62: warning: unused parameter 'dev' [-Wunused-parameter]
static inline void quota_send_warning(struct kqid qid, dev_t dev,
^
include/linux/quota.h:521:22: warning: unused parameter 'warntype' [-Wunused-parameter]
const char warntype)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:738:
In file included from include/linux/huge_mm.h:8:
include/linux/fs.h:3350:45: warning: unused parameter 'fmt' [-Wunused-parameter]
void __simple_attr_check_format(const char *fmt, ...)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
In file included from include/linux/mm.h:738:
include/linux/huge_mm.h:22:59: warning: unused parameter 'vmf' [-Wunused-parameter]
static inline void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud)
^
include/linux/huge_mm.h:22:70: warning: unused parameter 'orig_pud' [-Wunused-parameter]
static inline void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud)
^
include/linux/huge_mm.h:311:43: warning: unused parameter 'pud' [-Wunused-parameter]
static inline bool is_huge_zero_pud(pud_t pud)
^
In file included from drivers/gpu/drm/i915/i915_drv.c:32:
In file included from include/linux/oom.h:11:
include/linux/mm.h:1150:59: warning: unused parameter 'page' [-Wunused-parameter]
static inline bool is_zone_device_page(const struct page *page)
^
include/linux/mm.h:1179:56: warning: unused parameter 'page' [-Wunused-parameter]
static inline bool page_is_devmap_managed(struct page *page)
^
include/linux/mm.h:1184:57: warning: unused parameter 'page' [-Wunused-parameter]
static inline void put_devmap_managed_page(struct page *page)
^
include/linux/mm.h:1427:64: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int page_cpupid_xchg_last(struct page *page, int cpupid)
^
include/linux/mm.h:1437:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_nid(int cpupid)
^
include/linux/mm.h:1442:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_pid(int cpupid)
^
include/linux/mm.h:1447:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_cpu(int cpupid)
^
include/linux/mm.h:1452:41: warning: unused parameter 'nid' [-Wunused-parameter]
static inline int cpu_pid_to_cpupid(int nid, int pid)
^
include/linux/mm.h:1452:50: warning: unused parameter 'pid' [-Wunused-parameter]
static inline int cpu_pid_to_cpupid(int nid, int pid)
^
include/linux/mm.h:1457:41: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline bool cpupid_pid_unset(int cpupid)
^
include/linux/mm.h:1462:56: warning: unused parameter 'page' [-Wunused-parameter]
--
include/linux/percpu_counter.h:176:63: warning: unused parameter 'fbc' [-Wunused-parameter]
static inline void percpu_counter_sync(struct percpu_counter *fbc)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:9:
In file included from include/linux/fs.h:240:
include/linux/quota.h:520:51: warning: unused parameter 'qid' [-Wunused-parameter]
static inline void quota_send_warning(struct kqid qid, dev_t dev,
^
include/linux/quota.h:520:62: warning: unused parameter 'dev' [-Wunused-parameter]
static inline void quota_send_warning(struct kqid qid, dev_t dev,
^
include/linux/quota.h:521:22: warning: unused parameter 'warntype' [-Wunused-parameter]
const char warntype)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:9:
include/linux/fs.h:3350:45: warning: unused parameter 'fmt' [-Wunused-parameter]
void __simple_attr_check_format(const char *fmt, ...)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:29:
In file included from include/linux/memremap.h:5:
include/linux/ioport.h:319:51: warning: unused parameter 'res' [-Wunused-parameter]
static inline void revoke_devmem(struct resource *res) { };
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:29:
include/linux/memremap.h:146:56: warning: unused parameter 'dev' [-Wunused-parameter]
static inline void *devm_memremap_pages(struct device *dev,
^
include/linux/memremap.h:147:23: warning: unused parameter 'pgmap' [-Wunused-parameter]
struct dev_pagemap *pgmap)
^
include/linux/memremap.h:158:55: warning: unused parameter 'dev' [-Wunused-parameter]
static inline void devm_memunmap_pages(struct device *dev,
^
include/linux/memremap.h:159:23: warning: unused parameter 'pgmap' [-Wunused-parameter]
struct dev_pagemap *pgmap)
^
include/linux/memremap.h:163:65: warning: unused parameter 'pfn' [-Wunused-parameter]
static inline struct dev_pagemap *get_dev_pagemap(unsigned long pfn,
^
include/linux/memremap.h:164:23: warning: unused parameter 'pgmap' [-Wunused-parameter]
struct dev_pagemap *pgmap)
^
include/linux/memremap.h:169:56: warning: unused parameter 'pgmap' [-Wunused-parameter]
static inline bool pgmap_pfn_valid(struct dev_pagemap *pgmap, unsigned long pfn)
^
include/linux/memremap.h:169:77: warning: unused parameter 'pfn' [-Wunused-parameter]
static inline bool pgmap_pfn_valid(struct dev_pagemap *pgmap, unsigned long pfn)
^
include/linux/memremap.h:174:68: warning: unused parameter 'altmap' [-Wunused-parameter]
static inline unsigned long vmem_altmap_offset(struct vmem_altmap *altmap)
^
include/linux/memremap.h:179:57: warning: unused parameter 'altmap' [-Wunused-parameter]
static inline void vmem_altmap_free(struct vmem_altmap *altmap,
^
include/linux/memremap.h:180:17: warning: unused parameter 'nr_pfns' [-Wunused-parameter]
unsigned long nr_pfns)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:35:
include/linux/page_pinner.h:58:51: warning: unused parameter 'page' [-Wunused-parameter]
static inline void reset_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:58:70: warning: unused parameter 'order' [-Wunused-parameter]
static inline void reset_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:61:50: warning: unused parameter 'page' [-Wunused-parameter]
static inline void free_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:61:69: warning: unused parameter 'order' [-Wunused-parameter]
static inline void free_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:64:49: warning: unused parameter 'page' [-Wunused-parameter]
static inline void set_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:64:68: warning: unused parameter 'order' [-Wunused-parameter]
static inline void set_page_pinner(struct page *page, unsigned int order)
^
include/linux/page_pinner.h:67:50: warning: unused parameter 'page' [-Wunused-parameter]
static inline void dump_page_pinner(struct page *page)
^
include/linux/page_pinner.h:70:62: warning: unused parameter 'page' [-Wunused-parameter]
static inline void page_pinner_migration_failed(struct page *page)
^
>> include/linux/page_pinner.h:73:78: warning: unused parameter 'page_list' [-Wunused-parameter]
static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:738:
include/linux/huge_mm.h:22:59: warning: unused parameter 'vmf' [-Wunused-parameter]
static inline void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud)
^
include/linux/huge_mm.h:22:70: warning: unused parameter 'orig_pud' [-Wunused-parameter]
static inline void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud)
^
include/linux/huge_mm.h:311:43: warning: unused parameter 'pud' [-Wunused-parameter]
static inline bool is_huge_zero_pud(pud_t pud)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
include/linux/mm.h:1150:59: warning: unused parameter 'page' [-Wunused-parameter]
static inline bool is_zone_device_page(const struct page *page)
^
include/linux/mm.h:1179:56: warning: unused parameter 'page' [-Wunused-parameter]
static inline bool page_is_devmap_managed(struct page *page)
^
include/linux/mm.h:1184:57: warning: unused parameter 'page' [-Wunused-parameter]
static inline void put_devmap_managed_page(struct page *page)
^
include/linux/mm.h:1427:64: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int page_cpupid_xchg_last(struct page *page, int cpupid)
^
include/linux/mm.h:1437:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_nid(int cpupid)
^
include/linux/mm.h:1442:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_pid(int cpupid)
^
include/linux/mm.h:1447:37: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline int cpupid_to_cpu(int cpupid)
^
include/linux/mm.h:1452:41: warning: unused parameter 'nid' [-Wunused-parameter]
static inline int cpu_pid_to_cpupid(int nid, int pid)
^
include/linux/mm.h:1452:50: warning: unused parameter 'pid' [-Wunused-parameter]
static inline int cpu_pid_to_cpupid(int nid, int pid)
^
include/linux/mm.h:1457:41: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline bool cpupid_pid_unset(int cpupid)
^
include/linux/mm.h:1462:56: warning: unused parameter 'page' [-Wunused-parameter]
static inline void page_cpupid_reset_last(struct page *page)
^
include/linux/mm.h:1466:57: warning: unused parameter 'task' [-Wunused-parameter]
static inline bool cpupid_match_pid(struct task_struct *task, int cpupid)
^
include/linux/mm.h:1466:67: warning: unused parameter 'cpupid' [-Wunused-parameter]
static inline bool cpupid_match_pid(struct task_struct *task, int cpupid)
^
include/linux/mm.h:1509:52: warning: unused parameter 'page' [-Wunused-parameter]
static inline u8 page_kasan_tag(const struct page *page)
^
include/linux/mm.h:1514:52: warning: unused parameter 'page' [-Wunused-parameter]
static inline void page_kasan_tag_set(struct page *page, u8 tag) { }
^
include/linux/mm.h:1514:61: warning: unused parameter 'tag' [-Wunused-parameter]
static inline void page_kasan_tag_set(struct page *page, u8 tag) { }
^
include/linux/mm.h:1515:54: warning: unused parameter 'page' [-Wunused-parameter]
static inline void page_kasan_tag_reset(struct page *page) { }
^
include/linux/mm.h:1524:56: warning: unused parameter 'page' [-Wunused-parameter]
static inline pg_data_t *page_pgdat(const struct page *page)
^
include/linux/mm.h:1555:36: warning: unused parameter 'pfn' [-Wunused-parameter]
unsigned long node, unsigned long pfn)
^
include/linux/mm.h:1575:58: warning: unused parameter 'page' [-Wunused-parameter]
static inline struct mem_cgroup *page_memcg(struct page *page)
^
include/linux/mm.h:1579:62: warning: unused parameter 'page' [-Wunused-parameter]
static inline struct mem_cgroup *page_memcg_rcu(struct page *page)
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
In file included from arch/x86/include/asm/iomap.h:10:
In file included from include/linux/mm.h:1589:
include/linux/vmstat.h:392:42: warning: unused parameter 'cpu' [-Wunused-parameter]
static inline void cpu_vm_stats_fold(int cpu) { }
^
include/linux/vmstat.h:395:48: warning: unused parameter 'zone' [-Wunused-parameter]
static inline void drain_zonestat(struct zone *zone,
^
include/linux/vmstat.h:396:28: warning: unused parameter 'pset' [-Wunused-parameter]
struct per_cpu_pageset *pset) { }
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
In file included from include/linux/io-mapping.h:33:
..
vim +/page_list +73 include/linux/page_pinner.h
49
50 static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
51 {
52 if (!static_branch_unlikely(&failure_tracking))
53 return;
54
55 __page_pinner_mark_migration_failed_pages(page_list);
56 }
57 #else
58 static inline void reset_page_pinner(struct page *page, unsigned int order)
59 {
60 }
61 static inline void free_page_pinner(struct page *page, unsigned int order)
62 {
63 }
> 64 static inline void set_page_pinner(struct page *page, unsigned int order)
65 {
66 }
67 static inline void dump_page_pinner(struct page *page)
68 {
69 }
70 static inline void page_pinner_migration_failed(struct page *page)
71 {
72 }
> 73 static inline void page_pinner_mark_migration_failed_pages(struct list_head *page_list)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[mcgrof-next:20210819-add-disk-error-handling-next 49/90] arch/um/drivers/ubd_kern.c:930:24: error: expected ';' before 'out_cleanup_tags'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210819-add-disk-error-handling-next
head: 4a644c3aee4465306a79d393956c84ce8925fa6b
commit: 21b0a62497fab52bffe4e6fc20be46e7f8d4bbb1 [49/90] um/drivers/ubd_kern: add error handling support for add_disk()
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/com...
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20210819-add-disk-error-handling-next
git checkout 21b0a62497fab52bffe4e6fc20be46e7f8d4bbb1
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash
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 >>):
arch/um/drivers/ubd_kern.c: In function 'ubd_add':
>> arch/um/drivers/ubd_kern.c:930:24: error: expected ';' before 'out_cleanup_tags'
930 | blk_cleanup_disk(disk)
| ^
| ;
931 | out_cleanup_tags:
| ~~~~~~~~~~~~~~~~
>> arch/um/drivers/ubd_kern.c:915:3: error: label 'out_cleanup_tags' used but not defined
915 | goto out_cleanup_tags;
| ^~~~
vim +930 arch/um/drivers/ubd_kern.c
883
884 static int ubd_add(int n, char **error_out)
885 {
886 struct ubd *ubd_dev = &ubd_devs[n];
887 struct gendisk *disk;
888 int err = 0;
889
890 if(ubd_dev->file == NULL)
891 goto out;
892
893 err = ubd_file_size(ubd_dev, &ubd_dev->size);
894 if(err < 0){
895 *error_out = "Couldn't determine size of device's file";
896 goto out;
897 }
898
899 ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
900
901 ubd_dev->tag_set.ops = &ubd_mq_ops;
902 ubd_dev->tag_set.queue_depth = 64;
903 ubd_dev->tag_set.numa_node = NUMA_NO_NODE;
904 ubd_dev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
905 ubd_dev->tag_set.driver_data = ubd_dev;
906 ubd_dev->tag_set.nr_hw_queues = 1;
907
908 err = blk_mq_alloc_tag_set(&ubd_dev->tag_set);
909 if (err)
910 goto out;
911
912 disk = blk_mq_alloc_disk(&ubd_dev->tag_set, ubd_dev);
913 if (IS_ERR(disk)) {
914 err = PTR_ERR(disk);
> 915 goto out_cleanup_tags;
916 }
917 ubd_dev->queue = disk->queue;
918
919 blk_queue_write_cache(ubd_dev->queue, true, false);
920 blk_queue_max_segments(ubd_dev->queue, MAX_SG);
921 blk_queue_segment_boundary(ubd_dev->queue, PAGE_SIZE - 1);
922 err = ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, disk);
923 if (err)
924 goto out_cleanup_disk;
925
926 ubd_gendisk[n] = disk;
927 return 0;
928
929 out_cleanup_disk:
> 930 blk_cleanup_disk(disk)
931 out_cleanup_tags:
932 blk_mq_free_tag_set(&ubd_dev->tag_set);
933 out:
934 return err;
935 }
936
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 8362/9113] fs/cifs/smb1ops.c:279:16: warning: taking address of packed member 'smb_buf_length' of class or structure 'smb_hdr' may result in an unaligned pointer value
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 33e65b1f975cd2814fc0ea9617250fc4c1d7a553
commit: d3986619ac1ea40c4f4a988edd4d0c569ed5cd9c [8362/9113] cifs: move functions that depend on DES to smp1ops.c
config: i386-randconfig-r033-20210819 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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
# 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 d3986619ac1ea40c4f4a988edd4d0c569ed5cd9c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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 >>):
clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
In file included from fs/cifs/smb1ops.c:10:
In file included from include/linux/pagemap.h:8:
In file included from include/linux/mm.h:10:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:8:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from arch/x86/include/asm/preempt.h:7:
In file included from include/linux/thread_info.h:60:
arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
oldframe = __builtin_frame_address(1);
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
frame = __builtin_frame_address(2);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/cifs/smb1ops.c:279:16: warning: taking address of packed member 'smb_buf_length' of class or structure 'smb_hdr' may result in an unaligned pointer value [-Waddress-of-packed-member]
be32_add_cpu(&pSMB->hdr.smb_buf_length, count);
^~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
vim +279 fs/cifs/smb1ops.c
177
178 /*
179 * Issue a TREE_CONNECT request.
180 */
181 static int
182 CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
183 const char *tree, struct cifs_tcon *tcon,
184 const struct nls_table *nls_codepage)
185 {
186 struct smb_hdr *smb_buffer;
187 struct smb_hdr *smb_buffer_response;
188 TCONX_REQ *pSMB;
189 TCONX_RSP *pSMBr;
190 unsigned char *bcc_ptr;
191 int rc = 0;
192 int length;
193 __u16 bytes_left, count;
194
195 if (ses == NULL)
196 return -EIO;
197
198 smb_buffer = cifs_buf_get();
199 if (smb_buffer == NULL)
200 return -ENOMEM;
201
202 smb_buffer_response = smb_buffer;
203
204 header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX,
205 NULL /*no tid */ , 4 /*wct */ );
206
207 smb_buffer->Mid = get_next_mid(ses->server);
208 smb_buffer->Uid = ses->Suid;
209 pSMB = (TCONX_REQ *) smb_buffer;
210 pSMBr = (TCONX_RSP *) smb_buffer_response;
211
212 pSMB->AndXCommand = 0xFF;
213 pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
214 bcc_ptr = &pSMB->Password[0];
215 if (tcon->pipe || (ses->server->sec_mode & SECMODE_USER)) {
216 pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
217 *bcc_ptr = 0; /* password is null byte */
218 bcc_ptr++; /* skip password */
219 /* already aligned so no need to do it below */
220 } else {
221 pSMB->PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
222 /* BB FIXME add code to fail this if NTLMv2 or Kerberos
223 specified as required (when that support is added to
224 the vfs in the future) as only NTLM or the much
225 weaker LANMAN (which we do not send by default) is accepted
226 by Samba (not sure whether other servers allow
227 NTLMv2 password here) */
228 #ifdef CONFIG_CIFS_WEAK_PW_HASH
229 if ((global_secflags & CIFSSEC_MAY_LANMAN) &&
230 (ses->sectype == LANMAN))
231 calc_lanman_hash(tcon->password, ses->server->cryptkey,
232 ses->server->sec_mode &
233 SECMODE_PW_ENCRYPT ? true : false,
234 bcc_ptr);
235 else
236 #endif /* CIFS_WEAK_PW_HASH */
237 rc = SMBNTencrypt(tcon->password, ses->server->cryptkey,
238 bcc_ptr, nls_codepage);
239 if (rc) {
240 cifs_dbg(FYI, "%s Can't generate NTLM rsp. Error: %d\n",
241 __func__, rc);
242 cifs_buf_release(smb_buffer);
243 return rc;
244 }
245
246 bcc_ptr += CIFS_AUTH_RESP_SIZE;
247 if (ses->capabilities & CAP_UNICODE) {
248 /* must align unicode strings */
249 *bcc_ptr = 0; /* null byte password */
250 bcc_ptr++;
251 }
252 }
253
254 if (ses->server->sign)
255 smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
256
257 if (ses->capabilities & CAP_STATUS32) {
258 smb_buffer->Flags2 |= SMBFLG2_ERR_STATUS;
259 }
260 if (ses->capabilities & CAP_DFS) {
261 smb_buffer->Flags2 |= SMBFLG2_DFS;
262 }
263 if (ses->capabilities & CAP_UNICODE) {
264 smb_buffer->Flags2 |= SMBFLG2_UNICODE;
265 length =
266 cifs_strtoUTF16((__le16 *) bcc_ptr, tree,
267 6 /* max utf8 char length in bytes */ *
268 (/* server len*/ + 256 /* share len */), nls_codepage);
269 bcc_ptr += 2 * length; /* convert num 16 bit words to bytes */
270 bcc_ptr += 2; /* skip trailing null */
271 } else { /* ASCII */
272 strcpy(bcc_ptr, tree);
273 bcc_ptr += strlen(tree) + 1;
274 }
275 strcpy(bcc_ptr, "?????");
276 bcc_ptr += strlen("?????");
277 bcc_ptr += 1;
278 count = bcc_ptr - &pSMB->Password[0];
> 279 be32_add_cpu(&pSMB->hdr.smb_buf_length, count);
280 pSMB->ByteCount = cpu_to_le16(count);
281
282 rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, &length,
283 0);
284
285 /* above now done in SendReceive */
286 if (rc == 0) {
287 bool is_unicode;
288
289 tcon->tidStatus = CifsGood;
290 tcon->need_reconnect = false;
291 tcon->tid = smb_buffer_response->Tid;
292 bcc_ptr = pByteArea(smb_buffer_response);
293 bytes_left = get_bcc(smb_buffer_response);
294 length = strnlen(bcc_ptr, bytes_left - 2);
295 if (smb_buffer->Flags2 & SMBFLG2_UNICODE)
296 is_unicode = true;
297 else
298 is_unicode = false;
299
300
301 /* skip service field (NB: this field is always ASCII) */
302 if (length == 3) {
303 if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') &&
304 (bcc_ptr[2] == 'C')) {
305 cifs_dbg(FYI, "IPC connection\n");
306 tcon->ipc = true;
307 tcon->pipe = true;
308 }
309 } else if (length == 2) {
310 if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) {
311 /* the most common case */
312 cifs_dbg(FYI, "disk share connection\n");
313 }
314 }
315 bcc_ptr += length + 1;
316 bytes_left -= (length + 1);
317 strlcpy(tcon->treeName, tree, sizeof(tcon->treeName));
318
319 /* mostly informational -- no need to fail on error here */
320 kfree(tcon->nativeFileSystem);
321 tcon->nativeFileSystem = cifs_strndup_from_utf16(bcc_ptr,
322 bytes_left, is_unicode,
323 nls_codepage);
324
325 cifs_dbg(FYI, "nativeFileSystem=%s\n", tcon->nativeFileSystem);
326
327 if ((smb_buffer_response->WordCount == 3) ||
328 (smb_buffer_response->WordCount == 7))
329 /* field is in same location */
330 tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport);
331 else
332 tcon->Flags = 0;
333 cifs_dbg(FYI, "Tcon flags: 0x%x\n", tcon->Flags);
334 }
335
336 cifs_buf_release(smb_buffer);
337 return rc;
338 }
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/watchdog/indydog.c:116:24: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d992fe5318d8d7af9510b879439a3c7f283da442
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 4 months ago
config: mips-randconfig-s032-20210820 (attached as .config)
compiler: mips64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
drivers/watchdog/indydog.c:110:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct watchdog_info * @@
drivers/watchdog/indydog.c:110:35: sparse: expected void [noderef] __user *to
drivers/watchdog/indydog.c:110:35: sparse: got struct watchdog_info *
>> drivers/watchdog/indydog.c:116:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
drivers/watchdog/indydog.c:116:24: sparse: expected int [noderef] __user *__p
drivers/watchdog/indydog.c:116:24: sparse: got int *
>> drivers/watchdog/indydog.c:119:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const [noderef] __user *__p @@ got int * @@
drivers/watchdog/indydog.c:119:21: sparse: expected int const [noderef] __user *__p
drivers/watchdog/indydog.c:119:21: sparse: got int *
drivers/watchdog/indydog.c:135:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
drivers/watchdog/indydog.c:135:24: sparse: expected int [noderef] __user *__p
drivers/watchdog/indydog.c:135:24: sparse: got int *
drivers/watchdog/indydog.c:153:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *write )( ... ) @@ got long ( * )( ... ) @@
drivers/watchdog/indydog.c:153:27: sparse: expected long ( *write )( ... )
drivers/watchdog/indydog.c:153:27: sparse: got long ( * )( ... )
vim +116 drivers/watchdog/indydog.c
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 97
9b9dbcca3fa13a drivers/watchdog/indydog.c Alan Cox 2008-05-19 98 static long indydog_ioctl(struct file *file, unsigned int cmd,
9b9dbcca3fa13a drivers/watchdog/indydog.c Alan Cox 2008-05-19 99 unsigned long arg)
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 100 {
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 101 int options, retval = -EINVAL;
42747d712de56c drivers/watchdog/indydog.c Wim Van Sebroeck 2009-12-26 102 static const struct watchdog_info ident = {
e73a780272a46e drivers/watchdog/indydog.c Wim Van Sebroeck 2009-05-11 103 .options = WDIOF_KEEPALIVEPING,
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 104 .firmware_version = 0,
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 105 .identity = "Hardware Watchdog for SGI IP22",
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 106 };
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 107
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 108 switch (cmd) {
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 109 case WDIOC_GETSUPPORT:
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 110 if (copy_to_user((struct watchdog_info *)arg,
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 111 &ident, sizeof(ident)))
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 112 return -EFAULT;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 113 return 0;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 114 case WDIOC_GETSTATUS:
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 115 case WDIOC_GETBOOTSTATUS:
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 @116 return put_user(0, (int *)arg);
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 117 case WDIOC_SETOPTIONS:
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 118 {
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 @119 if (get_user(options, (int *)arg))
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 120 return -EFAULT;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 121 if (options & WDIOS_DISABLECARD) {
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 122 indydog_stop();
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 123 retval = 0;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 124 }
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 125 if (options & WDIOS_ENABLECARD) {
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 126 indydog_start();
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 127 retval = 0;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 128 }
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 129 return retval;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 130 }
0c06090c9472db drivers/watchdog/indydog.c Wim Van Sebroeck 2008-07-18 131 case WDIOC_KEEPALIVE:
0c06090c9472db drivers/watchdog/indydog.c Wim Van Sebroeck 2008-07-18 132 indydog_ping();
0c06090c9472db drivers/watchdog/indydog.c Wim Van Sebroeck 2008-07-18 133 return 0;
0c06090c9472db drivers/watchdog/indydog.c Wim Van Sebroeck 2008-07-18 134 case WDIOC_GETTIMEOUT:
0c06090c9472db drivers/watchdog/indydog.c Wim Van Sebroeck 2008-07-18 135 return put_user(WATCHDOG_TIMEOUT, (int *)arg);
9b9dbcca3fa13a drivers/watchdog/indydog.c Alan Cox 2008-05-19 136 default:
9b9dbcca3fa13a drivers/watchdog/indydog.c Alan Cox 2008-05-19 137 return -ENOTTY;
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 138 }
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 139 }
^1da177e4c3f41 drivers/char/watchdog/indydog.c Linus Torvalds 2005-04-16 140
:::::: The code at line 116 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *'
by kernel test robot
Hi Carl,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d992fe5318d8d7af9510b879439a3c7f283da442
commit: 322b60ceb0f321b4b9c41717f7306c0dbaf0279b ath11k: do not depend on ARCH_QCOM for ath11k
date: 1 year ago
config: x86_64-randconfig-a013-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 322b60ceb0f321b4b9c41717f7306c0dbaf0279b
# 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 >>):
>> drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Wvoid-pointer-to-enum-cast]
ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +938 drivers/net/wireless/ath/ath11k/ahb.c
31858805f91ac7 Govind Singh 2020-05-08 903
d5c65159f28953 Kalle Valo 2019-11-23 904 static int ath11k_ahb_probe(struct platform_device *pdev)
d5c65159f28953 Kalle Valo 2019-11-23 905 {
d5c65159f28953 Kalle Valo 2019-11-23 906 struct ath11k_base *ab;
d5c65159f28953 Kalle Valo 2019-11-23 907 const struct of_device_id *of_id;
d5c65159f28953 Kalle Valo 2019-11-23 908 struct resource *mem_res;
d5c65159f28953 Kalle Valo 2019-11-23 909 void __iomem *mem;
d5c65159f28953 Kalle Valo 2019-11-23 910 int ret;
d5c65159f28953 Kalle Valo 2019-11-23 911
d5c65159f28953 Kalle Valo 2019-11-23 912 of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
d5c65159f28953 Kalle Valo 2019-11-23 913 if (!of_id) {
d5c65159f28953 Kalle Valo 2019-11-23 914 dev_err(&pdev->dev, "failed to find matching device tree id\n");
d5c65159f28953 Kalle Valo 2019-11-23 915 return -EINVAL;
d5c65159f28953 Kalle Valo 2019-11-23 916 }
d5c65159f28953 Kalle Valo 2019-11-23 917
c8ffcd12276061 Wei Yongjun 2020-05-08 918 mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 919 if (IS_ERR(mem)) {
d5c65159f28953 Kalle Valo 2019-11-23 920 dev_err(&pdev->dev, "ioremap error\n");
d5c65159f28953 Kalle Valo 2019-11-23 921 return PTR_ERR(mem);
d5c65159f28953 Kalle Valo 2019-11-23 922 }
d5c65159f28953 Kalle Valo 2019-11-23 923
d5c65159f28953 Kalle Valo 2019-11-23 924 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
d5c65159f28953 Kalle Valo 2019-11-23 925 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 926 dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
d5c65159f28953 Kalle Valo 2019-11-23 927 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 928 }
d5c65159f28953 Kalle Valo 2019-11-23 929
630ad41c195c70 Govind Singh 2020-05-08 930 ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
d5c65159f28953 Kalle Valo 2019-11-23 931 if (!ab) {
d5c65159f28953 Kalle Valo 2019-11-23 932 dev_err(&pdev->dev, "failed to allocate ath11k base\n");
d5c65159f28953 Kalle Valo 2019-11-23 933 return -ENOMEM;
d5c65159f28953 Kalle Valo 2019-11-23 934 }
d5c65159f28953 Kalle Valo 2019-11-23 935
31858805f91ac7 Govind Singh 2020-05-08 936 ab->hif.ops = &ath11k_ahb_hif_ops;
d5c65159f28953 Kalle Valo 2019-11-23 937 ab->pdev = pdev;
d5c65159f28953 Kalle Valo 2019-11-23 @938 ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
d5c65159f28953 Kalle Valo 2019-11-23 939 ab->mem = mem;
d5c65159f28953 Kalle Valo 2019-11-23 940 ab->mem_len = resource_size(mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 941 platform_set_drvdata(pdev, ab);
d5c65159f28953 Kalle Valo 2019-11-23 942
d5c65159f28953 Kalle Valo 2019-11-23 943 ret = ath11k_hal_srng_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 944 if (ret)
d5c65159f28953 Kalle Valo 2019-11-23 945 goto err_core_free;
d5c65159f28953 Kalle Valo 2019-11-23 946
d5c65159f28953 Kalle Valo 2019-11-23 947 ret = ath11k_ce_alloc_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 948 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 949 ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 950 goto err_hal_srng_deinit;
d5c65159f28953 Kalle Valo 2019-11-23 951 }
d5c65159f28953 Kalle Valo 2019-11-23 952
d5c65159f28953 Kalle Valo 2019-11-23 953 ath11k_ahb_init_qmi_ce_config(ab);
d5c65159f28953 Kalle Valo 2019-11-23 954
166e22b38aa3bc Anilkumar Kolli 2020-06-16 955 ret = ath11k_core_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 956 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 957 ath11k_err(ab, "failed to init core: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 958 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 959 }
d5c65159f28953 Kalle Valo 2019-11-23 960
166e22b38aa3bc Anilkumar Kolli 2020-06-16 961 ret = ath11k_ahb_config_irq(ab);
d5c65159f28953 Kalle Valo 2019-11-23 962 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 963 ath11k_err(ab, "failed to configure irq: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 964 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 965 }
d5c65159f28953 Kalle Valo 2019-11-23 966
d5c65159f28953 Kalle Valo 2019-11-23 967 return 0;
d5c65159f28953 Kalle Valo 2019-11-23 968
d5c65159f28953 Kalle Valo 2019-11-23 969 err_ce_free:
d5c65159f28953 Kalle Valo 2019-11-23 970 ath11k_ce_free_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 971
d5c65159f28953 Kalle Valo 2019-11-23 972 err_hal_srng_deinit:
d5c65159f28953 Kalle Valo 2019-11-23 973 ath11k_hal_srng_deinit(ab);
d5c65159f28953 Kalle Valo 2019-11-23 974
d5c65159f28953 Kalle Valo 2019-11-23 975 err_core_free:
d5c65159f28953 Kalle Valo 2019-11-23 976 ath11k_core_free(ab);
d5c65159f28953 Kalle Valo 2019-11-23 977 platform_set_drvdata(pdev, NULL);
d5c65159f28953 Kalle Valo 2019-11-23 978
d5c65159f28953 Kalle Valo 2019-11-23 979 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 980 }
d5c65159f28953 Kalle Valo 2019-11-23 981
:::::: The code at line 938 was first introduced by commit
:::::: d5c65159f2895379e11ca13f62feabe93278985d ath11k: driver for Qualcomm IEEE 802.11ax devices
:::::: TO: Kalle Valo <kvalo(a)codeaurora.org>
:::::: CC: Kalle Valo <kvalo(a)codeaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v3] ath10k: high latency fixes for beacon buffer
by kernel test robot
Hi Fabio,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ath6kl/ath-next]
[also build test WARNING on wireless-drivers-next/master wireless-drivers/master v5.14-rc6 next-20210819]
[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/Fabio-Estevam/ath10k-high-latenc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: arc-randconfig-p001-20210818 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/eb431ba513a87e043e8e8ba40f6f9509e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-Estevam/ath10k-high-latency-fixes-for-beacon-buffer/20210819-072934
git checkout eb431ba513a87e043e8e8ba40f6f9509e62111bd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
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 >>):
drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
>> drivers/net/wireless/ath/ath10k/mac.c:5586:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
5586 | arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
| ^
vim +5586 drivers/net/wireless/ath/ath10k/mac.c
5449
5450 /*
5451 * TODO:
5452 * Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
5453 * because we will send mgmt frames without CCK. This requirement
5454 * for P2P_FIND/GO_NEG should be handled by checking CCK flag
5455 * in the TX packet.
5456 */
5457 static int ath10k_add_interface(struct ieee80211_hw *hw,
5458 struct ieee80211_vif *vif)
5459 {
5460 struct ath10k *ar = hw->priv;
5461 struct ath10k_vif *arvif = (void *)vif->drv_priv;
5462 struct ath10k_peer *peer;
5463 enum wmi_sta_powersave_param param;
5464 int ret = 0;
5465 u32 value;
5466 int bit;
5467 int i;
5468 u32 vdev_param;
5469
5470 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
5471
5472 mutex_lock(&ar->conf_mutex);
5473
5474 memset(arvif, 0, sizeof(*arvif));
5475 ath10k_mac_txq_init(vif->txq);
5476
5477 arvif->ar = ar;
5478 arvif->vif = vif;
5479
5480 INIT_LIST_HEAD(&arvif->list);
5481 INIT_WORK(&arvif->ap_csa_work, ath10k_mac_vif_ap_csa_work);
5482 INIT_DELAYED_WORK(&arvif->connection_loss_work,
5483 ath10k_mac_vif_sta_connection_loss_work);
5484
5485 for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) {
5486 arvif->bitrate_mask.control[i].legacy = 0xffffffff;
5487 memset(arvif->bitrate_mask.control[i].ht_mcs, 0xff,
5488 sizeof(arvif->bitrate_mask.control[i].ht_mcs));
5489 memset(arvif->bitrate_mask.control[i].vht_mcs, 0xff,
5490 sizeof(arvif->bitrate_mask.control[i].vht_mcs));
5491 }
5492
5493 if (ar->num_peers >= ar->max_num_peers) {
5494 ath10k_warn(ar, "refusing vdev creation due to insufficient peer entry resources in firmware\n");
5495 ret = -ENOBUFS;
5496 goto err;
5497 }
5498
5499 if (ar->free_vdev_map == 0) {
5500 ath10k_warn(ar, "Free vdev map is empty, no more interfaces allowed.\n");
5501 ret = -EBUSY;
5502 goto err;
5503 }
5504 bit = __ffs64(ar->free_vdev_map);
5505
5506 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac create vdev %i map %llx\n",
5507 bit, ar->free_vdev_map);
5508
5509 arvif->vdev_id = bit;
5510 arvif->vdev_subtype =
5511 ath10k_wmi_get_vdev_subtype(ar, WMI_VDEV_SUBTYPE_NONE);
5512
5513 switch (vif->type) {
5514 case NL80211_IFTYPE_P2P_DEVICE:
5515 arvif->vdev_type = WMI_VDEV_TYPE_STA;
5516 arvif->vdev_subtype = ath10k_wmi_get_vdev_subtype
5517 (ar, WMI_VDEV_SUBTYPE_P2P_DEVICE);
5518 break;
5519 case NL80211_IFTYPE_UNSPECIFIED:
5520 case NL80211_IFTYPE_STATION:
5521 arvif->vdev_type = WMI_VDEV_TYPE_STA;
5522 if (vif->p2p)
5523 arvif->vdev_subtype = ath10k_wmi_get_vdev_subtype
5524 (ar, WMI_VDEV_SUBTYPE_P2P_CLIENT);
5525 break;
5526 case NL80211_IFTYPE_ADHOC:
5527 arvif->vdev_type = WMI_VDEV_TYPE_IBSS;
5528 break;
5529 case NL80211_IFTYPE_MESH_POINT:
5530 if (test_bit(WMI_SERVICE_MESH_11S, ar->wmi.svc_map)) {
5531 arvif->vdev_subtype = ath10k_wmi_get_vdev_subtype
5532 (ar, WMI_VDEV_SUBTYPE_MESH_11S);
5533 } else if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
5534 ret = -EINVAL;
5535 ath10k_warn(ar, "must load driver with rawmode=1 to add mesh interfaces\n");
5536 goto err;
5537 }
5538 arvif->vdev_type = WMI_VDEV_TYPE_AP;
5539 break;
5540 case NL80211_IFTYPE_AP:
5541 arvif->vdev_type = WMI_VDEV_TYPE_AP;
5542
5543 if (vif->p2p)
5544 arvif->vdev_subtype = ath10k_wmi_get_vdev_subtype
5545 (ar, WMI_VDEV_SUBTYPE_P2P_GO);
5546 break;
5547 case NL80211_IFTYPE_MONITOR:
5548 arvif->vdev_type = WMI_VDEV_TYPE_MONITOR;
5549 break;
5550 default:
5551 WARN_ON(1);
5552 break;
5553 }
5554
5555 /* Using vdev_id as queue number will make it very easy to do per-vif
5556 * tx queue locking. This shouldn't wrap due to interface combinations
5557 * but do a modulo for correctness sake and prevent using offchannel tx
5558 * queues for regular vif tx.
5559 */
5560 vif->cab_queue = arvif->vdev_id % (IEEE80211_MAX_QUEUES - 1);
5561 for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
5562 vif->hw_queue[i] = arvif->vdev_id % (IEEE80211_MAX_QUEUES - 1);
5563
5564 /* Some firmware revisions don't wait for beacon tx completion before
5565 * sending another SWBA event. This could lead to hardware using old
5566 * (freed) beacon data in some cases, e.g. tx credit starvation
5567 * combined with missed TBTT. This is very rare.
5568 *
5569 * On non-IOMMU-enabled hosts this could be a possible security issue
5570 * because hw could beacon some random data on the air. On
5571 * IOMMU-enabled hosts DMAR faults would occur in most cases and target
5572 * device would crash.
5573 *
5574 * Since there are no beacon tx completions (implicit nor explicit)
5575 * propagated to host the only workaround for this is to allocate a
5576 * DMA-coherent buffer for a lifetime of a vif and use it for all
5577 * beacon tx commands. Worst case for this approach is some beacons may
5578 * become corrupted, e.g. have garbled IEs or out-of-date TIM bitmap.
5579 */
5580 if (vif->type == NL80211_IFTYPE_ADHOC ||
5581 vif->type == NL80211_IFTYPE_MESH_POINT ||
5582 vif->type == NL80211_IFTYPE_AP) {
5583 if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) {
5584 arvif->beacon_buf = kmalloc(IEEE80211_MAX_FRAME_LEN,
5585 GFP_KERNEL);
> 5586 arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
5587 } else {
5588 arvif->beacon_buf =
5589 dma_alloc_coherent(ar->dev,
5590 IEEE80211_MAX_FRAME_LEN,
5591 &arvif->beacon_paddr,
5592 GFP_ATOMIC);
5593 }
5594 if (!arvif->beacon_buf) {
5595 ret = -ENOMEM;
5596 ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
5597 ret);
5598 goto err;
5599 }
5600 }
5601 if (test_bit(ATH10K_FLAG_HW_CRYPTO_DISABLED, &ar->dev_flags))
5602 arvif->nohwcrypt = true;
5603
5604 if (arvif->nohwcrypt &&
5605 !test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
5606 ret = -EINVAL;
5607 ath10k_warn(ar, "cryptmode module param needed for sw crypto\n");
5608 goto err;
5609 }
5610
5611 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev create %d (add interface) type %d subtype %d bcnmode %s\n",
5612 arvif->vdev_id, arvif->vdev_type, arvif->vdev_subtype,
5613 arvif->beacon_buf ? "single-buf" : "per-skb");
5614
5615 ret = ath10k_wmi_vdev_create(ar, arvif->vdev_id, arvif->vdev_type,
5616 arvif->vdev_subtype, vif->addr);
5617 if (ret) {
5618 ath10k_warn(ar, "failed to create WMI vdev %i: %d\n",
5619 arvif->vdev_id, ret);
5620 goto err;
5621 }
5622
5623 if (test_bit(WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
5624 ar->wmi.svc_map)) {
5625 vdev_param = ar->wmi.vdev_param->disable_4addr_src_lrn;
5626 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
5627 WMI_VDEV_DISABLE_4_ADDR_SRC_LRN);
5628 if (ret && ret != -EOPNOTSUPP) {
5629 ath10k_warn(ar, "failed to disable 4addr src lrn vdev %i: %d\n",
5630 arvif->vdev_id, ret);
5631 }
5632 }
5633
5634 ar->free_vdev_map &= ~(1LL << arvif->vdev_id);
5635 spin_lock_bh(&ar->data_lock);
5636 list_add(&arvif->list, &ar->arvifs);
5637 spin_unlock_bh(&ar->data_lock);
5638
5639 /* It makes no sense to have firmware do keepalives. mac80211 already
5640 * takes care of this with idle connection polling.
5641 */
5642 ret = ath10k_mac_vif_disable_keepalive(arvif);
5643 if (ret) {
5644 ath10k_warn(ar, "failed to disable keepalive on vdev %i: %d\n",
5645 arvif->vdev_id, ret);
5646 goto err_vdev_delete;
5647 }
5648
5649 arvif->def_wep_key_idx = -1;
5650
5651 vdev_param = ar->wmi.vdev_param->tx_encap_type;
5652 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
5653 ATH10K_HW_TXRX_NATIVE_WIFI);
5654 /* 10.X firmware does not support this VDEV parameter. Do not warn */
5655 if (ret && ret != -EOPNOTSUPP) {
5656 ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
5657 arvif->vdev_id, ret);
5658 goto err_vdev_delete;
5659 }
5660
5661 /* Configuring number of spatial stream for monitor interface is causing
5662 * target assert in qca9888 and qca6174.
5663 */
5664 if (ar->cfg_tx_chainmask && (vif->type != NL80211_IFTYPE_MONITOR)) {
5665 u16 nss = get_nss_from_chainmask(ar->cfg_tx_chainmask);
5666
5667 vdev_param = ar->wmi.vdev_param->nss;
5668 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
5669 nss);
5670 if (ret) {
5671 ath10k_warn(ar, "failed to set vdev %i chainmask 0x%x, nss %i: %d\n",
5672 arvif->vdev_id, ar->cfg_tx_chainmask, nss,
5673 ret);
5674 goto err_vdev_delete;
5675 }
5676 }
5677
5678 if (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
5679 arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
5680 ret = ath10k_peer_create(ar, vif, NULL, arvif->vdev_id,
5681 vif->addr, WMI_PEER_TYPE_DEFAULT);
5682 if (ret) {
5683 ath10k_warn(ar, "failed to create vdev %i peer for AP/IBSS: %d\n",
5684 arvif->vdev_id, ret);
5685 goto err_vdev_delete;
5686 }
5687
5688 spin_lock_bh(&ar->data_lock);
5689
5690 peer = ath10k_peer_find(ar, arvif->vdev_id, vif->addr);
5691 if (!peer) {
5692 ath10k_warn(ar, "failed to lookup peer %pM on vdev %i\n",
5693 vif->addr, arvif->vdev_id);
5694 spin_unlock_bh(&ar->data_lock);
5695 ret = -ENOENT;
5696 goto err_peer_delete;
5697 }
5698
5699 arvif->peer_id = find_first_bit(peer->peer_ids,
5700 ATH10K_MAX_NUM_PEER_IDS);
5701
5702 spin_unlock_bh(&ar->data_lock);
5703 } else {
5704 arvif->peer_id = HTT_INVALID_PEERID;
5705 }
5706
5707 if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
5708 ret = ath10k_mac_set_kickout(arvif);
5709 if (ret) {
5710 ath10k_warn(ar, "failed to set vdev %i kickout parameters: %d\n",
5711 arvif->vdev_id, ret);
5712 goto err_peer_delete;
5713 }
5714 }
5715
5716 if (arvif->vdev_type == WMI_VDEV_TYPE_STA) {
5717 param = WMI_STA_PS_PARAM_RX_WAKE_POLICY;
5718 value = WMI_STA_PS_RX_WAKE_POLICY_WAKE;
5719 ret = ath10k_wmi_set_sta_ps_param(ar, arvif->vdev_id,
5720 param, value);
5721 if (ret) {
5722 ath10k_warn(ar, "failed to set vdev %i RX wake policy: %d\n",
5723 arvif->vdev_id, ret);
5724 goto err_peer_delete;
5725 }
5726
5727 ret = ath10k_mac_vif_recalc_ps_wake_threshold(arvif);
5728 if (ret) {
5729 ath10k_warn(ar, "failed to recalc ps wake threshold on vdev %i: %d\n",
5730 arvif->vdev_id, ret);
5731 goto err_peer_delete;
5732 }
5733
5734 ret = ath10k_mac_vif_recalc_ps_poll_count(arvif);
5735 if (ret) {
5736 ath10k_warn(ar, "failed to recalc ps poll count on vdev %i: %d\n",
5737 arvif->vdev_id, ret);
5738 goto err_peer_delete;
5739 }
5740 }
5741
5742 ret = ath10k_mac_set_txbf_conf(arvif);
5743 if (ret) {
5744 ath10k_warn(ar, "failed to set txbf for vdev %d: %d\n",
5745 arvif->vdev_id, ret);
5746 goto err_peer_delete;
5747 }
5748
5749 ret = ath10k_mac_set_rts(arvif, ar->hw->wiphy->rts_threshold);
5750 if (ret) {
5751 ath10k_warn(ar, "failed to set rts threshold for vdev %d: %d\n",
5752 arvif->vdev_id, ret);
5753 goto err_peer_delete;
5754 }
5755
5756 arvif->txpower = vif->bss_conf.txpower;
5757 ret = ath10k_mac_txpower_recalc(ar);
5758 if (ret) {
5759 ath10k_warn(ar, "failed to recalc tx power: %d\n", ret);
5760 goto err_peer_delete;
5761 }
5762
5763 if (test_bit(WMI_SERVICE_RTT_RESPONDER_ROLE, ar->wmi.svc_map)) {
5764 vdev_param = ar->wmi.vdev_param->rtt_responder_role;
5765 ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
5766 arvif->ftm_responder);
5767
5768 /* It is harmless to not set FTM role. Do not warn */
5769 if (ret && ret != -EOPNOTSUPP)
5770 ath10k_warn(ar, "failed to set vdev %i FTM Responder: %d\n",
5771 arvif->vdev_id, ret);
5772 }
5773
5774 if (vif->type == NL80211_IFTYPE_MONITOR) {
5775 ar->monitor_arvif = arvif;
5776 ret = ath10k_monitor_recalc(ar);
5777 if (ret) {
5778 ath10k_warn(ar, "failed to recalc monitor: %d\n", ret);
5779 goto err_peer_delete;
5780 }
5781 }
5782
5783 spin_lock_bh(&ar->htt.tx_lock);
5784 if (!ar->tx_paused)
5785 ieee80211_wake_queue(ar->hw, arvif->vdev_id);
5786 spin_unlock_bh(&ar->htt.tx_lock);
5787
5788 mutex_unlock(&ar->conf_mutex);
5789 return 0;
5790
5791 err_peer_delete:
5792 if (arvif->vdev_type == WMI_VDEV_TYPE_AP ||
5793 arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
5794 ath10k_wmi_peer_delete(ar, arvif->vdev_id, vif->addr);
5795 ath10k_wait_for_peer_delete_done(ar, arvif->vdev_id,
5796 vif->addr);
5797 }
5798
5799 err_vdev_delete:
5800 ath10k_wmi_vdev_delete(ar, arvif->vdev_id);
5801 ar->free_vdev_map |= 1LL << arvif->vdev_id;
5802 spin_lock_bh(&ar->data_lock);
5803 list_del(&arvif->list);
5804 spin_unlock_bh(&ar->data_lock);
5805
5806 err:
5807 if (arvif->beacon_buf) {
5808 if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL)
5809 kfree(arvif->beacon_buf);
5810 else
5811 dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN,
5812 arvif->beacon_buf,
5813 arvif->beacon_paddr);
5814 arvif->beacon_buf = NULL;
5815 }
5816
5817 mutex_unlock(&ar->conf_mutex);
5818
5819 return ret;
5820 }
5821
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 7126/9113] fs/ntfs3/fsntfs.c:1874:9: warning: variable 'cnt' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 33e65b1f975cd2814fc0ea9617250fc4c1d7a553
commit: 6e5be40d32fb1907285277c02e74493ed43d77fe [7126/9113] fs/ntfs3: Add NTFS3 in fs/Kconfig and fs/Makefile
config: riscv-buildonly-randconfig-r005-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 6e5be40d32fb1907285277c02e74493ed43d77fe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from fs/ntfs3/fsntfs.c:8:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from fs/ntfs3/fsntfs.c:8:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from fs/ntfs3/fsntfs.c:8:
In file included from include/linux/blkdev.h:18:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> fs/ntfs3/fsntfs.c:1874:9: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
size_t cnt, off;
^
8 warnings generated.
vim +/cnt +1874 fs/ntfs3/fsntfs.c
82cae269cfa953 Konstantin Komarov 2021-08-13 1858
82cae269cfa953 Konstantin Komarov 2021-08-13 1859 /*
82cae269cfa953 Konstantin Komarov 2021-08-13 1860 * ntfs_security_init
82cae269cfa953 Konstantin Komarov 2021-08-13 1861 *
82cae269cfa953 Konstantin Komarov 2021-08-13 1862 * loads and parse $Secure
82cae269cfa953 Konstantin Komarov 2021-08-13 1863 */
82cae269cfa953 Konstantin Komarov 2021-08-13 1864 int ntfs_security_init(struct ntfs_sb_info *sbi)
82cae269cfa953 Konstantin Komarov 2021-08-13 1865 {
82cae269cfa953 Konstantin Komarov 2021-08-13 1866 int err;
82cae269cfa953 Konstantin Komarov 2021-08-13 1867 struct super_block *sb = sbi->sb;
82cae269cfa953 Konstantin Komarov 2021-08-13 1868 struct inode *inode;
82cae269cfa953 Konstantin Komarov 2021-08-13 1869 struct ntfs_inode *ni;
82cae269cfa953 Konstantin Komarov 2021-08-13 1870 struct MFT_REF ref;
82cae269cfa953 Konstantin Komarov 2021-08-13 1871 struct ATTRIB *attr;
82cae269cfa953 Konstantin Komarov 2021-08-13 1872 struct ATTR_LIST_ENTRY *le;
82cae269cfa953 Konstantin Komarov 2021-08-13 1873 u64 sds_size;
82cae269cfa953 Konstantin Komarov 2021-08-13 @1874 size_t cnt, off;
82cae269cfa953 Konstantin Komarov 2021-08-13 1875 struct NTFS_DE *ne;
82cae269cfa953 Konstantin Komarov 2021-08-13 1876 struct NTFS_DE_SII *sii_e;
82cae269cfa953 Konstantin Komarov 2021-08-13 1877 struct ntfs_fnd *fnd_sii = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1878 const struct INDEX_ROOT *root_sii;
82cae269cfa953 Konstantin Komarov 2021-08-13 1879 const struct INDEX_ROOT *root_sdh;
82cae269cfa953 Konstantin Komarov 2021-08-13 1880 struct ntfs_index *indx_sdh = &sbi->security.index_sdh;
82cae269cfa953 Konstantin Komarov 2021-08-13 1881 struct ntfs_index *indx_sii = &sbi->security.index_sii;
82cae269cfa953 Konstantin Komarov 2021-08-13 1882
82cae269cfa953 Konstantin Komarov 2021-08-13 1883 ref.low = cpu_to_le32(MFT_REC_SECURE);
82cae269cfa953 Konstantin Komarov 2021-08-13 1884 ref.high = 0;
82cae269cfa953 Konstantin Komarov 2021-08-13 1885 ref.seq = cpu_to_le16(MFT_REC_SECURE);
82cae269cfa953 Konstantin Komarov 2021-08-13 1886
82cae269cfa953 Konstantin Komarov 2021-08-13 1887 inode = ntfs_iget5(sb, &ref, &NAME_SECURE);
82cae269cfa953 Konstantin Komarov 2021-08-13 1888 if (IS_ERR(inode)) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1889 err = PTR_ERR(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13 1890 ntfs_err(sb, "Failed to load $Secure.");
82cae269cfa953 Konstantin Komarov 2021-08-13 1891 inode = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1892 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1893 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1894
82cae269cfa953 Konstantin Komarov 2021-08-13 1895 ni = ntfs_i(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13 1896
82cae269cfa953 Konstantin Komarov 2021-08-13 1897 le = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1898
82cae269cfa953 Konstantin Komarov 2021-08-13 1899 attr = ni_find_attr(ni, NULL, &le, ATTR_ROOT, SDH_NAME,
82cae269cfa953 Konstantin Komarov 2021-08-13 1900 ARRAY_SIZE(SDH_NAME), NULL, NULL);
82cae269cfa953 Konstantin Komarov 2021-08-13 1901 if (!attr) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1902 err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1903 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1904 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1905
82cae269cfa953 Konstantin Komarov 2021-08-13 1906 root_sdh = resident_data(attr);
82cae269cfa953 Konstantin Komarov 2021-08-13 1907 if (root_sdh->type != ATTR_ZERO ||
82cae269cfa953 Konstantin Komarov 2021-08-13 1908 root_sdh->rule != NTFS_COLLATION_TYPE_SECURITY_HASH) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1909 err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1910 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1911 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1912
82cae269cfa953 Konstantin Komarov 2021-08-13 1913 err = indx_init(indx_sdh, sbi, attr, INDEX_MUTEX_SDH);
82cae269cfa953 Konstantin Komarov 2021-08-13 1914 if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13 1915 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1916
82cae269cfa953 Konstantin Komarov 2021-08-13 1917 attr = ni_find_attr(ni, attr, &le, ATTR_ROOT, SII_NAME,
82cae269cfa953 Konstantin Komarov 2021-08-13 1918 ARRAY_SIZE(SII_NAME), NULL, NULL);
82cae269cfa953 Konstantin Komarov 2021-08-13 1919 if (!attr) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1920 err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1921 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1922 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1923
82cae269cfa953 Konstantin Komarov 2021-08-13 1924 root_sii = resident_data(attr);
82cae269cfa953 Konstantin Komarov 2021-08-13 1925 if (root_sii->type != ATTR_ZERO ||
82cae269cfa953 Konstantin Komarov 2021-08-13 1926 root_sii->rule != NTFS_COLLATION_TYPE_UINT) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1927 err = -EINVAL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1928 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1929 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1930
82cae269cfa953 Konstantin Komarov 2021-08-13 1931 err = indx_init(indx_sii, sbi, attr, INDEX_MUTEX_SII);
82cae269cfa953 Konstantin Komarov 2021-08-13 1932 if (err)
82cae269cfa953 Konstantin Komarov 2021-08-13 1933 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1934
82cae269cfa953 Konstantin Komarov 2021-08-13 1935 fnd_sii = fnd_get();
82cae269cfa953 Konstantin Komarov 2021-08-13 1936 if (!fnd_sii) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1937 err = -ENOMEM;
82cae269cfa953 Konstantin Komarov 2021-08-13 1938 goto out;
82cae269cfa953 Konstantin Komarov 2021-08-13 1939 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1940
82cae269cfa953 Konstantin Komarov 2021-08-13 1941 sds_size = inode->i_size;
82cae269cfa953 Konstantin Komarov 2021-08-13 1942
82cae269cfa953 Konstantin Komarov 2021-08-13 1943 /* Find the last valid Id */
82cae269cfa953 Konstantin Komarov 2021-08-13 1944 sbi->security.next_id = SECURITY_ID_FIRST;
82cae269cfa953 Konstantin Komarov 2021-08-13 1945 /* Always write new security at the end of bucket */
82cae269cfa953 Konstantin Komarov 2021-08-13 1946 sbi->security.next_off =
82cae269cfa953 Konstantin Komarov 2021-08-13 1947 Quad2Align(sds_size - SecurityDescriptorsBlockSize);
82cae269cfa953 Konstantin Komarov 2021-08-13 1948
82cae269cfa953 Konstantin Komarov 2021-08-13 1949 cnt = 0;
82cae269cfa953 Konstantin Komarov 2021-08-13 1950 off = 0;
82cae269cfa953 Konstantin Komarov 2021-08-13 1951 ne = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1952
82cae269cfa953 Konstantin Komarov 2021-08-13 1953 for (;;) {
82cae269cfa953 Konstantin Komarov 2021-08-13 1954 u32 next_id;
82cae269cfa953 Konstantin Komarov 2021-08-13 1955
82cae269cfa953 Konstantin Komarov 2021-08-13 1956 err = indx_find_raw(indx_sii, ni, root_sii, &ne, &off, fnd_sii);
82cae269cfa953 Konstantin Komarov 2021-08-13 1957 if (err || !ne)
82cae269cfa953 Konstantin Komarov 2021-08-13 1958 break;
82cae269cfa953 Konstantin Komarov 2021-08-13 1959
82cae269cfa953 Konstantin Komarov 2021-08-13 1960 sii_e = (struct NTFS_DE_SII *)ne;
82cae269cfa953 Konstantin Komarov 2021-08-13 1961 if (le16_to_cpu(ne->view.data_size) < SIZEOF_SECURITY_HDR)
82cae269cfa953 Konstantin Komarov 2021-08-13 1962 continue;
82cae269cfa953 Konstantin Komarov 2021-08-13 1963
82cae269cfa953 Konstantin Komarov 2021-08-13 1964 next_id = le32_to_cpu(sii_e->sec_id) + 1;
82cae269cfa953 Konstantin Komarov 2021-08-13 1965 if (next_id >= sbi->security.next_id)
82cae269cfa953 Konstantin Komarov 2021-08-13 1966 sbi->security.next_id = next_id;
82cae269cfa953 Konstantin Komarov 2021-08-13 1967
82cae269cfa953 Konstantin Komarov 2021-08-13 1968 cnt += 1;
82cae269cfa953 Konstantin Komarov 2021-08-13 1969 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1970
82cae269cfa953 Konstantin Komarov 2021-08-13 1971 sbi->security.ni = ni;
82cae269cfa953 Konstantin Komarov 2021-08-13 1972 inode = NULL;
82cae269cfa953 Konstantin Komarov 2021-08-13 1973 out:
82cae269cfa953 Konstantin Komarov 2021-08-13 1974 iput(inode);
82cae269cfa953 Konstantin Komarov 2021-08-13 1975 fnd_put(fnd_sii);
82cae269cfa953 Konstantin Komarov 2021-08-13 1976
82cae269cfa953 Konstantin Komarov 2021-08-13 1977 return err;
82cae269cfa953 Konstantin Komarov 2021-08-13 1978 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1979
:::::: The code at line 1874 was first introduced by commit
:::::: 82cae269cfa953032fbb8980a7d554d60fb00b17 fs/ntfs3: Add initialization of super block
:::::: TO: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
:::::: CC: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month