mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: arch/x86/lib/insn-eval.c:907: warning: Function parameter or member 'base_offset' not described in 'get_eff_addr_sib'
Date: Sat, 11 Nov 2023 06:10:11 +0800	[thread overview]
Message-ID: <202311110537.or2lAihp-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ac347a0655dbc7d885e217c89dddd16e2800bd58
commit: 70e57c0f4b502f2435b7649a201861fe212c2e4e x86/insn-eval: Compute linear address in several utility functions
date:   6 years ago
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20231111/202311110537.or2lAihp-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311110537.or2lAihp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311110537.or2lAihp-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/workqueue.h:9,
                    from include/linux/rhashtable.h:26,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:9,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from arch/x86/lib/insn-eval.c:8:
   include/linux/timer.h: In function 'timer_setup':
   include/linux/timer.h:179:30: warning: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Wcast-function-type]
     179 |         __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
         |                              ^
   include/linux/timer.h:144:39: note: in definition of macro '__setup_timer'
     144 |                 (_timer)->function = (_fn);                             \
         |                                       ^~~
   arch/x86/lib/insn-eval.c: In function 'resolve_default_seg':
   arch/x86/lib/insn-eval.c:179:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
     179 |                 if (insn->addr_bytes == 2)
         |                    ^
   arch/x86/lib/insn-eval.c:182:9: note: here
     182 |         case -EDOM:
         |         ^~~~
>> arch/x86/lib/insn-eval.c:907: warning: Function parameter or member 'base_offset' not described in 'get_eff_addr_sib'
>> arch/x86/lib/insn-eval.c:907: warning: Excess function parameter 'regoff' description in 'get_eff_addr_sib'


vim +907 arch/x86/lib/insn-eval.c

70e57c0f4b502f Ricardo Neri 2017-11-05  882  
70e57c0f4b502f Ricardo Neri 2017-11-05  883  /**
70e57c0f4b502f Ricardo Neri 2017-11-05  884   * get_eff_addr_sib() - Obtain referenced effective address via SIB
70e57c0f4b502f Ricardo Neri 2017-11-05  885   * @insn:	Instruction. Must be valid.
70e57c0f4b502f Ricardo Neri 2017-11-05  886   * @regs:	Register values as seen when entering kernel mode
70e57c0f4b502f Ricardo Neri 2017-11-05  887   * @regoff:	Obtained operand offset, in pt_regs, associated with segment
70e57c0f4b502f Ricardo Neri 2017-11-05  888   * @eff_addr:	Obtained effective address
70e57c0f4b502f Ricardo Neri 2017-11-05  889   *
70e57c0f4b502f Ricardo Neri 2017-11-05  890   * Obtain the effective address referenced by the SIB byte of @insn. After
70e57c0f4b502f Ricardo Neri 2017-11-05  891   * identifying the registers involved in the indexed, register-indirect memory
70e57c0f4b502f Ricardo Neri 2017-11-05  892   * reference, its value is obtained from the operands in @regs. The computed
70e57c0f4b502f Ricardo Neri 2017-11-05  893   * address is stored @eff_addr. Also, the register operand that indicates the
70e57c0f4b502f Ricardo Neri 2017-11-05  894   * associated segment is stored in @regoff, this parameter can later be used to
70e57c0f4b502f Ricardo Neri 2017-11-05  895   * determine such segment.
70e57c0f4b502f Ricardo Neri 2017-11-05  896   *
70e57c0f4b502f Ricardo Neri 2017-11-05  897   * Returns:
70e57c0f4b502f Ricardo Neri 2017-11-05  898   *
70e57c0f4b502f Ricardo Neri 2017-11-05  899   * 0 on success. @eff_addr will have the referenced effective address.
70e57c0f4b502f Ricardo Neri 2017-11-05  900   * @base_offset will have a register, as an offset from the base of pt_regs,
70e57c0f4b502f Ricardo Neri 2017-11-05  901   * that can be used to resolve the associated segment.
70e57c0f4b502f Ricardo Neri 2017-11-05  902   *
70e57c0f4b502f Ricardo Neri 2017-11-05  903   * -EINVAL on error.
70e57c0f4b502f Ricardo Neri 2017-11-05  904   */
70e57c0f4b502f Ricardo Neri 2017-11-05  905  static int get_eff_addr_sib(struct insn *insn, struct pt_regs *regs,
70e57c0f4b502f Ricardo Neri 2017-11-05  906  			    int *base_offset, long *eff_addr)
32542ee295bec3 Ricardo Neri 2017-10-27 @907  {

:::::: The code at line 907 was first introduced by commit
:::::: 32542ee295bec38e5e1608f8c9d6d28e5a7e6112 x86/mpx, x86/insn: Relocate insn util functions to a new insn-eval file

:::::: TO: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-11-10 22:11 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=202311110537.or2lAihp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=tglx@linutronix.de \
    /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®