[<prev] [next>] [day] [month] [year] [list]
Message-ID: <b0782290-02d6-7f97-0ed3-c5e2a2c70450@csgroup.eu>
Date: Thu, 5 Aug 2021 07:09:36 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Geoff Levand <geoff@...radead.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v4 08/10] net/ps3_gelic: Rename no to descr_count
Le 23/07/2021 à 22:31, Geoff Levand a écrit :
> In an effort to make the PS3 gelic driver easier to maintain, rename
> the gelic_card_init_chain parameter 'no' to 'descr_count'.
>
> Signed-off-by: Geoff Levand <geoff@...radead.org>
CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#40: FILE: drivers/net/ethernet/toshiba/ps3_gelic_net.c:344:
+ memset(descr, 0, sizeof(*descr) *descr_count);
^
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
Commit fdbd3f08a0b1 ("net/ps3_gelic: Rename no to descr_count") has style problems, please review.
> ---
> drivers/net/ethernet/toshiba/ps3_gelic_net.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
> index e55aa9fecfeb..60fcca5d20dd 100644
> --- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c
> +++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
> @@ -325,7 +325,7 @@ static void gelic_card_free_chain(struct gelic_card *card,
> * @card: card structure
> * @chain: address of chain
> * @start_descr: address of descriptor array
> - * @no: number of descriptors
> + * @descr_count: number of descriptors
> *
> * we manage a circular list that mirrors the hardware structure,
> * except that the hardware uses bus addresses.
> @@ -334,16 +334,16 @@ static void gelic_card_free_chain(struct gelic_card *card,
> */
> static int gelic_card_init_chain(struct gelic_card *card,
> struct gelic_descr_chain *chain, struct gelic_descr *start_descr,
> - int no)
> + int descr_count)
> {
> int i;
> struct gelic_descr *descr;
> struct device *dev = ctodev(card);
>
> descr = start_descr;
> - memset(descr, 0, sizeof(*descr) * no);
> + memset(descr, 0, sizeof(*descr) *descr_count);
>
> - for (i = 0; i < no; i++, descr++) {
> + for (i = 0; i < descr_count; i++, descr++) {
> descr->link.size = sizeof(struct gelic_hw_regs);
> gelic_descr_set_status(descr, GELIC_DESCR_DMA_NOT_IN_USE);
> descr->link.cpu_addr =
> @@ -361,7 +361,7 @@ static int gelic_card_init_chain(struct gelic_card *card,
> start_descr->prev = (descr - 1);
>
> descr = start_descr;
> - for (i = 0; i < no; i++, descr++) {
> + for (i = 0; i < descr_count; i++, descr++) {
> descr->hw_regs.next_descr_addr =
> cpu_to_be32(descr->next->link.cpu_addr);
> }
>
Powered by blists - more mailing lists