All of lore.kernel.org
 help / color / mirror / Atom feed
* [thermal:next 43/50] drivers/thermal/qcom/tsens.c:455:13: warning: no previous prototype for 'tsens_irq_thread'
@ 2020-05-30 13:11 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-30 13:11 UTC (permalink / raw)
  To: kbuild-all

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

Hi Amit,

FYI, the error/warning still remains.

tree:   thermal/next
head:   4d14235baa2b4aa64aed40805dd3db47dbc6f3b3
commit: a7ff82976122eb6d1fd286dc34f09b6ecd756b60 [43/50] drivers: thermal: tsens: Merge tsens-common.c into tsens.c
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
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
        git checkout a7ff82976122eb6d1fd286dc34f09b6ecd756b60
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/thermal/qcom/tsens.c:385:13: warning: no previous prototype for 'tsens_critical_irq_thread' [-Wmissing-prototypes]
385 | irqreturn_t tsens_critical_irq_thread(int irq, void *data)
|             ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/thermal/qcom/tsens.c:455:13: warning: no previous prototype for 'tsens_irq_thread' [-Wmissing-prototypes]
455 | irqreturn_t tsens_irq_thread(int irq, void *data)
|             ^~~~~~~~~~~~~~~~
drivers/thermal/qcom/tsens.c:523:5: warning: no previous prototype for 'tsens_set_trips' [-Wmissing-prototypes]
523 | int tsens_set_trips(void *_sensor, int low, int high)
|     ^~~~~~~~~~~~~~~
drivers/thermal/qcom/tsens.c:560:5: warning: no previous prototype for 'tsens_enable_irq' [-Wmissing-prototypes]
560 | int tsens_enable_irq(struct tsens_priv *priv)
|     ^~~~~~~~~~~~~~~~
>> drivers/thermal/qcom/tsens.c:573:6: warning: no previous prototype for 'tsens_disable_irq' [-Wmissing-prototypes]
573 | void tsens_disable_irq(struct tsens_priv *priv)
|      ^~~~~~~~~~~~~~~~~

