Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp937109pxb; Mon, 25 Oct 2021 22:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywOlfDHP1jzA/cMz2QYi3ZDS7rQ3vWhbAC17qvYvHn0WFFgDqkGzSkAAxkJ60H2owuDxvv X-Received: by 2002:a17:90b:4f46:: with SMTP id pj6mr26156499pjb.63.1635227909054; Mon, 25 Oct 2021 22:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635227909; cv=none; d=google.com; s=arc-20160816; b=OSB1plrOVOtcGUbYVSCOT9Ho9ZkivCuuP2t3uitQLC6YRZHIRseiCxA44nfbpY9lh6 cYIQvIHR8nEEVzshYf794YzMHDZd4UcM2wIVf8QQ5S+vkjGt26gIbA28n03/kITtNTQL Ws5GLG+8XlKZguS7xxvG28VFvfPUOgXQe0xoLx89ZLwWPX3J71rNoyCDVK7xaH5ZqTjP RIXkW2K3YB2hoI5cmobQixiXwxV98/Jh3KnJZh8WHvfEDdAuBaBw6aiuVOmKvC5Dnyh8 7Dt+k3P7E8SZlAuOdBAdkAD2MUZti+LfwtRmoYuBBFMvGoXt6rxpzrBQCGUwSgEBZc5s OmsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qJnUWF/xzfvpFY5q9WnMDeMBk7DEykL61iIF8xSeT0w=; b=nmMVh5CNBM/kiMqPqBi7WEEJRn3+MPUwpfWqekVs3Ruh1f4lg1g/QXCKROtUJxlS4a o0UaxwAgXxHiXD5H2YrUTWJqSonFe/RkQ78hbV6Y6ZghP4BW9yupVAcWDQoGZPhUWBMV 3Bru3Tm6YkOOQEXspgnItOBFedI602ihJh+k9VtOmaM//WALBQosiAO4L2E0kXN++whj nYQBOAGakcMS9QRwCRlQMBwaRYlmKguvXHnsl/BxpjmIXPn1j11hVg/IUnfmvfXHjWC+ KB0AUs4G6V8scV+eTKwWTa7rGigdIjOQjl9NcygF96QHMjCoYP42ed/mS9JtvLgfKphV BVLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FAEZjsh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si12126935pfv.324.2021.10.25.22.58.15; Mon, 25 Oct 2021 22:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FAEZjsh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234900AbhJZBPJ (ORCPT + 99 others); Mon, 25 Oct 2021 21:15:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:45780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233612AbhJZBPI (ORCPT ); Mon, 25 Oct 2021 21:15:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 076CD60E74; Tue, 26 Oct 2021 01:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635210765; bh=R1Cb80uSt4Bhak4u71eS+sP7GToGR8SToOhjkAzRg5c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FAEZjsh8TgFiDgg6k41qSmt8mQfIkief5AgZpWdO688RM3wRNXLchDpsC7iqcWAhH MVUU6En74G2GU+JNw1uO/7LinvDwEi2rK7kTnrUz+oyV1FpWdmCgBbHFDESDqfv7NB as2Dvu0XMTU09anX8tcbaga+Dmut20g2s6+JAwocygFEifm9kcgLXsgv/ekAtxVRPr K4nPVEvdhPUQoWwFbJTiiPF4yGysVd4+d0et+Dhg3aOcUeYhY/kijUcr4t8Z1w+nIA PFyObw4OxHggsGR6T/+9K6YAGmFE3WQgvLzV4ijH5dAgVDHkXRi7ugdzVHZ9pKjdu8 lxjLzepfGdGGQ== Date: Mon, 25 Oct 2021 18:12:44 -0700 From: Jakub Kicinski To: Rakesh Babu Cc: , , , , , , Subject: Re: [net-next PATCH 1/3] octeontx2-af: debugfs: Minor changes. Message-ID: <20211025181244.13acd58b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20211025191442.10084-2-rsaladi2@marvell.com> References: <20211025191442.10084-1-rsaladi2@marvell.com> <20211025191442.10084-2-rsaladi2@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.