lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 10 Sep 2022 03:19:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arvid Norlander <lkml@...pal.se>
Cc:     kbuild-all@...ts.01.org,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: [pdx86-platform-drivers-x86:review-hans 59/65]
 drivers/platform/x86/toshiba_acpi.c:2937:9: warning: no previous prototype
 for 'toshiba_acpi_hwmon_is_visible'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head:   79e8f8235a1686d0656b60cf72f7fda5530ee1cf
commit: b5f3665e82591d465357f4a69196f46b3d30e997 [59/65] platform/x86: toshiba_acpi: Add fan RPM reading (hwmon interface)
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220910/202209100300.LjCie4bn-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=b5f3665e82591d465357f4a69196f46b3d30e997
        git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
        git fetch --no-tags pdx86-platform-drivers-x86 review-hans
        git checkout b5f3665e82591d465357f4a69196f46b3d30e997
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/platform/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/toshiba_acpi.c:2937:9: warning: no previous prototype for 'toshiba_acpi_hwmon_is_visible' [-Wmissing-prototypes]
    2937 | umode_t toshiba_acpi_hwmon_is_visible(const void *drvdata,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/x86/toshiba_acpi.c:2944:5: warning: no previous prototype for 'toshiba_acpi_hwmon_read' [-Wmissing-prototypes]
    2944 | int toshiba_acpi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
         |     ^~~~~~~~~~~~~~~~~~~~~~~


vim +/toshiba_acpi_hwmon_is_visible +2937 drivers/platform/x86/toshiba_acpi.c

  2934	
  2935	/* HWMON support for fan */
  2936	#if IS_ENABLED(CONFIG_HWMON)
> 2937	umode_t toshiba_acpi_hwmon_is_visible(const void *drvdata,
  2938					      enum hwmon_sensor_types type,
  2939					      u32 attr, int channel)
  2940	{
  2941		return 0444;
  2942	}
  2943	
> 2944	int toshiba_acpi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
  2945				    u32 attr, int channel, long *val)
  2946	{
  2947		/*
  2948		 * There is only a single channel and single attribute (for the
  2949		 * fan) at this point.
  2950		 * This can be replaced with more advanced logic in the future,
  2951		 * should the need arise.
  2952		 */
  2953		if (type == hwmon_fan && channel == 0 && attr == hwmon_fan_input) {
  2954			u32 value;
  2955			int ret;
  2956	
  2957			ret = get_fan_rpm(toshiba_acpi, &value);
  2958			if (ret)
  2959				return ret;
  2960	
  2961			*val = value;
  2962			return 0;
  2963		}
  2964		return -EOPNOTSUPP;
  2965	}
  2966	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