All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android15-6.1 1/2] drivers/usb/gadget/android_configfs_uevent.c:186:6: warning: no previous prototype for function '__android_set_connected'
Date: Sat, 2 Mar 2024 00:55:43 +0800	[thread overview]
Message-ID: <202403020010.XZdplvLP-lkp@intel.com> (raw)

tree:   https://android.googlesource.com/kernel/common android15-6.1
head:   79d40fcc7f981896f569f51e4c48058128a710ec
commit: 5e9a404dff899b6f6586f99fb19e90d598ae2d6d [1/2] ANDROID: usb: gadget: configfs: Add Uevent to notify userspace
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240302/202403020010.XZdplvLP-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240302/202403020010.XZdplvLP-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/202403020010.XZdplvLP-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/usb/gadget/android_configfs_uevent.c:28:7: warning: variable 'configured' set but not used [-Wunused-but-set-variable]
      28 |         bool configured = false;
         |              ^
>> drivers/usb/gadget/android_configfs_uevent.c:186:6: warning: no previous prototype for function '__android_set_connected' [-Wmissing-prototypes]
     186 | void __android_set_connected(struct android_uevent_opts *opts, bool connected)
         |      ^
   drivers/usb/gadget/android_configfs_uevent.c:186:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     186 | void __android_set_connected(struct android_uevent_opts *opts, bool connected)
         | ^
         | static 
>> drivers/usb/gadget/android_configfs_uevent.c:199:6: warning: no previous prototype for function '__android_set_configured' [-Wmissing-prototypes]
     199 | void __android_set_configured(struct android_uevent_opts *opts, bool configured)
         |      ^
   drivers/usb/gadget/android_configfs_uevent.c:199:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     199 | void __android_set_configured(struct android_uevent_opts *opts, bool configured)
         | ^
         | static 
   3 warnings generated.


vim +/__android_set_connected +186 drivers/usb/gadget/android_configfs_uevent.c

   185	
 > 186	void __android_set_connected(struct android_uevent_opts *opts, bool connected)
   187	{
   188		unsigned long flags;
   189	
   190		spin_lock_irqsave(&opts_lock, flags);
   191		// Don't send the uevent if connected state is not changed
   192		if (opts->connected != connected) {
   193			opts->connected = connected;
   194			schedule_work(&opts->work);
   195		}
   196		spin_unlock_irqrestore(&opts_lock, flags);
   197	}
   198	
 > 199	void __android_set_configured(struct android_uevent_opts *opts, bool configured)
   200	{
   201		unsigned long flags;
   202	
   203		spin_lock_irqsave(&opts_lock, flags);
   204		// Don't send the uevent if configure state is not changed
   205		if (opts->configured != configured) {
   206			opts->configured = configured;
   207			schedule_work(&opts->work);
   208		}
   209		spin_unlock_irqrestore(&opts_lock, flags);
   210	}
   211	

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

                 reply	other threads:[~2024-03-01 16:56 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=202403020010.XZdplvLP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.