vim +/tsens_irq_thread +455 drivers/thermal/qcom/tsens.c

   439	
   440	/**
   441	 * tsens_irq_thread - Threaded interrupt handler for uplow interrupts
   442	 * @irq: irq number
   443	 * @data: tsens controller private data
   444	 *
   445	 * Check all sensors to find ones that violated their threshold limits. If the
   446	 * temperature is still outside the limits, call thermal_zone_device_update() to
   447	 * update the thresholds, else re-enable the interrupts.
   448	 *
   449	 * The level-triggered interrupt might deassert if the temperature returned to
   450	 * within the threshold limits by the time the handler got scheduled. We
   451	 * consider the irq to have been handled in that case.
   452	 *
   453	 * Return: IRQ_HANDLED
   454	 */
 > 455	irqreturn_t tsens_irq_thread(int irq, void *data)
   456	{
   457		struct tsens_priv *priv = data;
   458		struct tsens_irq_data d;
   459		bool enable = true, disable = false;
   460		unsigned long flags;
   461		int temp, ret, i;
   462	
   463		for (i = 0; i < priv->num_sensors; i++) {
   464			bool trigger = false;
   465			const struct tsens_sensor *s = &priv->sensor[i];
   466			u32 hw_id = s->hw_id;
   467	
   468			if (IS_ERR(s->tzd))
   469				continue;
   470			if (!tsens_threshold_violated(priv, hw_id, &d))
   471				continue;
   472			ret = get_temp_tsens_valid(s, &temp);
   473			if (ret) {
   474				dev_err(priv->dev, "[%u] %s: error reading sensor\n",
   475					hw_id, __func__);
   476				continue;
   477			}
   478	
   479			spin_lock_irqsave(&priv->ul_lock, flags);
   480	
   481			tsens_read_irq_state(priv, hw_id, s, &d);
   482	
   483			if (d.up_viol &&
   484			    !masked_irq(hw_id, d.up_irq_mask, tsens_version(priv))) {
   485				tsens_set_interrupt(priv, hw_id, UPPER, disable);
   486				if (d.up_thresh > temp) {
   487					dev_dbg(priv->dev, "[%u] %s: re-arm upper\n",
   488						hw_id, __func__);
   489					tsens_set_interrupt(priv, hw_id, UPPER, enable);
   490				} else {
   491					trigger = true;
   492					/* Keep irq masked */
   493				}
   494			} else if (d.low_viol &&
   495				   !masked_irq(hw_id, d.low_irq_mask, tsens_version(priv))) {
   496				tsens_set_interrupt(priv, hw_id, LOWER, disable);
   497				if (d.low_thresh < temp) {
   498					dev_dbg(priv->dev, "[%u] %s: re-arm low\n",
   499						hw_id, __func__);
   500					tsens_set_interrupt(priv, hw_id, LOWER, enable);
   501				} else {
   502					trigger = true;
   503					/* Keep irq masked */
   504				}
   505			}
   506	
   507			spin_unlock_irqrestore(&priv->ul_lock, flags);
   508	
   509			if (trigger) {
   510				dev_dbg(priv->dev, "[%u] %s: TZ update trigger (%d mC)\n",
   511					hw_id, __func__, temp);
   512				thermal_zone_device_update(s->tzd,
   513							   THERMAL_EVENT_UNSPECIFIED);
   514			} else {
   515				dev_dbg(priv->dev, "[%u] %s: no violation:  %d\n",
   516					hw_id, __func__, temp);
   517			}
   518		}
   519	
   520		return IRQ_HANDLED;
   521	}
   522	
   523	int tsens_set_trips(void *_sensor, int low, int high)
   524	{
   525		struct tsens_sensor *s = _sensor;
   526		struct tsens_priv *priv = s->priv;
   527		struct device *dev = priv->dev;
   528		struct tsens_irq_data d;
   529		unsigned long flags;
   530		int high_val, low_val, cl_high, cl_low;
   531		u32 hw_id = s->hw_id;
   532	
   533		dev_dbg(dev, "[%u] %s: proposed thresholds: (%d:%d)\n",
   534			hw_id, __func__, low, high);
   535	
   536		cl_high = clamp_val(high, -40000, 120000);
   537		cl_low  = clamp_val(low, -40000, 120000);
   538	
   539		high_val = tsens_mC_to_hw(s, cl_high);
   540		low_val  = tsens_mC_to_hw(s, cl_low);
   541	
   542		spin_lock_irqsave(&priv->ul_lock, flags);
   543	
   544		tsens_read_irq_state(priv, hw_id, s, &d);
   545	
   546		/* Write the new thresholds and clear the status */
   547		regmap_field_write(priv->rf[LOW_THRESH_0 + hw_id], low_val);
   548		regmap_field_write(priv->rf[UP_THRESH_0 + hw_id], high_val);
   549		tsens_set_interrupt(priv, hw_id, LOWER, true);
   550		tsens_set_interrupt(priv, hw_id, UPPER, true);
   551	
   552		spin_unlock_irqrestore(&priv->ul_lock, flags);
   553	
   554		dev_dbg(dev, "[%u] %s: (%d:%d)->(%d:%d)\n",
   555			hw_id, __func__, d.low_thresh, d.up_thresh, cl_low, cl_high);
   556	
   557		return 0;
   558	}
   559	
   560	int tsens_enable_irq(struct tsens_priv *priv)
   561	{
   562		int ret;
   563		int val = tsens_version(priv) > VER_1_X ? 7 : 1;
   564	
   565		ret = regmap_field_write(priv->rf[INT_EN], val);
   566		if (ret < 0)
   567			dev_err(priv->dev, "%s: failed to enable interrupts\n",
   568				__func__);
   569	
   570		return ret;
   571	}
   572	
 > 573	void tsens_disable_irq(struct tsens_priv *priv)
   574	{
   575		regmap_field_write(priv->rf[INT_EN], 0);
   576	}
   577	

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-30 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-30 13:11 [thermal:next 43/50] drivers/thermal/qcom/tsens.c:455:13: warning: no previous prototype for 'tsens_irq_thread' kbuild 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.