Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp796005rdb; Sun, 18 Feb 2024 12:10:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXc5ed+ROSe3B3Cjqxc0ugCCOG4G3eeBLd1HaTlpio+whhEoeqDD/oQ9kMhWY6KqolKy50Y+7icUmrQoQ+zZO0P3VcS29P+cCu6crQ+WA== X-Google-Smtp-Source: AGHT+IFSLeie1r1IbZ2dP9fILGsgtyEv4zLHspNN+8uG5AS3h8SPrn8AScKJ3i6aO9o6PQ9rCrM+ X-Received: by 2002:a05:622a:216:b0:42d:ae52:76a3 with SMTP id b22-20020a05622a021600b0042dae5276a3mr12482112qtx.1.1708287058316; Sun, 18 Feb 2024 12:10:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708287058; cv=pass; d=google.com; s=arc-20160816; b=uVrVgMz5hWhy9CWA4np/b5SAAPbrA9oAUBRyI8LZcBAkRCQ2Dwl/YpIyKhoea9umYp jvBa+nUGRcDGJ4d/tC7gpZDoZfZrX4GIql0G24ojNPIZ/vYcWLOUAHNYr4zmPDOsQfSN qBuFbS3N0I3g36sFTOANHOCJzjrn8SCbYPlTs43/aG2Ek70tn0O0T61SxwsiaZkMDb+0 5pntfPasDOoEE54QP5GMbE5ZYOFsTZoWPdcSC35GL3tuKEqs3f+VCGn4s+v+AMX0Yfs4 o4WH68vJZjzMqw8l1GnvrcVB/Ysf5Zizw+irdyNCDJSoqyIaewz1uaMKIeAaBFO6VXZQ jUtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cBNrlmPxjYQsSSYlAltbdkKldOD3v/VTfy5t8AAGGBI=; fh=nvZ42ehC9KLHC9eQJgk6Hcv3ZOSxL/NQPzhrSYdv35o=; b=eMB191nM6jZEBacj6u6mhzuZzF4QX3ZGX4nNijhAeUqutTP9+F8e0rRu7KmuGxHISw ioXij61OAbAvYaM6BPtB72l7eBwsBss9TvU1XfFYuNrpkoH+EWzjD7B7Jl0G5Ink7RB2 t1MYlqmy6KV4Q5LIbO126orUU92d6sRfglxfWTJuOwl6PosbPMr+L4FzGwG+XmIB+Dqw U7L3o1ztQlsQCt1J0BHYKmznQysrAyxu9ccvwHuGpoThEkbVDfL3ooaUA3KlL5c8x4F2 N4jy0ts0rwicB/RVdpL7t1cGlfBYVezu9/ogL17Z4hpiZXMK82zGNpMglkfhQghZH4kZ +YPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=xbyrq3Io; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-70567-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d12-20020a05622a05cc00b0042bf171ffe8si5524253qtb.524.2024.02.18.12.10.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 12:10:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70567-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=xbyrq3Io; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-70567-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70567-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 10F451C20E2E for ; Sun, 18 Feb 2024 20:10:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 377DA71B5F; Sun, 18 Feb 2024 20:10:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="xbyrq3Io" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C76426F50A; Sun, 18 Feb 2024 20:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708287049; cv=none; b=uc/Ne8VuAiW3TOUkrnYyGlNV7ZZKs+JFPIIPmIyZEYJ+cmA6CbscBdufUH7cBTG6rDlvowDYAQNmqfctljfON7OIAKy67T0e5kiVPhk29gHyqzUA46FZdXarSKFCLDEdyBGHd1i+YUtQhHLg36PrXXllX3enoTaJM7ojZmBMhIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708287049; c=relaxed/simple; bh=i+xWDdqTYFZ/AR5kqHImC82hQFi4jBPr+icERKIWjEY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iBnmmrz6hcnTkelkMNCyoEdiNp5y2ECjaws2JKP1bRmMVgFTvpgnTCpuEVvfQgRsTeDOTFgFQTfDSHrIP9+nzVbMYe9osduXl6+Y4GYu3uf5y61FXCyg6RC703iwio2SSoMiRYZCgAFWc7Yd/K41gpX3Rigg7BB2wi889Npamkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=xbyrq3Io; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=cBNrlmPxjYQsSSYlAltbdkKldOD3v/VTfy5t8AAGGBI=; b=xbyrq3IoXdzl0gD7S8ZtWI42Dd p/o2vtqtuCPgaugkWk0FRnimA81EuPcVN4Jwne5MU1xdbYr8IMbeAMFB7B3rqA1naDFN1kIXHDul/ Tf/QgbuDUP8qn+3nQgkais56rRwAeNVLK/Vjr0EfvgHz8YsgWd3+jmIU4e1EEq/UV3WA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rbnUd-0088nn-0A; Sun, 18 Feb 2024 21:10:31 +0100 Date: Sun, 18 Feb 2024 21:10:30 +0100 From: Andrew Lunn To: Christian Marangi Cc: "Russell King (Oracle)" , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Robert Marko , Greg Kroah-Hartman , Pieter Jansen van Vuuren , Nipun Gupta , Andy Shevchenko , Puneet Gupta , Abhijit Gangurde , Umang Jain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next RFC PATCH 1/6] net: phy: add support for defining multiple PHY IDs in PHY driver Message-ID: <829f8c7d-c09b-4264-818a-3f7b047ec44f@lunn.ch> References: <20240218190034.15447-1-ansuelsmth@gmail.com> <20240218190034.15447-2-ansuelsmth@gmail.com> <65d2613d.170a0220.2eb48.a510@mx.google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65d2613d.170a0220.2eb48.a510@mx.google.com> > > > + phy_dev_id = (struct mdio_device_id *)&phydev->dev_id; > > > > Why this cast? Try to write code that doesn't need casts. > > > > This cast is needed to keep the dev_id const in the phy_device struct so > that other are warned to not modify it and should only be handled by > phy_probe since it's the one that fills it. > > Alternative is to drop const and drop the warning. Can you propagate the const. Make phy_dev_id point to a const? Andrew