RE: [EXT] Re: [net-next PATCH 1/3] octeontx2-af: debugfs: Minor changes.
From: Rakesh Babu Saladi
Date: Tue Oct 26 2021 - 05:44:46 EST
Hi Jakub,
Please see inline.
Thanks,
Rakesh.
-----Original Message-----
From: Jakub Kicinski <kuba@xxxxxxxxxx>
Sent: Tuesday, October 26, 2021 6:43 AM
To: Rakesh Babu Saladi <rsaladi2@xxxxxxxxxxx>
Cc: davem@xxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>; Geethasowjanya Akula <gakula@xxxxxxxxxxx>; Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx>; Hariprasad Kelam <hkelam@xxxxxxxxxxx>
Subject: [EXT] Re: [net-next PATCH 1/3] octeontx2-af: debugfs: Minor changes.
External Email
----------------------------------------------------------------------
On Tue, 26 Oct 2021 00:44:40 +0530 Rakesh Babu wrote:
> cmd_buf = memdup_user(buffer, count + 1);
> - if (IS_ERR(cmd_buf))
> + if (IS_ERR_OR_NULL(cmd_buf))
> return -ENOMEM;
memdup_user() returns NULL now?
Rakesh > I checked now. It is not returning NULL. I'll revert this change.
> cmd_buf[count] = '\0';
> @@ -504,7 +504,7 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,
> if (cmd_buf)
> ret = -EINVAL;
>
> - if (!strncmp(subtoken, "help", 4) || ret < 0) {
> + if (ret < 0 || !strncmp(subtoken, "help", 4)) {
The commit message does not mention this change.
Rakesh >> ACK. Will address this in v2.
> dev_info(rvu->dev, "Use echo <%s-lf > qsize\n", blk_string);
> goto qsize_write_done;
> }
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index 7761dcf17b91..d8b1948aaa0a 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -2583,6 +2583,9 @@ static void nix_free_tx_vtag_entries(struct rvu *rvu, u16 pcifunc)
> return;
>
> nix_hw = get_nix_hw(rvu->hw, blkaddr);
> + if (!nix_hw)
> + return;
This does not fall under "remove unwanted characters, indenting the code" either.
Rakesh >> ACK. I'll address this in v2.