Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp385372rdb; Thu, 30 Nov 2023 07:22:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHG6jJuirHeLhzSOZK392vPElg8ANjvjM7259Sj8+Bbo9+pbTxX+UtEEkxoJ5fe3ujydsRI X-Received: by 2002:a05:6a20:54a6:b0:18c:9748:ac3c with SMTP id i38-20020a056a2054a600b0018c9748ac3cmr14115430pzk.36.1701357753197; Thu, 30 Nov 2023 07:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701357753; cv=none; d=google.com; s=arc-20160816; b=CRzGhHmrBq6rT6PIC+q10cDodsS/aAkc96x96ai67juGV8Dgg+fbhdMqqWYRl8zK1J XSEVnM132egi8LYNtiYHbUmIYxdImEGOlvz1eM0357lMdapRgfCa6HmOzMFwnU+Xr6Yx ndxYF9R73ubQXITSeHSTzobf9fbUlUSeyH3ER45ssb2XzkXaoXEYPo8Q6+82OREtiJjO hMNaSuTs2qka/LzKti4KNmQCqx9Mt80ENh+ZbHD0lDdisEMnAOaUgJau5sF5JZtkyPDC 5y6jt4H9L0kHJWnB5X0H8mHk1QwU6hgewW2RKRmXr1dOt7XwM3nXVn5x/TQyfoCqyG1w Ny/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+YOgP5+zO/Xow7+mzpfCfU7R635Z1roqLn/BuaW+ZFM=; fh=plG+UOTDgiXW4347QLSMGIFwEdGEv3gFyVPMnT9Yfog=; b=ZbGDcivAWhvN7kXgOSc3hqg0bCFQMwSoYAzyqZMNkpytAo0L+s/Mzwfx9/+sh+/HiC KitapfWgB2CCpL3unah7NnesAaTLoyKtKfc2UP7IkG7xdc2AMo5LjGZcVpRdDv3KEdh9 FCuALHLSmBSNBJE/psA8/H3hb3q41rwyy/ZlnC7lbYvccgpVsApxkkplDc4/dV7GI+sY zdwaXRAX5tUeXz7IJJxBWU64YOxs3XwsI6mwoZO31i15ur5p+0wQ+Q3eYR5xooKV29lb BQdlS/MVuVu8g5oSFJvfBVFqfvAWb5bTzw2Yd6jVpl4wPlLEVWEv/X6ozbWOy7SUBCEd xjDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Ry6PWNiB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id gx15-20020a17090b124f00b002839a51dd8dsi3586233pjb.61.2023.11.30.07.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:22:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Ry6PWNiB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B59AA807DEF6; Thu, 30 Nov 2023 07:22:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346262AbjK3PWO (ORCPT + 99 others); Thu, 30 Nov 2023 10:22:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346327AbjK3PV4 (ORCPT ); Thu, 30 Nov 2023 10:21:56 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E4C10FE; Thu, 30 Nov 2023 07:21:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=+YOgP5+zO/Xow7+mzpfCfU7R635Z1roqLn/BuaW+ZFM=; b=Ry6PWNiBej04RlW4GoLjqg0VGv F9b05uv/VWYnmPr4988jICSkzGjpk3r6dtz0/hklmtnWzcgZxrpVt3ZDLceVpKmghaI24ws16SfMj ZL1x6OHD4St5A/8hOIvcisViE0ZzVUs+cqVpkCxwOiiNm5Ip/t98zVkwi8rVKeJI2JGA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r8irO-001fzA-2N; Thu, 30 Nov 2023 16:21:50 +0100 Date: Thu, 30 Nov 2023 16:21:50 +0100 From: Andrew Lunn To: Christian Marangi Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [net-next PATCH 06/14] net: phy: at803x: move at8031 specific data out of generic at803x_priv Message-ID: <47df2f0d-3410-43c2-96d3-87af47cfdcce@lunn.ch> References: <20231129021219.20914-1-ansuelsmth@gmail.com> <20231129021219.20914-7-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129021219.20914-7-ansuelsmth@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 07:22:30 -0800 (PST) > +struct at8031_data { > + bool is_fiber; > + bool is_1000basex; > + struct regulator_dev *vddio_rdev; > + struct regulator_dev *vddh_rdev; > +}; > + > struct at803x_priv { > int flags; > u16 clk_25m_reg; > u16 clk_25m_mask; > u8 smarteee_lpi_tw_1g; > u8 smarteee_lpi_tw_100m; > - bool is_fiber; > - bool is_1000basex; > - struct regulator_dev *vddio_rdev; > - struct regulator_dev *vddh_rdev; > + > + /* Specific data for at8031 PHYs */ > + void *data; > }; I don't really like this void * Go through at803x_priv and find out what is common to them all, and keep that in one structure. Add per family private structures which include the common as a member. By having real types everywhere you get the compiler doing checks for you. As Russell pointed out, this patch series is going to be too big. So break it up. We can move fast on patches which are simple and obviously correct. Andrew