linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq()
@ 2025-02-16 17:03 Dmitry Antipov
  2025-02-21 18:46 ` David Collins
  2025-02-25 20:59 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Antipov @ 2025-02-16 17:03 UTC (permalink / raw)
  To: Dmitry Torokhov, David Collins
  Cc: Uwe Kleine-König, Anjelique Melendez, linux-arm-msm,
	linux-input, Dmitry Antipov

Since 'sw_debounce_end_time' of 'struct pm8941_pwrkey' is of type
'ktime_t', use 'ktime_to_us()' to print the value in microseconds
as it is announced in a call to 'dev_dbg()'. Compile tested only.

Fixes: 0b65118e6ba3 ("Input: pm8941-pwrkey - add software key press debouncing support")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/input/misc/pm8941-pwrkey.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
index d0c46665e527..d952c16f2458 100644
--- a/drivers/input/misc/pm8941-pwrkey.c
+++ b/drivers/input/misc/pm8941-pwrkey.c
@@ -154,8 +154,8 @@ static irqreturn_t pm8941_pwrkey_irq(int irq, void *_data)
 	if (pwrkey->sw_debounce_time_us) {
 		if (ktime_before(ktime_get(), pwrkey->sw_debounce_end_time)) {
 			dev_dbg(pwrkey->dev,
-				"ignoring key event received before debounce end %llu us\n",
-				pwrkey->sw_debounce_end_time);
+				"ignoring key event received before debounce end %lld us\n",
+				ktime_to_us(pwrkey->sw_debounce_end_time));
 			return IRQ_HANDLED;
 		}
 	}
-- 
2.48.1


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

* Re: [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq()
  2025-02-16 17:03 [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq() Dmitry Antipov
@ 2025-02-21 18:46 ` David Collins
  2025-02-25 20:59 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: David Collins @ 2025-02-21 18:46 UTC (permalink / raw)
  To: Dmitry Antipov, Dmitry Torokhov
  Cc: Uwe Kleine-König, Anjelique Melendez, linux-arm-msm,
	linux-input

On 2/16/25 09:03, Dmitry Antipov wrote:
> Since 'sw_debounce_end_time' of 'struct pm8941_pwrkey' is of type
> 'ktime_t', use 'ktime_to_us()' to print the value in microseconds
> as it is announced in a call to 'dev_dbg()'. Compile tested only.
> 
> Fixes: 0b65118e6ba3 ("Input: pm8941-pwrkey - add software key press debouncing support")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Reviewed-by: David Collins <quic_collinsd@quicinc.com>

Thanks for making this fix.

Take care,
David Collins

> ---
>  drivers/input/misc/pm8941-pwrkey.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
> index d0c46665e527..d952c16f2458 100644
> --- a/drivers/input/misc/pm8941-pwrkey.c
> +++ b/drivers/input/misc/pm8941-pwrkey.c
> @@ -154,8 +154,8 @@ static irqreturn_t pm8941_pwrkey_irq(int irq, void *_data)
>  	if (pwrkey->sw_debounce_time_us) {
>  		if (ktime_before(ktime_get(), pwrkey->sw_debounce_end_time)) {
>  			dev_dbg(pwrkey->dev,
> -				"ignoring key event received before debounce end %llu us\n",
> -				pwrkey->sw_debounce_end_time);
> +				"ignoring key event received before debounce end %lld us\n",
> +				ktime_to_us(pwrkey->sw_debounce_end_time));
>  			return IRQ_HANDLED;
>  		}
>  	}


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

* Re: [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq()
  2025-02-16 17:03 [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq() Dmitry Antipov
  2025-02-21 18:46 ` David Collins
@ 2025-02-25 20:59 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2025-02-25 20:59 UTC (permalink / raw)
  To: Dmitry Antipov
  Cc: David Collins, Uwe Kleine-König, Anjelique Melendez,
	linux-arm-msm, linux-input

On Sun, Feb 16, 2025 at 08:03:36PM +0300, Dmitry Antipov wrote:
> Since 'sw_debounce_end_time' of 'struct pm8941_pwrkey' is of type
> 'ktime_t', use 'ktime_to_us()' to print the value in microseconds
> as it is announced in a call to 'dev_dbg()'. Compile tested only.
> 
> Fixes: 0b65118e6ba3 ("Input: pm8941-pwrkey - add software key press debouncing support")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Applied, thank you.

-- 
Dmitry

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

end of thread, other threads:[~2025-02-25 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 17:03 [PATCH] input: pm8941-pwrkey: fix dev_dbg() output in pm8941_pwrkey_irq() Dmitry Antipov
2025-02-21 18:46 ` David Collins
2025-02-25 20:59 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).