mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [toke:xdp-queueing-02 5/11] kernel/bpf/pifomap.c:197:6: warning: no previous prototype for function 'pifo_set_bit'
Date: Mon, 14 Feb 2022 05:31:29 +0800	[thread overview]
Message-ID: <202202140517.jN2jJhHH-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-queueing-02
head:   26dde94b299bc277f7a99a99ba64b4363964e833
commit: 34cc5abfbae0dfcb6967c54cb80f7595bc9c5c37 [5/11] Add a PIFO map type for queueing packets
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220214/202202140517.jN2jJhHH-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
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/toke/linux.git/commit/?id=34cc5abfbae0dfcb6967c54cb80f7595bc9c5c37
        git remote add toke https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git
        git fetch --no-tags toke xdp-queueing-02
        git checkout 34cc5abfbae0dfcb6967c54cb80f7595bc9c5c37
        # 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=i386 SHELL=/bin/bash kernel/bpf/

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 >>):

>> kernel/bpf/pifomap.c:197:6: warning: no previous prototype for function 'pifo_set_bit' [-Wmissing-prototypes]
   void pifo_set_bit(struct bpf_pifo_queue *queue, u32 rank)
        ^
   kernel/bpf/pifomap.c:197:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void pifo_set_bit(struct bpf_pifo_queue *queue, u32 rank)
   ^
   static 
>> kernel/bpf/pifomap.c:208:6: warning: no previous prototype for function 'pifo_clear_bit' [-Wmissing-prototypes]
   void pifo_clear_bit(struct bpf_pifo_queue *queue, u32 rank)
        ^
   kernel/bpf/pifomap.c:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void pifo_clear_bit(struct bpf_pifo_queue *queue, u32 rank)
   ^
   static 
   2 warnings generated.


vim +/pifo_set_bit +197 kernel/bpf/pifomap.c

   196	
 > 197	void pifo_set_bit(struct bpf_pifo_queue *queue, u32 rank)
   198	{
   199		u32 i;
   200	
   201		for (i = queue->levels; i > 0; i--) {
   202			unsigned long *bitmap = queue->lvl_bitmap[i-1];
   203			set_bit(rank, bitmap);
   204			rank /= BITS_PER_TYPE(long);
   205		}
   206	}
   207	
 > 208	void pifo_clear_bit(struct bpf_pifo_queue *queue, u32 rank)
   209	{
   210		u32 i;
   211	
   212		for (i = queue->levels; i > 0; i--) {
   213			unsigned long *bitmap = queue->lvl_bitmap[i-1];
   214			clear_bit(rank, bitmap);
   215			rank /= BITS_PER_TYPE(long);
   216	
   217			// another bit is set in this word, don't clear bit in higher
   218			// level
   219			if (*(bitmap + rank))
   220				break;
   221		}
   222	}
   223	

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

                 reply	other threads:[~2022-02-13 21:32 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=202202140517.jN2jJhHH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=toke@redhat.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®