Re: [net-next PATCH 1/3] octeontx2-af: debugfs: Minor changes.
From: Jakub Kicinski
Date: Mon Oct 25 2021 - 21:12:48 EST
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?
> 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.
> 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.