Re: [PATCH net-next v3 4/5] net: stmmac: add support for RZ/N1 GMAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Apr 2024, Serge Semin wrote:

> On Thu, Apr 18, 2024 at 01:57:47PM +0200, Romain Gantois wrote:
> > Hi Serge,
> > 
> > On Tue, 16 Apr 2024, Serge Semin wrote:
> > 
> > > > +static int rzn1_dwmac_pcs_init(struct stmmac_priv *priv,
> > > 
> > > > +			       struct mac_device_info *hw)
> > > 
> > > AFAICS hw is unused, and the mac_device_info instance is reached via
> > > the priv pointer. What about dropping the unused argument then?
> > 
> 
> > Unfortunately, this is an implementation of the pcs_init() callback, which is 
> > also used by socfpga (see patch 4/6 in this series). The socfpga implementations 
> > use the hw parameter for both pcs_init() and pcs_exit() so I can't remove it.
> 
> I had that patch content in mind when was writing my comment. There is
> no point in passing the hw-pointer there either because you already
> have the stmmac_priv pointer. There is stmmac_priv::hw field which you
> can use instead in the same way as you do in this patch. Here is the
> respective change for your SoCFPGA patch:
> 

You're right, I'll remove the parameter.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux