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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AED7AEDE9A4 for ; Thu, 14 Sep 2023 11:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ifDQwz5LB4nR2ABg8NufE4xTkpxf8wjxeYSAcbpdCC0=; b=QD05OqHnYw7UuT rAykIjXTyYSNQxyO4lixmo9sVgAL7lYZPyhZx42NrSrun5SsVvld/E4QO1NK6UZzlE8NsJgE2iIw0 d6YUgdGJSBzFGPAClm1zXtpgUkIq2L9j6Zjak8wXTb2j+IRNIjoBBMGoJ0Dn6J0zAXBrMN+ODLNIw WipFeCI4o3MKIJIy0VSaNujEufU68mIm4MMWqT0+Qe3MvR8W7jYzpQA1FjYh9UrUlysYp2RKeds4S YP+33wEW8h+9Kim8rMf7+u3AT00HhHMAO+TQc540B+wa0XkvNKs+oZqqTNBS0kqg/tP741kwvThuK Z3ReV5cxgtalXKeRJW5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qgkSO-008EVs-1R; Thu, 14 Sep 2023 11:24:24 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qgkSL-008EVW-1J for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2023 11:24:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0BEE2CE2485; Thu, 14 Sep 2023 11:24:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44831C433C8; Thu, 14 Sep 2023 11:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694690656; bh=7cGyC78LHve3osM8Hvu3/twUfNtqcFKheYxSlDSNvcc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bd9Xe3mx5JGh3jgZSki6z1tj+/aARC4uKcCns4P3tBfiete1jfzlH2DdaWEfq9X9k gb1AvrzVkQb/qC2jMYlAqD9QCsXBjB83V+ABCVPVvqt4aepydUtxeKjs45Rpo7jiSN OjtlbhMSuiOG0D/MFhxZ8WIMGaJ1gf/AP/ykcN7SzoWosRTP4HA18kbcxY2NsYD7CA qEeb2dn68yyrAafXTeOyMlQWAT5zn50kgnljKtRjckSuEg6TcoUS8RVp6wi5ccZlDD 8hI3y3VisnYvoEthO2sfEwDy1cqkhEPvzWcbPoKUkdccjEvU7FZBAq+ClljuY9pSzY mckLxnlYZjO5w== Date: Thu, 14 Sep 2023 13:24:06 +0200 From: Simon Horman To: "Russell King (Oracle)" Cc: Alexandre Torgue , Jose Abreu , Alexei Starovoitov , bpf@vger.kernel.org, Daniel Borkmann , "David S. Miller" , Emil Renner Berthing , Eric Dumazet , Fabio Estevam , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, NXP Linux Team , Paolo Abeni , Pengutronix Kernel Team , Samin Guo , Sascha Hauer , Shawn Guo Subject: Re: [PATCH net-next 1/6] net: stmmac: add platform library Message-ID: <20230914112406.GA401982@kernel.org> References: <20230912145227.GE401982@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230914_042421_636512_985A0B5B X-CRM114-Status: GOOD ( 20.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 12, 2023 at 11:20:55PM +0100, Russell King (Oracle) wrote: > On Tue, Sep 12, 2023 at 04:52:27PM +0200, Simon Horman wrote: > > On Mon, Sep 11, 2023 at 04:29:11PM +0100, Russell King (Oracle) wrote: > > > + default: > > > + return -ENOTSUPP; > > > > Checkpatch seems to think that EOPNOTSUPP would be more appropriate > > as "ENOTSUPP is not a SUSV4 error code". > > It needs to be an error code that clk_set_rate() below isn't going to > return - because if clk_set_rate() does return it, then the users are > going to end up issuing an incorrect error message to the user. I > suspect clk_set_rate() could quite legitimately return -EOPNOTSUPP > or -EINVAL. > > Sadly, the CCF implementation of clk_set_rate() doesn't detail what > errors it could return, but it looks like -EBUSY, -EINVAL, or something > from pm_runtime_resume_and_get(). Thanks Russell, Understood. In that case perhaps ENOTSUPP is not such a bad choice as: a) it seems rather unlikely CCF would use it; and b) the scope of usage is well contained - the helper and any direct callers. No further objections from my side :) > > Interestingly, while looking at this, pm_runtime_resume_and_get() can > return '1' if e.g. rpm is disabled and the device is active. It looks > to me like CCF treats that as an error in multiple locations. The plot thickens... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel