Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp508444imm; Wed, 3 Oct 2018 21:39:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV63T3VdPhwWH6iD9VS27ICstg7DJeYYMb94vr/z418BYKeN67zs4Q0rgbWoeuZU9y8QtVy1B X-Received: by 2002:a62:f58a:: with SMTP id b10-v6mr4882238pfm.253.1538627960522; Wed, 03 Oct 2018 21:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538627960; cv=none; d=google.com; s=arc-20160816; b=mEZvCpmBGsSvTAm6WgXNdt3ZvGThePTEDNjXNTU+ABdGagVxpNHRQbmKqH9s6GNIg/ +Y5uroO0H444AJLahoWzuomPkqbXWHs7OrgTEldLmjz0Mf0sJwIqwsvS1kGokZjjy5Qf Emyvs0wvmzHBWTdu78NnYHW6qhWPzWxHpf1Zw8cYgIiZQniPYt8UJAzmSaE7xeMpBM5o el1gkfXM8dW543XVZbHDJKP2hM1rI5QxuIBuS//VomOE/GQQyCQKKlb5ACJgJcEIOqWw Yya7deSndLGm/k7g3KL/jKryMUAg96FMR1IfpJWbuJwoG6sDTJdsuvG8dPbFySdHcAie wF1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=l21ff0Ngne+uPgntrId8YKqf7W0fZeZIJztoW+vAfGo=; b=uWZLKGQ8o4sbyrLYX84+dPZfNhPWKLD25eCsltOzFh4QKfrP7lgU3eFpm7W4kJpfHi GJP504Mw9xeBlajFyrdJHSJ5/eneVwtlfA08jAKBhZF3KAtfFTMGs5psSkgmB9OWpo9D d5FSMPtYoilgtE/cJoyiC/+tz5SvCPw8mWxW92guJFJDETuvp06tNqPTi7df6K6OikSw 4c8GHmlfxNJMIOQ+jqj7evTpUTwfmw67xLgeUbPDkJ/qmoEFJAyh9Rk/5w3ADY+STPRd e5/QfFlDdOpoWVOCzMGvv4fsTNKJXOf/AHnshgPYEocgP7jvUsa9pmu8nHpq/36w2qYR X0cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16-v6si3126732pgh.41.2018.10.03.21.39.05; Wed, 03 Oct 2018 21:39:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727283AbeJDL3g (ORCPT + 99 others); Thu, 4 Oct 2018 07:29:36 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44152 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbeJDL3g (ORCPT ); Thu, 4 Oct 2018 07:29:36 -0400 Received: from localhost (unknown [209.136.236.94]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EBCE5305; Thu, 4 Oct 2018 04:38:13 +0000 (UTC) Date: Wed, 3 Oct 2018 21:38:12 -0700 From: Greg KH To: zhong jiang 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 Message-ID: <20181004043812.GA8134@kroah.com> References: <1538621808-28080-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538621808-28080-1-git-send-email-zhongjiang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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