Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3238161rwb; Mon, 16 Jan 2023 05:40:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtHSyQMTtgTFWcCHUHPDKUVj1XjpEyebBB3B1zrTozo38+Fcip2wyU/Z+o+Vld1Fe+7m1E7 X-Received: by 2002:a17:902:850c:b0:192:bbe9:4cab with SMTP id bj12-20020a170902850c00b00192bbe94cabmr54057176plb.24.1673876401087; Mon, 16 Jan 2023 05:40:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673876401; cv=none; d=google.com; s=arc-20160816; b=wGWttCQDRBaiUs6AYyssJcrEyO8v9saHO4qlHZFhm5hoTJ/64u5TKRsJeRBbx3tVqQ BWjgQfgieFdxgTeAA4oRo7dVYcw7S22O4+Zu74x7sm7XqyL7CPphdndiGlCh/UOc1j8P HLFp/lcpL1z5JUTFcU6bGs4mjOh0lSHEy5X09OBDCzmN48t0rjZ93mhmxxbmc0ZGmwXg w84R4siZo5L88V8V8834hJ1oa+BcIQskv2E0981xzT3bapeB/H8FB5irQjh0F71pOQ/E 6E6fYsIzq4peaDT6iJu62B3jSsQGksfawy/53640BEJyjaA5R1KrhbpttIuR3+SYFQNF mwUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=vNvOX7djjjBjKEHmE27QSb/utZxm3kNjauubSDkICIY=; b=lQdC3Zo07rwfplShgTdMUKJnWj7FZsGfc6YuvMXkMj/uvIdCvmccVJaBzmCI5Q6l5Q /L9AtEKb9TFndNk5THNKLd5fjQfcWuq935/L3MuR5FHJC0nXqRzHlG6hn4gCiSaHXJ8p ueqNt3zEYeHxzEG4b2sQWgWs1MGQxa7/kzql9iKlhfDV2v/WGN+VcS8+JzVJG6GM8p+P AVRsFI4FcdDe6rJiTbkGAXJ3k6KJpCO9CZqVtOAGMK/sN79OoSHKzBrHIf4aoW41SdSL FszH6P2yKeFsYQrygtdhky3CLuKZslyr6ytX8YX1HdaJGZVA6TGniwPP8LmFnEBu8h+6 9lzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="6bhtEiB/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a170902ea0c00b001926d641de9si31498164plg.553.2023.01.16.05.39.54; Mon, 16 Jan 2023 05:40:01 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="6bhtEiB/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjAPNdR (ORCPT + 50 others); Mon, 16 Jan 2023 08:33:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjAPNdP (ORCPT ); Mon, 16 Jan 2023 08:33:15 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF0FB65A6 for ; Mon, 16 Jan 2023 05:33:13 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id o17-20020a05600c511100b003db021ef437so774510wms.4 for ; Mon, 16 Jan 2023 05:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=vNvOX7djjjBjKEHmE27QSb/utZxm3kNjauubSDkICIY=; b=6bhtEiB/26w40qL9HaO/mVd9X3p8jy6vR7QeqGrPRJ9VB4cbhqVmYX8lVFCN97bDp8 +SwI6iuAHzjQLzrGzQdusMA6GrMJ5o4ITzzzqlWBSXyBsu96TRSSoTiYjuDKjfoEIQTl UOJLQioaei3BPtjjyn1U51LZtT64WFjP9YS1Uz6XnRV7A9TBSxPARRUB5iUO58JFaAaa VHJfn12xJ5HIT8jyQD6neJWmA+Sr7sVm3iU4xnZi3JOxzzOBH/F4ZzRVmL8SSVUeuVy0 /O1ujgi0twVfWd0t7dgMSPfB2CpWz+cngGXWzdcdt96kJ7AIAb9UlnOVcDmlcxb7bsap GJRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vNvOX7djjjBjKEHmE27QSb/utZxm3kNjauubSDkICIY=; b=kkxQBxrg+UHTm1FCF3X/7YpxcrqkU3I3+DZP/L8nftiDRNS25bNsyKnJk4INilBiEv aNmAhemzioZxS/vM0eWybOccpUH8H/xnbnoyXTEAct2RlG0edqmdtvi7/WjRXtO673n2 6YmySoRE1HWJYDxgT6kxQQNRCrcBss+THhFmFqhlzJOwJPzf48R39+8m8saaFXeE+zkT NfKEEhkTSHzVLVEOsDJw3F5OLAvkR2dlk2IghkrRi4ctZma3P8+cZI5FmZzOYiLVJkDT +OZQYvhL9sDtH1o0ge2RYLop9gjsC8NiVwMLfXsqAy2Xmn1JSlwujv15rIRWQ5sYZ9yz iWUg== X-Gm-Message-State: AFqh2koAHMcjfN1ZHO/rm7udpNgvxYAxecS33XUUuu7R1Gp+07MdJg7G yos2hZn8CEs+SU/cJbonZF2kbQ== X-Received: by 2002:a05:600c:4d23:b0:3da:270b:ba6b with SMTP id u35-20020a05600c4d2300b003da270bba6bmr9967300wmp.41.1673875992502; Mon, 16 Jan 2023 05:33:12 -0800 (PST) Received: from localhost (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id d6-20020a05600c3ac600b003da0dc39872sm16227317wms.6.2023.01.16.05.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 05:33:12 -0800 (PST) References: <20230116091637.272923-1-jbrunet@baylibre.com> <20230116091637.272923-3-jbrunet@baylibre.com> User-agent: mu4e 1.8.10; emacs 28.2 From: Jerome Brunet To: Simon Horman Cc: netdev@vger.kernel.org, "David S. Miller" , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Da Xue , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/2] net: mdio: add amlogic gxl mdio mux support Date: Mon, 16 Jan 2023 14:27:57 +0100 In-reply-to: Message-ID: <1jk01mhaeg.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Mon 16 Jan 2023 at 13:11, Simon Horman wrote: > On Mon, Jan 16, 2023 at 10:16:36AM +0100, Jerome Brunet wrote: >> Add support for the mdio mux and internal phy glue of the GXL SoC >> family >> >> Signed-off-by: Jerome Brunet >> --- >> drivers/net/mdio/Kconfig | 11 ++ >> drivers/net/mdio/Makefile | 1 + >> drivers/net/mdio/mdio-mux-meson-gxl.c | 160 ++++++++++++++++++++++++++ >> 3 files changed, 172 insertions(+) >> create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c > > Hi Jerome, > > please run this patch through checkpatch. Shame ... I really thought I did, but I forgot indeed. I am really sorry for this. I'll fix everything. > > ... > >> diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c >> new file mode 100644 >> index 000000000000..205095d845ea >> --- /dev/null >> +++ b/drivers/net/mdio/mdio-mux-meson-gxl.c > > ... > >> +static int gxl_enable_internal_mdio(struct gxl_mdio_mux *priv) >> +{ > > nit: I think void would be a more appropriate return type for this > function. Likewise gxl_enable_external_mdio() > > ... > >> +static int gxl_mdio_mux_probe(struct platform_device *pdev){ > > nit: '{' should be at the beginning of a new line > >> + struct device *dev = &pdev->dev; >> + struct clk *rclk; >> + struct gxl_mdio_mux *priv; > > nit: reverse xmas tree for local variable declarations. > >> + int ret; >> + >> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); >> + if (!priv) >> + return -ENOMEM; > > nit: may be it is nicer to use dev_err_probe() here for consistency. That was on purpose. I only use the `dev_err_probe()` when the probe may defer, which I don't expect here. I don't mind changing if you prefer it this way. > >> + platform_set_drvdata(pdev, priv); >> + >> + priv->regs = devm_platform_ioremap_resource(pdev, 0); >> + if (IS_ERR(priv->regs)) >> + return PTR_ERR(priv->regs); > > And here. > > ...