lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Jun 2023 23:26:13 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>
Cc:     Marijn Suijten <marijn.suijten@...ainline.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: qcom: icc-bwmon: Don't ignore return values of
 regmap functions

On 15/06/2023 23:12, Konrad Dybcio wrote:
> As it turns out, not all regmap accesses succeed. Not knowing this is
> particularly suboptimal when there's a breaking change to the regmap
> APIs. Monitor the return values of regmap_ calls and propagate errors,
> should any occur.
> 
> To keep any level of readability in bwmon_enable(), add some comments
> to separate the logical blocks.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>

Nice coincidence, I just had some talks with a friend about uselessness
(IMHO) of regmap MMIO return status checks.

Sorry, for me most of this makes the code difficult to read for no gain.
Errors are not real. This is some artificial problem. Solving it makes
code less maintainable.

If we used here readl/writel, you would not add any checks, right? Then
don't add for regmap mmio.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