From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D943C433EF for ; Wed, 13 Jul 2022 16:50:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 23D2D940152; Wed, 13 Jul 2022 12:50:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1ECCB940134; Wed, 13 Jul 2022 12:50:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B557940152; Wed, 13 Jul 2022 12:50:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id EDA2F940134 for ; Wed, 13 Jul 2022 12:50:09 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CA7C5612 for ; Wed, 13 Jul 2022 16:50:09 +0000 (UTC) X-FDA: 79682664138.24.293B7FC Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf07.hostedemail.com (Postfix) with ESMTP id C409740038 for ; Wed, 13 Jul 2022 16:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657731008; x=1689267008; h=date:from:to:cc:subject:message-id:mime-version; bh=+qzb24l7L2X0d1ZBBDsvpXM065TA8txQAGQtmZ90o5E=; b=fHOcYRvjA/GJ4ZyffXj1rRpWvb5tnLwQ1J8+BM1nJ4wijQf2SPWey5H2 Htk5YOPqBtiY2w0DnKO3F0BCvb5SjtZxbNZR9Mmdzvvb01nlAvxX0UOo0 uaMeCWwUYun9Xqurdol+fxy2+yVRdapKwRyRyr5eIIPo/eB9LvVM4JyY1 RfuWdMK3/xkBoc/6KqBHWbn4aAM8rSnRKV6NvOWXlBtqmzAtaf6rSFpoc tUx3Vt6V0+msQkn3I1vrdSrNvuoNa33BgVug831mvbPnfjU1+rNr6qnv8 Q2MLR7Afe6XYcdZYNgvM4Ho0r3yEivBcenPU86H3nQXJjANCNIyQxm3vP Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="268314699" X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="268314699" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 09:50:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="922713702" Received: from lkp-server02.sh.intel.com (HELO 8708c84be1ad) ([10.239.97.151]) by fmsmga005.fm.intel.com with ESMTP; 13 Jul 2022 09:50:05 -0700 Received: from kbuild by 8708c84be1ad with local (Exim 4.95) (envelope-from ) id 1oBfYq-0003fb-SD; Wed, 13 Jul 2022 16:50:04 +0000 Date: Thu, 14 Jul 2022 00:49:29 +0800 From: kernel test robot To: Kalesh Singh Cc: kbuild-all@lists.01.org, Linux Memory Management List , Andrew Morton Subject: [linux-next:master 9509/10347] fs/libfs.c:1231:47: warning: Local variable 'anon_aops' shadows outer variable [shadowVariable] Message-ID: <202207140042.cK3tlk6j-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657731009; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=YsG4Fbr6Mz6ravDjU+otT4XsVZEp33X1pM5Mp3LIFvQ=; b=KtNLoooDMJvdByydAhyEKHFdZO6Mn7MHM18HdyYDe5iSiTJ5xIKRI4c8T8X2jGZvH/Synl 0wYEDCacobwcYXPVRvuXYwQurXKggqvjlTgE0eP8gFkTM5byl+si88RrrE+mYBsba16qKk Xg3ft4jeij6tfnf1VQj3zNx3JVFEUs4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657731009; a=rsa-sha256; cv=none; b=uN9vbMEsGNUzzoqJFP7eCi+ubLAT5L0g+MVEtG5SltrO3bwCa6M8clQGRJuIwRiE/5w8zc pT2uCGmgvJB0hmaM9hh4U5iA7asH1wdfZE013Efm26w8qK36W3Viud3SgOlhSNHud8uI+u grQa3xxn8fqaoFpZE0BxPMGf54f70TY= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fHOcYRvj; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf07.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com X-Stat-Signature: 3hdooc1hah7ukor5xc3n8suen6wuxqdx X-Rspamd-Queue-Id: C409740038 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fHOcYRvj; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf07.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam05 X-HE-Tag: 1657731008-320466 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 4662b7adea50bb62e993a67f611f3be625d3df0d commit: cf5e9d6390413e06d48540933b8ce1243315f3f4 [9509/10347] procfs: add 'path' to /proc//fdinfo/ compiler: powerpc-linux-gcc (GCC) 11.3.0 reproduce (cppcheck warning): # apt-get install cppcheck git checkout cf5e9d6390413e06d48540933b8ce1243315f3f4 cppcheck --quiet --enable=style,performance,portability --template=gcc FILE If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> mm/slab.c:3313:16: warning: Local variable 'slab' shadows outer variable [shadowVariable] struct slab *slab; ^ mm/slab.c:3307:15: note: Shadowed declaration struct slab *slab; ^ mm/slab.c:3313:16: note: Shadow variable struct slab *slab; ^ >> fs/libfs.c:1231:47: warning: Local variable 'anon_aops' shadows outer variable [shadowVariable] static const struct address_space_operations anon_aops = { ^ fs/libfs.c:1220:46: note: Shadowed declaration static const struct address_space_operations anon_aops = { ^ fs/libfs.c:1231:47: note: Shadow variable static const struct address_space_operations anon_aops = { ^ cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> mm/highmem.c:737:13: warning: Uninitialized variable: pam->page [uninitvar] if (pam->page == page) { ^ mm/highmem.c:774:13: warning: Uninitialized variable: pam->page [uninitvar] if (pam->page == page) { ^ -- >> mm/vmstat.c:1409:53: warning: Parameter 'pos' can be declared with const [constParameter] static void *frag_start(struct seq_file *m, loff_t *pos) ^ >> mm/vmstat.c:1650:68: warning: Parameter 'zone' can be declared with const [constParameter] static bool is_zone_first_populated(pg_data_t *pgdat, struct zone *zone) ^ mm/vmstat.c:1780:55: warning: Parameter 'pos' can be declared with const [constParameter] static void *vmstat_start(struct seq_file *m, loff_t *pos) ^ >> ipc/shm.c:158:0: warning: failed to expand 'ipc_init_proc_interface', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective] #if BITS_PER_LONG <= 32 ^ >> mm/zsmalloc.c:2060:16: warning: Local variable 'obj_allocated' shadows outer function [shadowFunction] unsigned long obj_allocated = zs_stat_get(class, OBJ_ALLOCATED); ^ mm/zsmalloc.c:872:13: note: Shadowed declaration static bool obj_allocated(struct page *page, void *obj, unsigned long *phandle) ^ mm/zsmalloc.c:2060:16: note: Shadow variable unsigned long obj_allocated = zs_stat_get(class, OBJ_ALLOCATED); ^ >> mm/zsmalloc.c:2019:15: warning: Uninitialized variables: zspage.huge, zspage.fullness, zspage.class, zspage.isolated, zspage.magic, zspage.inuse, zspage.freeobj, zspage.first_page, zspage.lock [uninitvar] lock_zspage(zspage); ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2009:20: note: Assuming condition is false if (class->index != i) ^ mm/zsmalloc.c:2019:15: note: Uninitialized variables: zspage.huge, zspage.fullness, zspage.class, zspage.isolated, zspage.magic, zspage.inuse, zspage.freeobj, zspage.first_page, zspage.lock lock_zspage(zspage); ^ mm/zsmalloc.c:594:16: warning: Local variable 'obj_allocated' shadows outer function [shadowFunction] unsigned long obj_allocated, obj_used, pages_used, freeable; ^ mm/zsmalloc.c:872:13: note: Shadowed declaration static bool obj_allocated(struct page *page, void *obj, unsigned long *phandle) ^ mm/zsmalloc.c:594:16: note: Shadow variable unsigned long obj_allocated, obj_used, pages_used, freeable; ^ -- >> mm/mlock.c:230:20: warning: Using pointer that is a temporary. [danglingTemporaryLifetime] if (pagevec_count(pvec)) ^ mm/mlock.c:229:9: note: Address of variable taken here. pvec = &per_cpu(mlock_pvec.vec, cpu); ^ mm/mlock.c:229:17: note: Temporary created here. pvec = &per_cpu(mlock_pvec.vec, cpu); ^ mm/mlock.c:230:20: note: Using pointer that is a temporary. if (pagevec_count(pvec)) ^ >> mm/migrate.c:875:7: warning: Redundant initialization for 'rc'. The initialized value is overwritten before it is read. [redundantInitialization] rc = migrate_page(mapping, &dst->page, &src->page, mode); ^ mm/migrate.c:865:9: note: rc is initialized int rc = -EAGAIN; ^ mm/migrate.c:875:7: note: rc is overwritten rc = migrate_page(mapping, &dst->page, &src->page, mode); ^ >> mm/migrate.c:355:53: warning: Parameter 'mapping' can be declared with const [constParameter] static int expected_page_refs(struct address_space *mapping, struct page *page) ^ >> kernel/bpf/task_iter.c:152:11: warning: Redundant initialization for 'curr_fd'. The initialized value is overwritten before it is read. [redundantInitialization] curr_fd = info->fd; ^ kernel/bpf/task_iter.c:143:23: note: curr_fd is initialized unsigned int curr_fd = info->fd; ^ kernel/bpf/task_iter.c:152:11: note: curr_fd is overwritten curr_fd = info->fd; ^ >> kernel/bpf/task_iter.c:498:59: warning: Parameter 'v' can be declared with const [constParameter] static void task_vma_seq_stop(struct seq_file *seq, void *v) ^ -- kernel/sched/fair.c:11342:62: warning: Same value in both branches of ternary operator. [duplicateValueTernary] update_load_avg(cfs_rq, se, sched_feat(ATTACH_AGE_LOAD) ? 0 : SKIP_AGE_LOAD); ^ kernel/sched/fair.c:7339:1: warning: Label 'done' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] done: __maybe_unused; ^ kernel/sched/sched.h:2016:67: warning: Parameter 'p' can be declared with const [constParameter] static inline int task_current(struct rq *rq, struct task_struct *p) ^ kernel/sched/fair.c:6423:16: warning: Local variable 'task_util' shadows outer function [shadowFunction] unsigned long task_util, best_cap = 0; ^ kernel/sched/fair.c:4011:29: note: Shadowed declaration static inline unsigned long task_util(struct task_struct *p) ^ kernel/sched/fair.c:6423:16: note: Shadow variable unsigned long task_util, best_cap = 0; ^ kernel/sched/fair.c:6464:16: warning: Local variable 'task_util' shadows outer function [shadowFunction] unsigned long task_util; ^ kernel/sched/fair.c:4011:29: note: Shadowed declaration static inline unsigned long task_util(struct task_struct *p) ^ kernel/sched/fair.c:6464:16: note: Shadow variable unsigned long task_util; ^ >> kernel/sched/fair.c:6967:7: warning: Local variable 'min_vruntime' shadows outer function [shadowFunction] u64 min_vruntime; ^ kernel/sched/fair.c:573:19: note: Shadowed declaration static inline u64 min_vruntime(u64 min_vruntime, u64 vruntime) ^ kernel/sched/fair.c:6967:7: note: Shadow variable u64 min_vruntime; ^ kernel/sched/fair.c:10298:6: warning: Local variable 'update_next_balance' shadows outer function [shadowFunction] int update_next_balance = 0; ^ kernel/sched/fair.c:10152:1: note: Shadowed declaration update_next_balance(struct sched_domain *sd, unsigned long *next_balance) ^ kernel/sched/fair.c:10298:6: note: Shadow variable int update_next_balance = 0; ^ kernel/sched/fair.c:8933:58: warning: Parameter 'p' can be declared with const [constParameter] static int idle_cpu_without(int cpu, struct task_struct *p) ^ kernel/sched/fair.c:6482:25: warning: Uninitialized variable: task_util [uninitvar] asym_fits_capacity(task_util, target)) ^ kernel/sched/fair.c:6471:28: note: Assuming condition is false if (static_branch_unlikely(&sched_asym_cpucapacity)) { ^ kernel/sched/fair.c:6482:25: note: Uninitialized variable: task_util asym_fits_capacity(task_util, target)) ^ kernel/sched/fair.c:8171:48: warning: Uninitialized variables: cfs_rq.load, cfs_rq.nr_running, cfs_rq.h_nr_running, cfs_rq.idle_nr_running, cfs_rq.idle_h_nr_running, cfs_rq.exec_clock, cfs_rq.min_vruntime, cfs_rq.tasks_timeline, cfs_rq.curr, cfs_rq.next, cfs_rq.last, cfs_rq.skip, cfs_rq.avg, cfs_rq.removed, cfs_rq.tg_load_avg_contrib, cfs_rq.propagate, cfs_rq.prop_runnable_sum, cfs_rq.h_load, cfs_rq.last_h_load_update, cfs_rq.h_load_next, cfs_rq.rq, cfs_rq.on_list, cfs_rq.leaf_cfs_rq_list, cfs_rq.tg, cfs_rq.idle [uninitvar] if (update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq)) { ^ >> kernel/sched/fair.c:5081:25: warning: Uninitialized variables: cfs_rq.load, cfs_rq.nr_running, cfs_rq.h_nr_running, cfs_rq.idle_nr_running, cfs_rq.idle_h_nr_running, cfs_rq.exec_clock, cfs_rq.min_vruntime, cfs_rq.min_vruntime_copy, cfs_rq.tasks_timeline, cfs_rq.curr, cfs_rq.next, cfs_rq.last, cfs_rq.skip [uninitvar] struct rq *rq = rq_of(cfs_rq); ^ kernel/sched/fair.c:5081:25: warning: Uninitialized variables: cfs_rq.load, cfs_rq.nr_running, cfs_rq.h_nr_running, cfs_rq.idle_nr_running, cfs_rq.idle_h_nr_running, cfs_rq.exec_clock, cfs_rq.min_vruntime, cfs_rq.min_vruntime_copy, cfs_rq.tasks_timeline, cfs_rq.curr, cfs_rq.next, cfs_rq.last, cfs_rq.skip, cfs_rq.rq, cfs_rq.on_list, cfs_rq.leaf_cfs_rq_list, cfs_rq.tg, cfs_rq.idle, cfs_rq.runtime_enabled, cfs_rq.runtime_remaining, cfs_rq.throttled_clock, cfs_rq.throttled_clock_pelt, cfs_rq.throttled_clock_pelt_time, cfs_rq.throttled, cfs_rq.throttle_count, cfs_rq.throttled_list [uninitvar] struct rq *rq = rq_of(cfs_rq); ^ kernel/sched/fair.c:5081:25: warning: Uninitialized variables: cfs_rq.load, cfs_rq.nr_running, cfs_rq.h_nr_running, cfs_rq.idle_nr_running, cfs_rq.idle_h_nr_running, cfs_rq.exec_clock, cfs_rq.min_vruntime, cfs_rq.min_vruntime_copy, cfs_rq.tasks_timeline, cfs_rq.curr, cfs_rq.next, cfs_rq.last, cfs_rq.skip, cfs_rq.avg, cfs_rq.load_last_update_time_copy, cfs_rq.removed [uninitvar] struct rq *rq = rq_of(cfs_rq); ^ >> mm/slab.c:3289:7: warning: Redundant assignment of 'objp' to itself. [selfAssignment] objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller); ^ mm/slab.c:3435:7: warning: Redundant assignment of 'objp' to itself. [selfAssignment] objp = cache_free_debugcheck(cachep, objp, caller); ^ >> mm/slab.c:3509:8: warning: Redundant assignment of 'p[i]' to itself. [selfAssignment] p[i] = cache_alloc_debugcheck_after(s, flags, p[i], caller); ^ >> mm/slab.c:405:9: warning: Local variable 'slab_size' shadows outer function [shadowFunction] size_t slab_size = PAGE_SIZE << gfporder; ^ mm/slab.h:188:22: note: Shadowed declaration static inline size_t slab_size(const struct slab *slab) ^ mm/slab.c:405:9: note: Shadow variable size_t slab_size = PAGE_SIZE << gfporder; ^ >> mm/slab.c:1635:24: warning: Uninitialized variables: slab.__page_flags, slab.__unused_1, slab.freelist, slab.units, slab.__unused_2, slab.__page_refcount [uninitvar] slab_destroy(cachep, slab); ^ >> fs/ntfs/ntfs.h:144:3: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] x >>= 1; ^ >> fs/ntfs/layout.h:126:43: warning: Parameter 'p' can be declared with const [constParameter] static inline bool __ntfs_is_magicp(le32 *p, NTFS_RECORD_TYPE r) ^ >> fs/ntfs/attrib.c:705:18: warning: Either the condition '!al' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] u8 *al_end = al + initialized_size; ^ fs/ntfs/attrib.c:715:26: note: Assuming that condition '!al' is not redundant if (!vol || !runlist || !al || size <= 0 || initialized_size < 0 || ^ fs/ntfs/attrib.c:705:18: note: Null pointer addition u8 *al_end = al + initialized_size; ^ >> fs/super.c:750:52: warning: Parameter 'bdev' can be declared with const [constParameter] struct super_block *get_super(struct block_device *bdev) ^ fs/super.c:788:59: warning: Parameter 'bdev' can be declared with const [constParameter] struct super_block *get_active_super(struct block_device *bdev) ^ >> fs/super.c:1310:57: warning: Parameter 'data' can be declared with const [constParameter] static int test_bdev_super(struct super_block *s, void *data) ^ >> lib/test_printf.c:415:11: warning: Local variable 'addr' shadows outer function [shadowFunction] const u8 addr[6] = {0x2d, 0x48, 0xd6, 0xfc, 0x7a, 0x05}; ^ lib/test_printf.c:392:1: note: Shadowed declaration addr(void) ^ lib/test_printf.c:415:11: note: Shadow variable const u8 addr[6] = {0x2d, 0x48, 0xd6, 0xfc, 0x7a, 0x05}; ^ -- >> kernel/fork.c:942:33: warning: Parameter 'src' can be declared with const [constParameter] struct task_struct *src) ^ >> kernel/fork.c:3256:42: warning: Parameter 'table' can be declared with const [constParameter] int sysctl_max_threads(struct ctl_table *table, int write, ^ >> lib/maple_tree.c:326:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] node = (void *)((unsigned long)node & ~MAPLE_ENODE_NULL); ^ lib/maple_tree.c:331:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] node = (void *)((unsigned long)node | MAPLE_ENODE_NULL); ^ >> lib/maple_tree.c:1871:21: warning: Array index 'split' is used before limits check. [arrayIndexThenCheck] while (((bn->pivot[split] - min) < slot_count - 1) && ^ >> lib/maple_tree.c:4302:23: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] if (!!wr_mas->entry ^ !!wr_mas->content) ^ >> lib/maple_tree.c:4266:15: warning: The if condition is the same as the previous if condition [duplicateCondition] if (new_end < node_pivots) ^ lib/maple_tree.c:4263:15: note: First condition if (new_end < node_pivots) ^ lib/maple_tree.c:4266:15: note: Second condition if (new_end < node_pivots) ^ >> lib/maple_tree.c:2426:8: warning: Redundant initialization for 'r_tmp'. The initialized value is overwritten before it is read. [redundantInitialization] r_tmp = *mast->orig_r; ^ lib/maple_tree.c:2420:24: note: r_tmp is initialized struct ma_state r_tmp = *mast->orig_r; ^ lib/maple_tree.c:2426:8: note: r_tmp is overwritten r_tmp = *mast->orig_r; ^ >> lib/maple_tree.c:2427:8: warning: Redundant initialization for 'l_tmp'. The initialized value is overwritten before it is read. [redundantInitialization] l_tmp = *mast->orig_l; ^ lib/maple_tree.c:2421:24: note: l_tmp is initialized struct ma_state l_tmp = *mast->orig_l; ^ lib/maple_tree.c:2427:8: note: l_tmp is overwritten l_tmp = *mast->orig_l; ^ >> lib/maple_tree.c:3160:22: warning: Found suspicious operator ',' [constStatement] void __rcu **l_slots, **slots; ^ >> lib/maple_tree.c:694:59: warning: Parameter 'pivots' can be declared with const [constParameter] mas_safe_pivot(const struct ma_state *mas, unsigned long *pivots, ^ lib/maple_tree.c:712:51: warning: Parameter 'pivots' can be declared with const [constParameter] mas_safe_min(struct ma_state *mas, unsigned long *pivots, unsigned char offset) ^ lib/maple_tree.c:1384:21: warning: Parameter 'pivots' can be declared with const [constParameter] unsigned long *pivots, ^ >> lib/maple_tree.c:1522:52: warning: Parameter 'gaps' can be declared with const [constParameter] ma_max_gap(struct maple_node *node, unsigned long *gaps, enum maple_type mt, ^ lib/maple_tree.c:1954:43: warning: Parameter 'pivots' can be declared with const [constParameter] struct maple_node *node, unsigned long *pivots, ^ >> lib/maple_tree.c:2033:55: warning: Parameter 'mas' can be declared with const [constParameter] static inline void mas_descend_adopt(struct ma_state *mas) ^ >> lib/maple_tree.c:3208:11: warning: Size of pointer 'pivs' used instead of size of its data. [pointerSize] memset(pivs + tmp, 0, ^ vim +/anon_aops +1231 fs/libfs.c cf5e9d6390413e Kalesh Singh 2022-06-23 1228 6987843ff7e836 Al Viro 2013-10-02 1229 struct inode *alloc_anon_inode(struct super_block *s) 6987843ff7e836 Al Viro 2013-10-02 1230 { 6987843ff7e836 Al Viro 2013-10-02 @1231 static const struct address_space_operations anon_aops = { 46de8b979492e1 Matthew Wilcox (Oracle 2022-02-09 1232) .dirty_folio = noop_dirty_folio, 6987843ff7e836 Al Viro 2013-10-02 1233 }; 6987843ff7e836 Al Viro 2013-10-02 1234 struct inode *inode = new_inode_pseudo(s); 6987843ff7e836 Al Viro 2013-10-02 1235 6987843ff7e836 Al Viro 2013-10-02 1236 if (!inode) 6987843ff7e836 Al Viro 2013-10-02 1237 return ERR_PTR(-ENOMEM); 6987843ff7e836 Al Viro 2013-10-02 1238 6987843ff7e836 Al Viro 2013-10-02 1239 inode->i_ino = get_next_ino(); 6987843ff7e836 Al Viro 2013-10-02 1240 inode->i_mapping->a_ops = &anon_aops; 6987843ff7e836 Al Viro 2013-10-02 1241 6987843ff7e836 Al Viro 2013-10-02 1242 /* 6987843ff7e836 Al Viro 2013-10-02 1243 * Mark the inode dirty from the very beginning, 6987843ff7e836 Al Viro 2013-10-02 1244 * that way it will never be moved to the dirty 6987843ff7e836 Al Viro 2013-10-02 1245 * list because mark_inode_dirty() will think 6987843ff7e836 Al Viro 2013-10-02 1246 * that it already _is_ on the dirty list. 6987843ff7e836 Al Viro 2013-10-02 1247 */ 6987843ff7e836 Al Viro 2013-10-02 1248 inode->i_state = I_DIRTY; 6987843ff7e836 Al Viro 2013-10-02 1249 inode->i_mode = S_IRUSR | S_IWUSR; 6987843ff7e836 Al Viro 2013-10-02 1250 inode->i_uid = current_fsuid(); 6987843ff7e836 Al Viro 2013-10-02 1251 inode->i_gid = current_fsgid(); 6987843ff7e836 Al Viro 2013-10-02 1252 inode->i_flags |= S_PRIVATE; 078cd8279e6599 Deepa Dinamani 2016-09-14 1253 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); 6987843ff7e836 Al Viro 2013-10-02 1254 return inode; 6987843ff7e836 Al Viro 2013-10-02 1255 } 6987843ff7e836 Al Viro 2013-10-02 1256 EXPORT_SYMBOL(alloc_anon_inode); 1c994a0909a556 Jeff Layton 2014-08-27 1257 :::::: The code at line 1231 was first introduced by commit :::::: 6987843ff7e836ea65b554905aec34d2fad05c94 take anon inode allocation to libfs.c :::::: TO: Al Viro :::::: CC: Al Viro -- 0-DAY CI Kernel Test Service https://01.org/lkp