From: Greg KH <gregkh@linuxfoundation.org>
To: zhong jiang <zhongjiang@huawei.com>
Cc: andrew.donnellan@au1.ibm.com, fbarrat@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] misc: cxl: delete possible null pointer dereference
Date: Wed, 3 Oct 2018 21:38:12 -0700 [thread overview]
Message-ID: <20181004043812.GA8134@kroah.com> (raw)
In-Reply-To: <1538621808-28080-1-git-send-email-zhongjiang@huawei.com>
On Thu, Oct 04, 2018 at 10:56:48AM +0800, zhong jiang wrote:
> It is safe to dereference an object below a NULL test. For the sake
> of debugging. Just delete the call of possible null pointer dereference.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/misc/cxl/guest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 3bc0c15..472e8db 100644
> --- a/drivers/misc/cxl/guest.c
> +++ b/drivers/misc/cxl/guest.c
> @@ -1018,7 +1018,7 @@ 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);
> + pr_devel("in %s\n", __func__);
This call should just be deleted, it's not needed, ftrace can be used
instead.
thanks,
greg k-h
next prev parent reply other threads:[~2018-10-04 4:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 2:56 [PATCHv2] misc: cxl: delete possible null pointer dereference zhong jiang
2018-10-04 4:38 ` Greg KH [this message]
2018-10-04 4:58 ` 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=20181004043812.GA8134@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andrew.donnellan@au1.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.