public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Armelle Laine <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:google/android/kernel/common/android12-trusty-5.10 5860/5872] drivers/trusty/trusty-log.c:354:21: warning: left shift count >= width of type
Date: Thu, 31 Mar 2022 11:28:00 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

Hi Armelle,

FYI, the error/warning still remains.

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-trusty-5.10
head:   07055bfd3d810d41a38354693dfaa55a6f8c0025
commit: bf9d994a65a2941d96b58769d79c256f7d8862c0 [5860/5872] ANDROID: trusty-log: Complement logging sink with unthrottled virtual file
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220331/[email protected]/config)
compiler: arm-linux-gnueabi-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/ammarfaizi2/linux-block/commit/bf9d994a65a2941d96b58769d79c256f7d8862c0
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-trusty-5.10
        git checkout bf9d994a65a2941d96b58769d79c256f7d8862c0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

   drivers/trusty/trusty-log.c: In function 'trusty_log_seq_next':
>> drivers/trusty/trusty-log.c:354:21: warning: left shift count >= width of type [-Wshift-count-overflow]
     354 |         *pos = (1UL << 32) + log_sfile_sink->get;
         |                     ^~


vim +354 drivers/trusty/trusty-log.c

   323	
   324	static void *trusty_log_seq_next(struct seq_file *sfile, void *v, loff_t *pos)
   325	{
   326		struct trusty_log_sfile *lb;
   327		struct trusty_log_state *s;
   328		struct trusty_log_sink_state *log_sfile_sink = v;
   329		int rc = 0;
   330	
   331		if (WARN_ON(!log_sfile_sink))
   332			return ERR_PTR(-EINVAL);
   333	
   334		lb = sfile->private;
   335		if (WARN_ON(!lb)) {
   336			rc = -EINVAL;
   337			goto end_of_iter;
   338		}
   339		s = container_of(lb, struct trusty_log_state, log_sfile);
   340	
   341		if (WARN_ON(!pos)) {
   342			rc = -EINVAL;
   343			goto end_of_iter;
   344		}
   345		/*
   346		 * When starting a virtual file sink, the start function is invoked
   347		 * with a pos argument which value is set to zero.
   348		 * Subsequent starts are invoked with pos being set to
   349		 * the unwrapped read index (get).
   350		 * Upon u32 wraparound, the get index could be reset to zero.
   351		 * Thus a msb is used to distinguish the `get` zero value
   352		 * from the `start of file` zero value.
   353		 */
 > 354		*pos = (1UL << 32) + log_sfile_sink->get;
   355		if (!trusty_log_has_data(s, log_sfile_sink))
   356			goto end_of_iter;
   357	
   358		return log_sfile_sink;
   359	
   360	end_of_iter:
   361		pr_debug("%s kfree\n", __func__);
   362		kfree(log_sfile_sink);
   363		return rc < 0 ? ERR_PTR(rc) : NULL;
   364	}
   365	

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

                 reply	other threads:[~2022-03-31  3: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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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