lkml.org 
[lkml]   [2024]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next v17 02/13] rtase: Implement the .ndo_open function
Date
> On Thu, May 02, 2024 at 05:18:36PM +0800, Justin Lai wrote:
> > Implement the .ndo_open function to set default hardware settings and
> > initialize the descriptor ring and interrupts. Among them, when
> > requesting irq, because the first group of interrupts needs to process
> > more events, the overall structure will be different from other groups
> > of interrupts, so it needs to be processed separately.
> >
> > Signed-off-by: Justin Lai <justinlai0215@realtek.com>
>
> Hi Justin,
>
> some minor feedback from my side.
>
> > +static int rtase_open(struct net_device *dev) {
> > + struct rtase_private *tp = netdev_priv(dev);
> > + struct rtase_int_vector *ivec = &tp->int_vector[0];
> > + const struct pci_dev *pdev = tp->pdev;
> > + u16 i, j;
> > + int ret;
>
> nit: please use reverse xmas tree order - longest line to shortest -
> for local variable declarations in new Networking code.
>
Hi Simon,
This is partly because ivec needs to use tp for initialization,
so tp is placed in front of ivec, causing this situation.

\
 
 \ /
  Last update: 2024-05-03 12:20    [W:0.353 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site