[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR11MB1253B09441D400910C611807F2610@CY4PR11MB1253.namprd11.prod.outlook.com>
Date: Tue, 14 Jul 2020 14:36:32 +0000
From: "Ooi, Joyce" <joyce.ooi@...el.com>
To: David Miller <davem@...emloft.net>
CC: "thor.thayer@...ux.intel.com" <thor.thayer@...ux.intel.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dalon.westergreen@...ux.intel.com"
<dalon.westergreen@...ux.intel.com>,
"Tan, Ley Foon" <ley.foon.tan@...el.com>,
"See, Chin Liang" <chin.liang.see@...el.com>,
"Nguyen, Dinh" <dinh.nguyen@...el.com>,
"Westergreen, Dalon" <dalon.westergreen@...el.com>
Subject: RE: [PATCH v4 09/10] net: eth: altera: add msgdma prefetcher
> -----Original Message-----
> From: David Miller <davem@...emloft.net>
> Sent: Thursday, July 9, 2020 1:34 AM
> To: Ooi, Joyce <joyce.ooi@...el.com>
> Cc: thor.thayer@...ux.intel.com; kuba@...nel.org; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; dalon.westergreen@...ux.intel.com; Tan, Ley
> Foon <ley.foon.tan@...el.com>; See, Chin Liang <chin.liang.see@...el.com>;
> Nguyen, Dinh <dinh.nguyen@...el.com>; Westergreen, Dalon
> <dalon.westergreen@...el.com>
> Subject: Re: [PATCH v4 09/10] net: eth: altera: add msgdma prefetcher
>
> From: "Ooi, Joyce" <joyce.ooi@...el.com>
> Date: Wed, 8 Jul 2020 15:24:00 +0800
>
> > +int msgdma_pref_initialize(struct altera_tse_private *priv) {
> > + int i;
> > + struct msgdma_pref_extended_desc *rx_descs;
> > + struct msgdma_pref_extended_desc *tx_descs;
> > + dma_addr_t rx_descsphys;
> > + dma_addr_t tx_descsphys;
>
> Reverse christmas tree please.
>
> > +netdev_tx_t msgdma_pref_tx_buffer(struct altera_tse_private *priv,
> > + struct tse_buffer *buffer)
> > +{
> > + u32 desc_entry = priv->tx_prod % (priv->tx_ring_size * 2);
> > + struct msgdma_pref_extended_desc *tx_descs = priv->pref_txdesc;
>
> Likewise.
>
> > +u32 msgdma_pref_tx_completions(struct altera_tse_private *priv) {
> > + u32 control;
> > + u32 ready = 0;
> > + u32 cons = priv->tx_cons;
> > + u32 desc_ringsize = priv->tx_ring_size * 2;
> > + u32 ringsize = priv->tx_ring_size;
> > + u64 ns = 0;
> > + struct msgdma_pref_extended_desc *cur;
> > + struct tse_buffer *tx_buff;
> > + struct skb_shared_hwtstamps shhwtstamp;
> > + int i;
>
> Likewise.
>
> > +u32 msgdma_pref_rx_status(struct altera_tse_private *priv) {
> > + u32 rxstatus = 0;
> > + u32 pktlength;
> > + u32 pktstatus;
> > + u64 ns = 0;
> > + u32 entry = priv->rx_cons % priv->rx_ring_size;
> > + u32 desc_entry = priv->rx_prod % (priv->rx_ring_size * 2);
> > + struct msgdma_pref_extended_desc *rx_descs = priv->pref_rxdesc;
> > + struct skb_shared_hwtstamps *shhwtstamp = NULL;
> > + struct tse_buffer *rx_buff = priv->rx_ring;
>
> Likewise.
>
> > + } else if (priv->dmaops &&
> > + priv->dmaops->altera_dtype ==
> > + ALTERA_DTYPE_MSGDMA_PREF) {
>
> This is not properly formatted.
>
> On a multi-line conditional, every subsequent line after the first should align
> with the first column after the openning parenthesis of the first line.
Noted, will make the changes.
Powered by blists - more mailing lists