All of lore.kernel.org
 help / color / mirror / Atom feed
* [char-misc:char-misc-testing 152/153] drivers/w1/slaves/w1_therm.c:984:5: warning: no previous prototype for function 'w1_poll_completion'
@ 2020-10-02 14:10 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-10-02 14:10 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3043 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head:   9ace0b4dab1c3913810c50948d714afcbd2c767e
commit: 021da53e65fdd0e1b8492c2670dd075c0ea910fc [152/153] w1: w1_therm: Add sysfs entries to control conversion time and driver features
config: arm-randconfig-r036-20201002 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=021da53e65fdd0e1b8492c2670dd075c0ea910fc
        git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
        git fetch --no-tags char-misc char-misc-testing
        git checkout 021da53e65fdd0e1b8492c2670dd075c0ea910fc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

>> drivers/w1/slaves/w1_therm.c:984:5: warning: no previous prototype for function 'w1_poll_completion' [-Wmissing-prototypes]
   int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
       ^
   drivers/w1/slaves/w1_therm.c:984:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
   ^
   static 
   1 warning generated.

vim +/w1_poll_completion +984 drivers/w1/slaves/w1_therm.c

   973	
   974	/**
   975	 * w1_poll_completion - Poll for operation completion, with timeout
   976	 * @dev_master: the device master of the bus
   977	 * @tout_ms: timeout in milliseconds
   978	 *
   979	 * The device is answering 0's while an operation is in progress and 1's after it completes
   980	 * Timeout may happen if the previous command was not recognised due to a line noise
   981	 *
   982	 * Return: 0 - OK, negative error - timeout
   983	 */
 > 984	int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
   985	{
   986		int i;
   987	
   988		for (i = 0; i < tout_ms/W1_POLL_PERIOD; i++) {
   989			/* Delay is before poll, for device to recognize a command */
   990			msleep(W1_POLL_PERIOD);
   991	
   992			/* Compare all 8 bits to mitigate a noise on the bus */
   993			if (w1_read_8(dev_master) == 0xFF)
   994				break;
   995		}
   996		if (i == tout_ms/W1_POLL_PERIOD)
   997			return -EIO;
   998	
   999		return 0;
  1000	}
  1001	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26644 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [char-misc:char-misc-testing 152/153] drivers/w1/slaves/w1_therm.c:984:5: warning: no previous prototype for function 'w1_poll_completion'
@ 2020-10-02 14:12 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-10-02 14:12 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing
head:   9ace0b4dab1c3913810c50948d714afcbd2c767e
commit: 021da53e65fdd0e1b8492c2670dd075c0ea910fc [152/153] w1: w1_therm: Add sysfs entries to control conversion time and driver features
config: x86_64-randconfig-a012-20201002 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?id=021da53e65fdd0e1b8492c2670dd075c0ea910fc
        git remote add char-misc https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
        git fetch --no-tags char-misc char-misc-testing
        git checkout 021da53e65fdd0e1b8492c2670dd075c0ea910fc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

>> drivers/w1/slaves/w1_therm.c:984:5: warning: no previous prototype for function 'w1_poll_completion' [-Wmissing-prototypes]
   int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
       ^
   drivers/w1/slaves/w1_therm.c:984:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
   ^
   static 
   1 warning generated.

vim +/w1_poll_completion +984 drivers/w1/slaves/w1_therm.c

   973	
   974	/**
   975	 * w1_poll_completion - Poll for operation completion, with timeout
   976	 * @dev_master: the device master of the bus
   977	 * @tout_ms: timeout in milliseconds
   978	 *
   979	 * The device is answering 0's while an operation is in progress and 1's after it completes
   980	 * Timeout may happen if the previous command was not recognised due to a line noise
   981	 *
   982	 * Return: 0 - OK, negative error - timeout
   983	 */
 > 984	int w1_poll_completion(struct w1_master *dev_master, int tout_ms)
   985	{
   986		int i;
   987	
   988		for (i = 0; i < tout_ms/W1_POLL_PERIOD; i++) {
   989			/* Delay is before poll, for device to recognize a command */
   990			msleep(W1_POLL_PERIOD);
   991	
   992			/* Compare all 8 bits to mitigate a noise on the bus */
   993			if (w1_read_8(dev_master) == 0xFF)
   994				break;
   995		}
   996		if (i == tout_ms/W1_POLL_PERIOD)
   997			return -EIO;
   998	
   999		return 0;
  1000	}
  1001	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34769 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-02 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-02 14:12 [char-misc:char-misc-testing 152/153] drivers/w1/slaves/w1_therm.c:984:5: warning: no previous prototype for function 'w1_poll_completion' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-10-02 14:10 kernel test robot

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.