mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Arvid Norlander <lkml@vorpal.se>, kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [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: Fri, 9 Sep 2022 21:50:59 +0200	[thread overview]
Message-ID: <574909f0-09c2-9d41-96a0-37315f4bd81d@redhat.com> (raw)
In-Reply-To: <695c3c05-d6c9-8717-4cca-2119542f2f43@vorpal.se>

Hi,

On 9/9/22 21:47, Arvid Norlander wrote:
> Hi,
> 
> On 2022-09-09 21:19, kernel test robot wrote:
>> 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)
> 
> Oops, clearly these are missing "static". Hans de Goede: Can you apply that
> fix locally easily, or should I send a patch? I must have forgotten to
> build with W=1.

I can write a fix for this and squash it into the commits in my review-hans branch,
actually i was just about to do that :)

So you can considered this fixed.

Regards,

hans



> 
>>   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	
>>
> 
> Best regards,
> Arvid Norlander
> 


      reply	other threads:[~2022-09-09 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:19 kernel test robot
2022-09-09 19:47 ` Arvid Norlander
2022-09-09 19:50   ` Hans de Goede [this message]

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=574909f0-09c2-9d41-96a0-37315f4bd81d@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@vorpal.se \
    --cc=lkp@intel.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®