[lkml]   [2021]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 09/22] counter: Return error code on invalid modes
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 <>
> Cc: Kamel Bouhara <>
> Cc: Fabrice Gasnier <>
> Cc: Maxime Coquelin <>
> Cc: Alexandre Torgue <>
> Cc: David Lechner <>
> Signed-off-by: William Breathitt Gray <>
> ---

Reviewed-by: David Lechner <>

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

 \ /
  Last update: 2021-02-20 17:46    [W:0.362 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site