All of lore.kernel.org
 help / color / mirror / Atom feed
* [thermal:next 43/50] drivers/thermal/qcom/tsens.c:385:13: warning: no previous prototype for 'tsens_critical_irq_thread'
@ 2020-05-27 10:38 kbuild test robot
  2020-05-27 11:43 ` Amit Kucheria
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-05-27 10:38 UTC (permalink / raw)
  To: kbuild-all

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

tree:   thermal/next
head:   4d14235baa2b4aa64aed40805dd3db47dbc6f3b3
commit: a7ff82976122eb6d1fd286dc34f09b6ecd756b60 [43/50] drivers: thermal: tsens: Merge tsens-common.c into tsens.c
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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=arm64 

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_critical_irq_thread +385 drivers/thermal/qcom/tsens.c

   369	
   370	/**
   371	 * tsens_critical_irq_thread() - Threaded handler for critical interrupts
   372	 * @irq: irq number
   373	 * @data: tsens controller private data
   374	 *
   375	 * Check FSM watchdog bark status and clear if needed.
   376	 * Check all sensors to find ones that violated their critical threshold limits.
   377	 * Clear and then re-enable the interrupt.
   378	 *
   379	 * The level-triggered interrupt might deassert if the temperature returned to
   380	 * within the threshold limits by the time the handler got scheduled. We
   381	 * consider the irq to have been handled in that case.
   382	 *
   383	 * Return: IRQ_HANDLED
   384	 */
 > 385	irqreturn_t tsens_critical_irq_thread(int irq, void *data)
   386	{
   387		struct tsens_priv *priv = data;
   388		struct tsens_irq_data d;
   389		int temp, ret, i;
   390		u32 wdog_status, wdog_count;
   391	
   392		if (priv->feat->has_watchdog) {
   393			ret = regmap_field_read(priv->rf[WDOG_BARK_STATUS],
   394						&wdog_status);
   395			if (ret)
   396				return ret;
   397	
   398			if (wdog_status) {
   399				/* Clear WDOG interrupt */
   400				regmap_field_write(priv->rf[WDOG_BARK_CLEAR], 1);
   401				regmap_field_write(priv->rf[WDOG_BARK_CLEAR], 0);
   402				ret = regmap_field_read(priv->rf[WDOG_BARK_COUNT],
   403							&wdog_count);
   404				if (ret)
   405					return ret;
   406				if (wdog_count)
   407					dev_dbg(priv->dev, "%s: watchdog count: %d\n",
   408						__func__, wdog_count);
   409	
   410				/* Fall through to handle critical interrupts if any */
   411			}
   412		}
   413	
   414		for (i = 0; i < priv->num_sensors; i++) {
   415			const struct tsens_sensor *s = &priv->sensor[i];
   416			u32 hw_id = s->hw_id;
   417	
   418			if (IS_ERR(s->tzd))
   419				continue;
   420			if (!tsens_threshold_violated(priv, hw_id, &d))
   421				continue;
   422			ret = get_temp_tsens_valid(s, &temp);
   423			if (ret) {
   424				dev_err(priv->dev, "[%u] %s: error reading sensor\n",
   425					hw_id, __func__);
   426				continue;
   427			}
   428	
   429			tsens_read_irq_state(priv, hw_id, s, &d);
   430			if (d.crit_viol &&
   431			    !masked_irq(hw_id, d.crit_irq_mask, tsens_version(priv))) {
   432				/* Mask critical interrupts, unused on Linux */
   433				tsens_set_interrupt(priv, hw_id, CRITICAL, false);
   434			}
   435		}
   436	
   437		return IRQ_HANDLED;
   438	}
   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: 71787 bytes --]

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

* Re: [thermal:next 43/50] drivers/thermal/qcom/tsens.c:385:13: warning: no previous prototype for 'tsens_critical_irq_thread'
  2020-05-27 10:38 [thermal:next 43/50] drivers/thermal/qcom/tsens.c:385:13: warning: no previous prototype for 'tsens_critical_irq_thread' kbuild test robot
@ 2020-05-27 11:43 ` Amit Kucheria
  0 siblings, 0 replies; 2+ messages in thread
From: Amit Kucheria @ 2020-05-27 11:43 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, May 27, 2020 at 4:08 PM kbuild test robot <lkp@intel.com> wrote:
>
> tree:   thermal/next
> head:   4d14235baa2b4aa64aed40805dd3db47dbc6f3b3
> commit: a7ff82976122eb6d1fd286dc34f09b6ecd756b60 [43/50] drivers: thermal: tsens: Merge tsens-common.c into tsens.c
> config: arm64-allyesconfig (attached as .config)
> compiler: aarch64-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=arm64
>
> 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)
> |      ^~~~~~~~~~~~~~~~~

I guess all these functions can now be marked static. Here is a patch
that does that.

Daniel, would you prefer this be a separate patch or do you want fold
this into the original patch merging tsens-common.c into tsens.c?

Regards,
Amit


