[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5b53db8-395a-b77e-77fb-49f7fd0da231@lechnology.com>
Date: Sat, 20 Feb 2021 10:43:06 -0600
From: David Lechner <david@...hnology.com>
To: William Breathitt Gray <vilhelm.gray@...il.com>, jic23@...nel.org
Cc: kernel@...gutronix.de, linux-stm32@...md-mailman.stormreply.com,
a.fatoum@...gutronix.de, kamel.bouhara@...tlin.com,
gwendal@...omium.org, alexandre.belloni@...tlin.com,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, syednwaris@...il.com,
patrick.havelange@...ensium.com, fabrice.gasnier@...com,
mcoquelin.stm32@...il.com, alexandre.torgue@...com,
o.rempel@...gutronix.de
Subject: Re: [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 <syednwaris@...il.com>
> Cc: Kamel Bouhara <kamel.bouhara@...tlin.com>
> Cc: Fabrice Gasnier <fabrice.gasnier@...com>
> Cc: Maxime Coquelin <mcoquelin.stm32@...il.com>
> Cc: Alexandre Torgue <alexandre.torgue@...com>
> Cc: David Lechner <david@...hnology.com>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@...il.com>
> ---
Reviewed-by: David Lechner <david@...hnology.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.)
Powered by blists - more mailing lists