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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 240A4C48BDF for ; Tue, 15 Jun 2021 13:22:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 022CA61468 for ; Tue, 15 Jun 2021 13:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbhFONY4 convert rfc822-to-8bit (ORCPT ); Tue, 15 Jun 2021 09:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbhFONYy (ORCPT ); Tue, 15 Jun 2021 09:24:54 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48348C061574 for ; Tue, 15 Jun 2021 06:22:50 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lt91e-0008I0-IR; Tue, 15 Jun 2021 15:22:42 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1lt91b-00014w-Rg; Tue, 15 Jun 2021 15:22:39 +0200 Message-ID: <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> Subject: Re: [PATCH net-next v4 02/10] net: sparx5: add the basic sparx5 driver From: Philipp Zabel To: Steen Hegelund , "David S. Miller" , Jakub Kicinski Cc: Andrew Lunn , Russell King , Microchip Linux Driver Support , Alexandre Belloni , Madalin Bucur , Mark Einon , Masahiro Yamada , Arnd Bergmann , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjarni Jonasson , Lars Povlsen Date: Tue, 15 Jun 2021 15:22:39 +0200 In-Reply-To: <20210615085034.1262457-3-steen.hegelund@microchip.com> References: <20210615085034.1262457-1-steen.hegelund@microchip.com> <20210615085034.1262457-3-steen.hegelund@microchip.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steen, On Tue, 2021-06-15 at 10:50 +0200, Steen Hegelund wrote: > This adds the Sparx5 basic SwitchDev driver framework with IO range > mapping, switch device detection and core clock configuration. > > Support for ports, phylink, netdev, mactable etc. are in the following > patches. > > Signed-off-by: Steen Hegelund > Signed-off-by: Bjarni Jonasson > Signed-off-by: Lars Povlsen [...] > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > new file mode 100644 > index 000000000000..892bbbaacbd6 > --- /dev/null > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > @@ -0,0 +1,743 @@ [...] > +static int mchp_sparx5_probe(struct platform_device *pdev) > +{ [...] > + /* Do switch core reset if available */ > + reset = devm_reset_control_get_optional_shared(&pdev->dev, "switch"); Please don't ignore errors here. For example: if (IS_ERR(reset)) return dev_err_probe(&pdev->dev, PTR_ERR(reset), "Failed to get reset.\n"); > reset_control_reset(reset); regards Philipp 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=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 0C1FDC48BE5 for ; Tue, 15 Jun 2021 18:48:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C310E6128B for ; Tue, 15 Jun 2021 18:48:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C310E6128B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0Iemd/WmzR3so3a1VpSC72OQ/V4Q2CDC53WgbbrUc60=; b=0qP31Gc91u8dka V3aqO5AoryCG/l52fzXf3xVKJqB0vUWHLWsEunLW1YwMRzeRGPgB+k2nfyHkvxOdO8WSWjyRBnHN6 o9PzCp5le1JSHHrtDkqfcCrflS+M0lhjZyEKFi+XzhgF3Ercex18OC/pnJOrhAqUKF2Et3cB3BbTR QvK/IEjs34bD23nbrj9haeavrLuZKpdxLJQwIW33hXwnuKnM6qN+isWqgOjxbLnJrT45apH2DHXuZ vXUVARqczLcSH+qsUQaAKdx9ZJjPt1xk2VJCZXmyGJdT1O5dxUPaGMoptuIb3+9hc6dowPSSs2NWD st+Amq7WPsgAD/i/ak3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltE50-002Do0-Qe; Tue, 15 Jun 2021 18:46:33 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9Bb-000ByJ-SW for linux-arm-kernel@bombadil.infradead.org; Tue, 15 Jun 2021 13:33:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Transfer-Encoding :Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=cG7E+92u36FbhrgcfDb3IULLfIq7EmYWXt8Mb8ixT+4=; b=QB6SZcu3w5J8WQ5FWuhhRZYXio x6NSAux4F/P+wVA+gyb6iZbrDBP5LL9JwzDkdbZB2bzc+pw6WklpweJLCrbgBeNsyLut0t/CAuZbF njN0RqQvLMUta7AokKgRrHumyYuU3rE1j8HWrGsDEg60PTR+PvsZmi1nhlMFxiycCs53DlNuwaRKj szeWx266UASR4K9wUSAFNF+oCXfy0ClR5F/Oi4U8RE4Z7hRCOrQUigjfIRKMKudYwpbplTNeT9MxS jlym48lADibFIf9bA9GJF2cC4HpEZmhv5Icwy0Yf58cueW8osCYxlnIejDnowvhUWSwheJ9a1g5LX hV+HAWug==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt91f-007v3T-Hd for linux-arm-kernel@lists.infradead.org; Tue, 15 Jun 2021 13:22:52 +0000 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lt91e-0008I0-IR; Tue, 15 Jun 2021 15:22:42 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1lt91b-00014w-Rg; Tue, 15 Jun 2021 15:22:39 +0200 Message-ID: <2800a872ff4260fc7a942f2f2ea1c9e3603b13d7.camel@pengutronix.de> Subject: Re: [PATCH net-next v4 02/10] net: sparx5: add the basic sparx5 driver From: Philipp Zabel To: Steen Hegelund , "David S. Miller" , Jakub Kicinski Cc: Andrew Lunn , Russell King , Microchip Linux Driver Support , Alexandre Belloni , Madalin Bucur , Mark Einon , Masahiro Yamada , Arnd Bergmann , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjarni Jonasson , Lars Povlsen Date: Tue, 15 Jun 2021 15:22:39 +0200 In-Reply-To: <20210615085034.1262457-3-steen.hegelund@microchip.com> References: <20210615085034.1262457-1-steen.hegelund@microchip.com> <20210615085034.1262457-3-steen.hegelund@microchip.com> User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_142250_534500_62576101 X-CRM114-Status: GOOD ( 15.38 ) 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 Hi Steen, On Tue, 2021-06-15 at 10:50 +0200, Steen Hegelund wrote: > This adds the Sparx5 basic SwitchDev driver framework with IO range > mapping, switch device detection and core clock configuration. > > Support for ports, phylink, netdev, mactable etc. are in the following > patches. > > Signed-off-by: Steen Hegelund > Signed-off-by: Bjarni Jonasson > Signed-off-by: Lars Povlsen [...] > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > new file mode 100644 > index 000000000000..892bbbaacbd6 > --- /dev/null > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c > @@ -0,0 +1,743 @@ [...] > +static int mchp_sparx5_probe(struct platform_device *pdev) > +{ [...] > + /* Do switch core reset if available */ > + reset = devm_reset_control_get_optional_shared(&pdev->dev, "switch"); Please don't ignore errors here. For example: if (IS_ERR(reset)) return dev_err_probe(&pdev->dev, PTR_ERR(reset), "Failed to get reset.\n"); > reset_control_reset(reset); regards Philipp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel