public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: zhong jiang <zhongjiang@huawei.com>
Cc: fbarrat@linux.vnet.ibm.com, andrew.donnellan@au1.ibm.com,
	arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: cxl: Move a deference below a NULL test
Date: Tue, 2 Oct 2018 15:55:58 -0700	[thread overview]
Message-ID: <20181002225558.GA27362@kroah.com> (raw)
In-Reply-To: <1537962072-13732-1-git-send-email-zhongjiang@huawei.com>

On Wed, Sep 26, 2018 at 07:41:12PM +0800, zhong jiang wrote:
> It is safe to move a deference below a NULL test.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---
>  drivers/misc/cxl/guest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 3bc0c15..559e835 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -1018,11 +1018,11 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
>  
>  void cxl_guest_remove_afu(struct cxl_afu *afu)
>  {
> -	pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
> -
>  	if (!afu)
>  		return;
>  
> +	pr_devel("in %s - AFU(%d)\n", __func__, afu->slice);
> +

This call should just be deleted, ftrace can be used if this type of
thing is really needed.

thanks,

greg k-h

  parent reply	other threads:[~2018-10-02 22:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 11:41 [PATCH] misc: cxl: Move a deference below a NULL test zhong jiang
2018-09-26 23:46 ` Andrew Donnellan
2018-10-02 22:55 ` Greg KH [this message]
2018-10-04  2:45   ` zhong jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181002225558.GA27362@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=arnd@arndb.de \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhongjiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox