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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 748C7C433ED for ; Thu, 15 Apr 2021 23:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CA9A61074 for ; Thu, 15 Apr 2021 23:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236090AbhDOXx3 (ORCPT ); Thu, 15 Apr 2021 19:53:29 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:54612 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235758AbhDOXx2 (ORCPT ); Thu, 15 Apr 2021 19:53:28 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lXBn9-00GzB0-VQ; Fri, 16 Apr 2021 01:52:59 +0200 Date: Fri, 16 Apr 2021 01:52:59 +0200 From: Andrew Lunn To: Thomas Bogendoerfer Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 net-next 08/10] net: korina: Get mdio input clock via common clock framework Message-ID: References: <20210414230648.76129-1-tsbogend@alpha.franken.de> <20210414230648.76129-9-tsbogend@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414230648.76129-9-tsbogend@alpha.franken.de> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > @@ -1079,6 +1078,14 @@ static int korina_probe(struct platform_device *pdev) > eth_hw_addr_random(dev); > } > > + clk = devm_clk_get(&pdev->dev, NULL); You should use a name here. It makes future expansion of the binding easier. devm_clk_get_optional() is probably better. If there is a real error it will return an error. If the clock does not exist, you get a NULL. Real errors should cause the problem to fail, but with a NULL you can use the fallback value. You also need to document the device tree binding. Andrew