mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eugene Zemtsov <ezemtsov@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org,
	Paul Lawrence <paullawrence@google.com>
Subject: [ammarfaizi2-block:google/android/kernel/common/android-trusty-5.4 2532/6879] fs/incfs/data_mgmt.c:790:21: warning: variable 'mi' set but not used
Date: Wed, 9 Mar 2022 02:54:03 +0800	[thread overview]
Message-ID: <202203090212.bPXFBNNd-lkp@intel.com> (raw)

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-trusty-5.4
head:   d556bac5a4d65c759ce3c5a7529aef568f05f650
commit: 1be052b20ba04b635cf87bcff80de5314697953e [2532/6879] ANDROID: Initial commit of Incremental FS
config: x86_64-randconfig-c007-20220307 (https://download.01.org/0day-ci/archive/20220309/202203090212.bPXFBNNd-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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/ammarfaizi2/linux-block/commit/1be052b20ba04b635cf87bcff80de5314697953e
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-trusty-5.4
        git checkout 1be052b20ba04b635cf87bcff80de5314697953e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/xen/ fs/incfs/

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

All warnings (new ones prefixed by >>):

>> fs/incfs/data_mgmt.c:790:21: warning: variable 'mi' set but not used [-Wunused-but-set-variable]
           struct mount_info *mi = NULL;
                              ^
   1 warning generated.


vim +/mi +790 fs/incfs/data_mgmt.c

   785	
   786	int incfs_process_new_hash_block(struct data_file *df,
   787					 struct incfs_new_data_block *block, u8 *data)
   788	{
   789		struct backing_file_context *bfc = NULL;
 > 790		struct mount_info *mi = NULL;
   791		struct mtree *hash_tree = NULL;
   792		struct ondisk_signature *sig = NULL;
   793		loff_t hash_area_base = 0;
   794		loff_t hash_area_size = 0;
   795		int error = 0;
   796	
   797		if (!df || !block)
   798			return -EFAULT;
   799	
   800		if (!(block->flags & INCFS_BLOCK_FLAGS_HASH))
   801			return -EINVAL;
   802	
   803		bfc = df->df_backing_file_context;
   804		mi = df->df_mount_info;
   805	
   806		if (!df)
   807			return -ENOENT;
   808	
   809		hash_tree = df->df_hash_tree;
   810		sig = df->df_signature;
   811		if (!hash_tree || !sig || sig->mtree_offset == 0)
   812			return -ENOTSUPP;
   813	
   814		hash_area_base = sig->mtree_offset;
   815		hash_area_size = sig->mtree_size;
   816		if (hash_area_size < block->block_index * INCFS_DATA_FILE_BLOCK_SIZE
   817					+ block->data_len) {
   818			/* Hash block goes beyond dedicated hash area of this file. */
   819			return -ERANGE;
   820		}
   821	
   822		error = mutex_lock_interruptible(&bfc->bc_mutex);
   823		if (!error)
   824			error = incfs_write_hash_block_to_backing_file(
   825				bfc, range(data, block->data_len), block->block_index,
   826				hash_area_base);
   827		mutex_unlock(&bfc->bc_mutex);
   828		return error;
   829	}
   830	

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

                 reply	other threads:[~2022-03-08 18:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203090212.bPXFBNNd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ezemtsov@google.com \
    --cc=gwml@vger.gnuweeb.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=paullawrence@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®