Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1702586rwd; Thu, 15 Jun 2023 14:32:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4BYDWM5kChF1sIwHw0ncQufg7gCPjhz/Qpg2O+WQ3rO2YTL3iBN4Z6U223hdEKoGYnuuuY X-Received: by 2002:a17:907:9718:b0:977:d48f:97ad with SMTP id jg24-20020a170907971800b00977d48f97admr207102ejc.75.1686864744732; Thu, 15 Jun 2023 14:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686864744; cv=none; d=google.com; s=arc-20160816; b=agoEmagxmZgX0l+hPx8BJFuTvOiuGqvlM9DaLG3415O1yyDTcjkL2Op+FIbAHz5Cl3 gkkw15baKMFlu3Ku4ads4psnYHRDwpH6AHTUfQtC2u2A5Vvt2gj4cxC5VtSjwmCoD332 VxgT1ltiFJCjtUHQ1vRv0TLVwO8EWr/frRN+WgJVrOWInkpJKK+fOMX+5ydRAD6co0ll AiTpLqw8Bkvp/U0T/Xrr2lnSXWZqhQd2OsCpJ1+LkkNg0C89g/Jhfwp3YtC15eCSd2ol zemXgEVMZIvqFyB023543z/jUayZditqGlymWAfLxEswzMlcMYxDoW7Ys452Z/cxOuTk 5iCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=aDc//YuFtaRzUGzoigOUfnlePn6bsnGkSi4GnqCGPOI=; b=MJLVdnd+AGd/c3EiXLeFDmSp9pBvW9C1IWbxeYsrw/rI+iVGQZ1rjMroR3SdLJTdgk s7tLT3w5xf+vpdVNWy56DaRLBSxoyD7sSK7voU2DvDumUxcUUEw3VzhuNTFtqGqr5dDA PUFWHEgdQm9dvomaAx37E5g3XKyfMyiMXjpyEGzDI/qzCfxu+Z5Vea3y5AHD1L3QWI/1 w24JG7jRbKtDKuP1a4AcErASIbBXK7rYB0BJiMFqwY4WFlUgRCocVNH8QSspFLfAT/l6 Ga7hdUlDsFMLXPxVcT0AZoy0VttA+DvMdELL/KVKJ4G/2pnyKeEcTf4B74Wf5ALBsCua n2JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+ndHP4r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qp22-20020a170907207600b0094f99cbac72si9468332ejb.412.2023.06.15.14.31.59; Thu, 15 Jun 2023 14:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+ndHP4r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229734AbjFOV03 (ORCPT + 99 others); Thu, 15 Jun 2023 17:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbjFOV0W (ORCPT ); Thu, 15 Jun 2023 17:26:22 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DD282D72 for ; Thu, 15 Jun 2023 14:26:17 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-977d55ac17bso358748366b.3 for ; Thu, 15 Jun 2023 14:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686864376; x=1689456376; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aDc//YuFtaRzUGzoigOUfnlePn6bsnGkSi4GnqCGPOI=; b=Q+ndHP4r4HVJ3u8v3TCAG+frLji7WtcnSfr01vaPVut7K4QRzIGrbGmnTOXQIuDrHD s1gP6fhHNfMTFYb7Lc3Je8+9Lyfwq47ffhicQjABo2ukXCd7mvGowbv+eqt/leaduiTV JvpOlRtVhhQdl2Vh/YhrtVsLuDzFW4CJqoCADl9shRVm6hQuDLgIjTGBGHPYi4bIxdjz Chgs+zjH6d/Rog4rQwcEze+grM+3KtqPI4V3ubIeVdDqJdo3cSLL/Q7NGri6kTQGi58W 5w74gv8z/oVjAJHIzXFXwq7uUV48vzmwCQzSU2x6Yrb4ZHOdEkyY865bxmEWhJdxhls/ htKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686864376; x=1689456376; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aDc//YuFtaRzUGzoigOUfnlePn6bsnGkSi4GnqCGPOI=; b=Kq1XBRC+rlZRyfkYWyfZZWBVNHZ8dK+JKAWJUBtpWWaPDR3+TnkLI4Kl02Tfj0yLul wZVwEw4jFUUZ35L8k2COshqs8Pwei/HjogR8jeHgWyAK+R/KBLKt1H4p0MXIv0Ulp5a5 P5RIEHUK6sSDl9bCk2eQb44rchrLJnKPPjVU7zkZ6MyFxOkO22kCLgBt0QQOONwKu3az C7+wbNSqZAnxJyLpuMASBfoOrBvqy18bSmsms5lkr9OxIry5GPQV9lCsFbhvt7Pj7oAD UlV3M44y9TLqiCDHKicJkNu3EsoLIoCR9500entOwxnAv0LN4mdnQMu/IwH2rqz8/msw BwsQ== X-Gm-Message-State: AC+VfDz2PNJAaUKNPuA/2lUi8Y3jJuvw82mVEDLZtCs4y6l4TS8kqiRZ PoDg2RaZqIA5rKJp3Kbv7/UGWg== X-Received: by 2002:a17:906:6a06:b0:94e:e97b:c65 with SMTP id qw6-20020a1709066a0600b0094ee97b0c65mr202766ejc.60.1686864375885; Thu, 15 Jun 2023 14:26:15 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id e10-20020a170906044a00b009845c187bdcsm244451eja.137.2023.06.15.14.26.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jun 2023 14:26:15 -0700 (PDT) Message-ID: <3364339a-908d-7ab6-7d62-a05ab8e67739@linaro.org> Date: Thu, 15 Jun 2023 23:26:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] soc: qcom: icc-bwmon: Don't ignore return values of regmap functions Content-Language: en-US To: Konrad Dybcio , Andy Gross , Bjorn Andersson Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230615-topic-bwmonretval-v1-1-223bd048ebf7@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20230615-topic-bwmonretval-v1-1-223bd048ebf7@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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