[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a6222f2-a9e7-1c96-b92b-b21e6c76c205@linaro.org>
Date: Mon, 28 Aug 2023 20:43:16 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: rfoss@...nel.org, todor.too@...il.com, agross@...nel.org,
andersson@...nel.org, konrad.dybcio@...aro.org, mchehab@...nel.org,
hverkuil-cisco@...all.nl, sakari.ailus@...ux.intel.com,
andrey.konovalov@...aro.org, linux-media@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 08/15] media: qcom: camss: Untangle if/else spaghetti
in camss
On 28/08/2023 19:51, Laurent Pinchart wrote:
>> + break;
>> + default:
>> return -EINVAL;
> This should never happen, as adding support for a new SoC should come
> with an update for all the applicable switch/case statements. It's
> useful to let the compiler complain if someone forgets to do so, but
> with a default case, you will only see the issue at runtime. Could it be
> caught at compile time ?
>
Off the top of my head, I don't think it could be easily caught.
An assert() would catch it early in runtime..
---
bod
Powered by blists - more mailing lists