From: kernel test robot <lkp@intel.com>
To: Arvid Norlander <lkml@vorpal.se>
Cc: kbuild-all@lists.01.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
linux-kernel@vger.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'
Date: Sat, 10 Sep 2022 03:19:48 +0800 [thread overview]
Message-ID: <202209100300.LjCie4bn-lkp@intel.com> (raw)
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@intel.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
next reply other threads:[~2022-09-09 19:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 19:19 kernel test robot [this message]
2022-09-09 19:47 ` Arvid Norlander
2022-09-09 19:50 ` Hans de Goede
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=202209100300.LjCie4bn-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@vorpal.se \
/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®