From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58CF5C4332F for ; Sun, 29 Oct 2023 08:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbjJ2Iju (ORCPT ); Sun, 29 Oct 2023 04:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjJ2Ijt (ORCPT ); Sun, 29 Oct 2023 04:39:49 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A57C5; Sun, 29 Oct 2023 01:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1698568782; bh=jshvNIqxMYoT/ULUAbI8yGv7q+uWD6fD9TWA7ycDSzI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OcmT3ZFoGS4Wn7NEbHO/rDx7sMRezjkBVA9QKpKvheLhkrAJ14kdtE7UVW7X98Z5b eEYsVtvgT8SJW/adGFnRChIXqFhprggUnVJgYCkn/iskG1ji9EDa878C/0qXq1UiRP T5qpclCapL0emeKRN2JPPEfbep0arK2fWVms+bFsSFCa0IcBf7+nBOhp+D4C14Fz/3 jauRzGNThUJUDZHfcGBGndR0HKKOJ1mENbCOV+WlKo9jFn2zZLFGcf9ArWhUyZvO1E oQHY3FyPnlyyFcycbCp7Atj3YdhxkqAr66eO3HgH3WyiCmwBjTV1dmVFJsbGZJDdJp 8+AvbG9UizOtg== Received: by gofer.mess.org (Postfix, from userid 1000) id 270501000FA; Sun, 29 Oct 2023 08:39:42 +0000 (GMT) Date: Sun, 29 Oct 2023 08:39:42 +0000 From: Sean Young To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: linux-media@vger.kernel.org, linux-pwm@vger.kernel.org, Ivaylo Dimitrov , Thierry Reding , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] pwm: bcm2835: allow pwm driver to be used in atomic context Message-ID: References: <0b35ca65d6f4d53d3beb1411a64970ea5f969060.1698398004.git.sean@mess.org> <20231027133818.f5zpeqxfw7ghs7sk@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231027133818.f5zpeqxfw7ghs7sk@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Uwe, On Fri, Oct 27, 2023 at 03:38:18PM +0200, Uwe Kleine-König wrote: > On Fri, Oct 27, 2023 at 10:20:46AM +0100, Sean Young wrote: > > + pc->rate = clk_get_rate(pc->clk); > > + if (!pc->rate) { > > + dev_err(pc->dev, "failed to get clock rate\n"); > > + ret = -EINVAL; > > Other error paths in this driver use dev_err_probe(). The most compact > way here would be: > > ret = dev_err_probe(pc->dev, -EINVAL, "...."); > > but maybe > > ret = -EINVAL; > dev_err_probe(pc->dev, ret, "..."); > > is a bit easier to parse for a human?! Using the same dev_err_probe() function for all error paths is nice, so I will change it for the next version. This change will print the EINVAL error as well which does not really add anything, but no harm done there. Thanks, Sean