Re: [PATCH v4 3/5] net: rnpgbe: Add basic mbx ops support

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

 



On Fri, Aug 15, 2025 at 10:43:02AM +0800, Yibo Dong wrote:
> On Fri, Aug 15, 2025 at 04:13:52AM +0200, Andrew Lunn wrote:
> > > +const struct mucse_mbx_operations mucse_mbx_ops_generic = {
> > > +	.init_params = mucse_init_mbx_params_pf,
> > > +	.read = mucse_read_mbx_pf,
> > > +	.write = mucse_write_mbx_pf,
> > > +	.read_posted = mucse_read_posted_mbx,
> > > +	.write_posted = mucse_write_posted_mbx,
> > > +	.check_for_msg = mucse_check_for_msg_pf,
> > > +	.check_for_ack = mucse_check_for_ack_pf,
> > > +	.configure = mucse_mbx_configure_pf,
> > > +};
> > 
> > As far as i can see, this is the only instance of
> > mucse_mbx_operations. Will there be other instances of this structure?
> > 
> > 	Andrew
> > 
> 
> Yes, It is the only instance. Not other instances at all.
> Is there any improvement?

So throw away the abstraction and call the functions directly. Only
add abstractions if you have some differences to abstract over. Only
make the driver more complex and harder to understand, if you need to
make the driver more complex and harder to understand.... KISS.

	Andrew




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux