Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1621257imm; Wed, 19 Sep 2018 23:34:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ9otDDEaKLH1Wpj6jxRs51vNFdxbkYr2ksMxryZe53bOsn9bGQD9Oq4/xzdvD51cvMaTpi X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr37598488pll.93.1537425275128; Wed, 19 Sep 2018 23:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537425275; cv=none; d=google.com; s=arc-20160816; b=W67DdXdvC6rezwHNjwqnX57uVDWPFSVIq5dLDR34nL4UuPc7L6G2nRv213Qd6Yx8Lx 2t2q95Kir1GHPTpAqdtbmVcvwdNR6u23wlKInAkm4HOAi3eMNj7kHK0P3fM2uAyxrik/ gtDXnPjp8T1tAU9gTzlSq19+4COl0kbcPZ5dE8eBT6sJUxmNFVTJbbCIypyjkfED5KrB me6h7JJR/U9+9M0utEO7PlfuBpiNPwN1Ua8AZY6wUSjeiiw1zACXXXmmk6MlgyJOkI0o rWD78l+MDFejSRhCRGQbpJm3qWP2VSIfJNv/IP+pIZnuIvEalxM8/8l5onWIrpMEKPsX KLHw== 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=f9IDgbc/yzCnEQQMOdVvm6JdQKngmYuq5qJaowx4yqY=; b=HtEIaeZBgVlZGsxrgbACNMTNYy/g+UBfEiDKwPxthnkzFV/C4vv1lE3S6eFX6GjU1Z RysmXawwnRfkZkWrXM6iNX7aGqAldckoA9zbM3/EEd63KZXzGZ0ACu3SpgdSvDzu503d qRkILAynenUw72EZd5hMWRkhkA4DX22Wd+4Z6G+xJijLf93p5i2e5uhZIAlSlL1hERAD cIrsvjRUP9PcivBNS89jwaOYkiZxl71vIuWuGni2KWY3tjqy9Cp4tMJMjMKvbPMXfU4V UTObvpAID5B1mlX70p/GiL7YGBLEVGx3Cke90n5+5EJDA4iOxngFNfZNBl1Ah6CqFw/1 bd4g== 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 u38-v6si382693pgn.106.2018.09.19.23.34.20; Wed, 19 Sep 2018 23:34:35 -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 S1731603AbeITMQA (ORCPT + 99 others); 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