Thread (67 messages) 67 messages, 5 authors, 2021-02-28

Re: [PATCH v8 09/22] counter: Return error code on invalid modes

From: David Lechner <david@lechnology.com>
Date: 2021-02-20 16:44:10
Also in: linux-iio, lkml

On 2/12/21 6:13 AM, William Breathitt Gray wrote:
Only a select set of modes (function, action, etc.) are valid for a
given device configuration. This patch ensures that invalid modes result
in a return -EINVAL. Such a situation should never occur in reality, but
it's good to define a default switch cases for the sake of making the
intent of the code clear.

Cc: Syed Nayyar Waris <redacted>
Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: Fabrice Gasnier <redacted>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <redacted>
Cc: David Lechner <david@lechnology.com>
Signed-off-by: William Breathitt Gray <redacted>
---
Reviewed-by: David Lechner <david@lechnology.com>

(In response to Jonathan's comment, I think this is fine rather than
adding more churn to change all of the breaks to returns - but will
keep that in mind for future changes.)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help