> vim +/tsens_critical_irq_thread +385 drivers/thermal/qcom/tsens.c
>
>    369
>    370  /**
>    371   * tsens_critical_irq_thread() - Threaded handler for critical interrupts
>    372   * @irq: irq number
>    373   * @data: tsens controller private data
>    374   *
>    375   * Check FSM watchdog bark status and clear if needed.
>    376   * Check all sensors to find ones that violated their critical threshold limits.
>    377   * Clear and then re-enable the interrupt.
>    378   *
>    379   * The level-triggered interrupt might deassert if the temperature returned to
>    380   * within the threshold limits by the time the handler got scheduled. We
>    381   * consider the irq to have been handled in that case.
>    382   *
>    383   * Return: IRQ_HANDLED
>    384   */
>  > 385  irqreturn_t tsens_critical_irq_thread(int irq, void *data)
>    386  {
>    387          struct tsens_priv *priv = data;
>    388          struct tsens_irq_data d;
>    389          int temp, ret, i;
>    390          u32 wdog_status, wdog_count;
>    391
>    392          if (priv->feat->has_watchdog) {
>    393                  ret = regmap_field_read(priv->rf[WDOG_BARK_STATUS],
>    394                                          &wdog_status);
>    395                  if (ret)
>    396                          return ret;
>    397
>    398                  if (wdog_status) {
>    399                          /* Clear WDOG interrupt */
>    400                          regmap_field_write(priv->rf[WDOG_BARK_CLEAR], 1);
>    401                          regmap_field_write(priv->rf[WDOG_BARK_CLEAR], 0);
>    402                          ret = regmap_field_read(priv->rf[WDOG_BARK_COUNT],
>    403                                                  &wdog_count);
>    404                          if (ret)
>    405                                  return ret;
>    406                          if (wdog_count)
>    407                                  dev_dbg(priv->dev, "%s: watchdog count: %d\n",
>    408                                          __func__, wdog_count);
>    409
>    410                          /* Fall through to handle critical interrupts if any */
>    411                  }
>    412          }
>    413
>    414          for (i = 0; i < priv->num_sensors; i++) {
>    415                  const struct tsens_sensor *s = &priv->sensor[i];
>    416                  u32 hw_id = s->hw_id;
>    417
>    418                  if (IS_ERR(s->tzd))
>    419                          continue;
>    420                  if (!tsens_threshold_violated(priv, hw_id, &d))
>    421                          continue;
>    422                  ret = get_temp_tsens_valid(s, &temp);
>    423                  if (ret) {
>    424                          dev_err(priv->dev, "[%u] %s: error reading sensor\n",
>    425                                  hw_id, __func__);
>    426                          continue;
>    427                  }
>    428
>    429                  tsens_read_irq_state(priv, hw_id, s, &d);
>    430                  if (d.crit_viol &&
>    431                      !masked_irq(hw_id, d.crit_irq_mask, tsens_version(priv))) {
>    432                          /* Mask critical interrupts, unused on Linux */
>    433                          tsens_set_interrupt(priv, hw_id, CRITICAL, false);
>    434                  }
>    435          }
>    436
>    437          return IRQ_HANDLED;
>    438  }
>    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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drivers-thermal-tsens-Mark-functions-static.patch --]
[-- Type: text/x-patch, Size: 3298 bytes --]

From 6757a26876b29922929abf64b1c11fa3b3033d03 Mon Sep 17 00:00:00 2001
Message-Id: <6757a26876b29922929abf64b1c11fa3b3033d03.1590579709.git.amit.kucheria@linaro.org>
From: Amit Kucheria <amit.kucheria@linaro.org>
Date: Wed, 27 May 2020 16:38:46 +0530
Subject: [PATCH] drivers: thermal: tsens: Mark functions static

After merging tsens-common.c into tsens.c, we can now mark some
functions static so they don't need any prototype declarations. This
fixes the following issue reported by lkp.

>> 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)
|      ^~~~~~~~~~~~~~~~~

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Reported-by: kbuild test robot <lkp@intel.com>
---
 drivers/thermal/qcom/tsens.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 8d3e94d2a9ed4..39c4462e38f62 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -382,7 +382,7 @@ static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
  *
  * Return: IRQ_HANDLED
  */
-irqreturn_t tsens_critical_irq_thread(int irq, void *data)
+static irqreturn_t tsens_critical_irq_thread(int irq, void *data)
 {
 	struct tsens_priv *priv = data;
 	struct tsens_irq_data d;
@@ -452,7 +452,7 @@ irqreturn_t tsens_critical_irq_thread(int irq, void *data)
  *
  * Return: IRQ_HANDLED
  */
-irqreturn_t tsens_irq_thread(int irq, void *data)
+static irqreturn_t tsens_irq_thread(int irq, void *data)
 {
 	struct tsens_priv *priv = data;
 	struct tsens_irq_data d;
@@ -520,7 +520,7 @@ irqreturn_t tsens_irq_thread(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-int tsens_set_trips(void *_sensor, int low, int high)
+static int tsens_set_trips(void *_sensor, int low, int high)
 {
 	struct tsens_sensor *s = _sensor;
 	struct tsens_priv *priv = s->priv;
@@ -557,7 +557,7 @@ int tsens_set_trips(void *_sensor, int low, int high)
 	return 0;
 }
 
-int tsens_enable_irq(struct tsens_priv *priv)
+static int tsens_enable_irq(struct tsens_priv *priv)
 {
 	int ret;
 	int val = tsens_version(priv) > VER_1_X ? 7 : 1;
@@ -570,7 +570,7 @@ int tsens_enable_irq(struct tsens_priv *priv)
 	return ret;
 }
 
-void tsens_disable_irq(struct tsens_priv *priv)
+static void tsens_disable_irq(struct tsens_priv *priv)
 {
 	regmap_field_write(priv->rf[INT_EN], 0);
 }
-- 
2.20.1


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

end of thread, other threads:[~2020-05-27 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 10:38 [thermal:next 43/50] drivers/thermal/qcom/tsens.c:385:13: warning: no previous prototype for 'tsens_critical_irq_thread' kbuild test robot
2020-05-27 11:43 ` Amit Kucheria

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.