Skip to content

Commit 3ecc829

Browse files
idlethreaddlezcano
authored andcommitted
thermal/drivers/tsens: Fix compilation warnings by making 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 <[email protected]> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/6757a26876b29922929abf64b1c11fa3b3033d03.1590579709.git.amit.kucheria@linaro.org
1 parent b414791 commit 3ecc829

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/thermal/qcom/tsens.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
382382
*
383383
* Return: IRQ_HANDLED
384384
*/
385-
irqreturn_t tsens_critical_irq_thread(int irq, void *data)
385+
static irqreturn_t tsens_critical_irq_thread(int irq, void *data)
386386
{
387387
struct tsens_priv *priv = data;
388388
struct tsens_irq_data d;
@@ -452,7 +452,7 @@ irqreturn_t tsens_critical_irq_thread(int irq, void *data)
452452
*
453453
* Return: IRQ_HANDLED
454454
*/
455-
irqreturn_t tsens_irq_thread(int irq, void *data)
455+
static irqreturn_t tsens_irq_thread(int irq, void *data)
456456
{
457457
struct tsens_priv *priv = data;
458458
struct tsens_irq_data d;
@@ -520,7 +520,7 @@ irqreturn_t tsens_irq_thread(int irq, void *data)
520520
return IRQ_HANDLED;
521521
}
522522

523-
int tsens_set_trips(void *_sensor, int low, int high)
523+
static int tsens_set_trips(void *_sensor, int low, int high)
524524
{
525525
struct tsens_sensor *s = _sensor;
526526
struct tsens_priv *priv = s->priv;
@@ -557,7 +557,7 @@ int tsens_set_trips(void *_sensor, int low, int high)
557557
return 0;
558558
}
559559

560-
int tsens_enable_irq(struct tsens_priv *priv)
560+
static int tsens_enable_irq(struct tsens_priv *priv)
561561
{
562562
int ret;
563563
int val = tsens_version(priv) > VER_1_X ? 7 : 1;
@@ -570,7 +570,7 @@ int tsens_enable_irq(struct tsens_priv *priv)
570570
return ret;
571571
}
572572

573-
void tsens_disable_irq(struct tsens_priv *priv)
573+
static void tsens_disable_irq(struct tsens_priv *priv)
574574
{
575575
regmap_field_write(priv->rf[INT_EN], 0);
576576
}

0 commit comments

Comments
 (0)