linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH hwmon-next v1 1/1] hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading
@ 2018-11-20 23:16 Vadim Pasternak
  2018-11-21 23:44 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Pasternak @ 2018-11-20 23:16 UTC (permalink / raw)
  To: linux; +Cc: linux-hwmon, michaelsh, Vadim Pasternak

Modify macros for tachometer fault status reading for making it more
simple and clear.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
---
 drivers/hwmon/mlxreg-fan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c
index d8fa4be..db8c6de 100644
--- a/drivers/hwmon/mlxreg-fan.c
+++ b/drivers/hwmon/mlxreg-fan.c
@@ -51,7 +51,7 @@
  */
 #define MLXREG_FAN_GET_RPM(rval, d, s)	(DIV_ROUND_CLOSEST(15000000 * 100, \
 					 ((rval) + (s)) * (d)))
-#define MLXREG_FAN_GET_FAULT(val, mask) (!((val) ^ (mask)))
+#define MLXREG_FAN_GET_FAULT(val, mask) ((val) == (mask))
 #define MLXREG_FAN_PWM_DUTY2STATE(duty)	(DIV_ROUND_CLOSEST((duty) *	\
 					 MLXREG_FAN_MAX_STATE,		\
 					 MLXREG_FAN_MAX_DUTY))
-- 
2.1.4

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

* Re: [PATCH hwmon-next v1 1/1] hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading
  2018-11-20 23:16 [PATCH hwmon-next v1 1/1] hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading Vadim Pasternak
@ 2018-11-21 23:44 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-11-21 23:44 UTC (permalink / raw)
  To: Vadim Pasternak; +Cc: linux-hwmon, michaelsh

On Tue, Nov 20, 2018 at 11:16:36PM +0000, Vadim Pasternak wrote:
> Modify macros for tachometer fault status reading for making it more
> simple and clear.
> 
> Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/mlxreg-fan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c
> index d8fa4be..db8c6de 100644
> --- a/drivers/hwmon/mlxreg-fan.c
> +++ b/drivers/hwmon/mlxreg-fan.c
> @@ -51,7 +51,7 @@
>   */
>  #define MLXREG_FAN_GET_RPM(rval, d, s)	(DIV_ROUND_CLOSEST(15000000 * 100, \
>  					 ((rval) + (s)) * (d)))
> -#define MLXREG_FAN_GET_FAULT(val, mask) (!((val) ^ (mask)))
> +#define MLXREG_FAN_GET_FAULT(val, mask) ((val) == (mask))
>  #define MLXREG_FAN_PWM_DUTY2STATE(duty)	(DIV_ROUND_CLOSEST((duty) *	\
>  					 MLXREG_FAN_MAX_STATE,		\
>  					 MLXREG_FAN_MAX_DUTY))

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

end of thread, other threads:[~2018-11-22 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 23:16 [PATCH hwmon-next v1 1/1] hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading Vadim Pasternak
2018-11-21 23:44 ` Guenter Roeck

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).