mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Jeff Layton <jlayton@kernel.org>
Subject: [jlayton:netfs-linked-list 32/54] fs/netfs/output.c:274:25: warning: unused variable 'cookie'
Date: Wed, 29 Jun 2022 03:25:06 +0800	[thread overview]
Message-ID: <202206290345.wPdhFKn5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git netfs-linked-list
head:   d35a2461e039c9131e97bb125eac59a0f04e9161
commit: feb78625e48b167397af0355efac9bcf3b545d42 [32/54] netfs: Dispatch write requests to process a writeback slice
config: x86_64-randconfig-a004-20220627 (https://download.01.org/0day-ci/archive/20220629/202206290345.wPdhFKn5-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project df18167ac56d05f2ab55f9d874aee7ab6d5bc9a2)
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/jlayton/linux.git/commit/?id=feb78625e48b167397af0355efac9bcf3b545d42
        git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
        git fetch --no-tags jlayton netfs-linked-list
        git checkout feb78625e48b167397af0355efac9bcf3b545d42
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/netfs/

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

All warnings (new ones prefixed by >>):

   fs/netfs/output.c:274:49: error: incompatible pointer types passing 'struct inode *' to parameter of type 'struct netfs_inode *' [-Werror,-Wincompatible-pointer-types]
           struct fscache_cookie *cookie = netfs_i_cookie(wreq->inode);
                                                          ^~~~~~~~~~~
   include/linux/netfs.h:413:73: note: passing argument to parameter 'ctx' here
   static inline struct fscache_cookie *netfs_i_cookie(struct netfs_inode *ctx)
                                                                           ^
>> fs/netfs/output.c:274:25: warning: unused variable 'cookie' [-Wunused-variable]
           struct fscache_cookie *cookie = netfs_i_cookie(wreq->inode);
                                  ^
   1 warning and 1 error generated.


vim +/cookie +274 fs/netfs/output.c

   266	
   267	/*
   268	 * Set up a op for writing to the cache.
   269	 */
   270	static void netfs_set_up_write_to_cache(struct netfs_io_request *wreq)
   271	{
   272		struct netfs_cache_resources *cres;
   273		struct netfs_io_subrequest *subreq;
 > 274		struct fscache_cookie *cookie = netfs_i_cookie(wreq->inode);
   275		loff_t start = wreq->first * PAGE_SIZE;
   276		size_t len = (wreq->last - wreq->first + 1) * PAGE_SIZE;
   277		int ret;
   278	
   279		if (!fscache_cookie_enabled(cookie)) {
   280			clear_bit(NETFS_RREQ_WRITE_TO_CACHE, &wreq->flags);
   281			return;
   282		}
   283	
   284		_debug("write to cache");
   285		subreq = netfs_create_write_request(wreq, NETFS_WRITE_TO_CACHE, start, len,
   286						    netfs_write_to_cache_op_worker);
   287		if (!subreq)
   288			return;
   289	
   290		cres = &wreq->cache_resources;
   291		ret = -ENOBUFS;
   292		if (wreq->netfs_ops->begin_cache_operation)
   293			ret = wreq->netfs_ops->begin_cache_operation(wreq);
   294		if (ret < 0) {
   295			netfs_write_subrequest_terminated(subreq, ret, false);
   296			return;
   297		}
   298	
   299		ret = cres->ops->prepare_write(cres, &start, &len, i_size_read(wreq->inode),
   300					       true);
   301		if (ret < 0) {
   302			netfs_write_subrequest_terminated(subreq, ret, false);
   303			return;
   304		}
   305	
   306		netfs_queue_write_request(subreq);
   307	}
   308	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-06-28 19:28 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=202206290345.wPdhFKn5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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®