From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8489C433F4 for ; Thu, 20 Sep 2018 06:34:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B3832083A for ; Thu, 20 Sep 2018 06:34:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B3832083A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731762AbeITMQA (ORCPT ); Thu, 20 Sep 2018 08:16:00 -0400 Received: from verein.lst.de ([213.95.11.211]:57827 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731240AbeITMQA (ORCPT ); Thu, 20 Sep 2018 08:16:00 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id EF12668D62; Thu, 20 Sep 2018 08:34:09 +0200 (CEST) Date: Thu, 20 Sep 2018 08:34:09 +0200 From: Christoph Hellwig To: Jason Yan Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, john.garry@huawei.com, zhaohongjiang@huawei.com, hare@suse.com, dan.j.williams@intel.com, jthumshirn@suse.de, hch@lst.de, huangdaode@hisilicon.com, chenxiang66@hisilicon.com, miaoxie@huawei.com, Ewan Milne , Tomas Henzl Subject: Re: [PATCH v2 2/5] scsi: libsas: check the lldd callback correctly Message-ID: <20180920063409.GE12913@lst.de> References: <20180919033204.11102-1-yanaijie@huawei.com> <20180919033204.11102-3-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180919033204.11102-3-yanaijie@huawei.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 19, 2018 at 11:32:01AM +0800, Jason Yan wrote: > We are using lldd_port_deformed so we'd better check if lldd_port_deformed > is NULL. > > After this, we can remove hisi_sas_port_deformed() because it is just a > stub to avoid a NULL dereference caused by the wrong check. > The wording seems a bit odd. I'd do something like: libsas: make the lldd_port_deformed method optional ... and remove the dummy implementation in hisi_sas. Otherwise looks good: Reviewed-by: Christoph Hellwig