Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3042574pxb; Tue, 12 Jan 2021 05:05:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMtzU59C7XzM5LwWtH8IaOJJuBYl77J94EMhnwT2MP3e1pH8dfCIXa3GY2etgqjSrDmMcV X-Received: by 2002:aa7:c78c:: with SMTP id n12mr3348231eds.363.1610456748793; Tue, 12 Jan 2021 05:05:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456748; cv=none; d=google.com; s=arc-20160816; b=Cfa3zlFICoVvXJ4NU+4FwmHs40sRZ+pxbebllQmaMnRhPQ+nF1CfHWL1CbM1eQOwmL DMfywdbskf+yYsW/7LjMeiA2uw52fvU2TZT2IxleAEasZ2F7fKIGCKwnWvLlL6V8P/RH 7XyR0bY9F/BUj+p3WiBscUfxCfoNK2+Yim+jW44jkQqWbRScrvOyNGwT8utsU8QWPtWZ I0YdAFF7cVaXe5srZdkS8bEFldUPY8+yvIEfazWYs7YQpaZJmi8r/NMiFcoyIIFBo0cG oSj4ZP6WHeKo+cmbZNIgWDVdiQgo4rtewDd0bD/dbK/TsY2MvA+PRmHcpMN5wIPQCFJ5 NfDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=XyBVeN1YOwSlJz1jsJSGouEi+rPeit7ApoOCECE5ii0=; b=bB1uoCvhpnVrGmEUGnKwjCWpXVcfoyEh409oy56eNDkQYhEF2sVOLnyggAR9OFa3Yu RUPg4tyI5pZn6Vm+Y3aKJzACr6msnrErcy1J6shYk5eNiFkhv1UfNZAt6voWlTrTQP9b VeRlqz/Esj02Ld6t0nXW1jxzHhKtyGXRlJU9WdNQ0drtP7kBqHaKhNHUG11ElHHbgDGd QtdxX+rWij6K+PTTjjO/SR/55EfnKB8Sii755Kn7Y6cn+vtgMLmrxqUQkd0PbivcJMoI GNSjcq6ePkG07YpNVt35jT9dxXbSqQDUBzV/K4w+G+KhN365+8SbZ1n7LtDJtMKUhIIE X+yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si1090494ejb.322.2021.01.12.05.05.20; Tue, 12 Jan 2021 05:05:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730254AbhALLiQ (ORCPT + 99 others); Tue, 12 Jan 2021 06:38:16 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2316 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730185AbhALLiM (ORCPT ); Tue, 12 Jan 2021 06:38:12 -0500 Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DFT2K44xSz67ZV9; Tue, 12 Jan 2021 19:32:25 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 12 Jan 2021 12:37:30 +0100 Received: from [10.210.171.61] (10.210.171.61) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 12 Jan 2021 11:37:29 +0000 Subject: Re: [PATCH v2 02/19] scsi: libsas and users: Remove notifier indirection To: "Ahmed S. Darwish" , "James E.J. Bottomley" , "Martin K. Petersen" , Jason Yan , Daniel Wagner , "Artur Paszkiewicz" , Jack Wang CC: , , LKML , Thomas Gleixner , "Sebastian A. Siewior" References: <20210112110647.627783-1-a.darwish@linutronix.de> <20210112110647.627783-3-a.darwish@linutronix.de> From: John Garry Message-ID: <21eefa9b-7ff5-b418-6db4-7e0039c24473@huawei.com> Date: Tue, 12 Jan 2021 11:36:21 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20210112110647.627783-3-a.darwish@linutronix.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.171.61] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/2021 11:06, Ahmed S. Darwish wrote: > From: John Garry > > The LLDDs report events to libsas with .notify_port_event and > .notify_phy_event callbacks. > > These callbacks are fixed and so there is no reason why we cannot call the > functions directly, so do that. > > This neatens the code slightly. > > [a.darwish@linutronix.de: Remove the now unused "sas_ha" local variables] > Signed-off-by: John Garry Don't forget your signed-off-by :) > --- > Documentation/scsi/libsas.rst | 4 +-- > drivers/scsi/aic94xx/aic94xx_scb.c | 20 ++++++------- > drivers/scsi/hisi_sas/hisi_sas_main.c | 12 +++----- > drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 +- > drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 +- > drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +- > drivers/scsi/isci/port.c | 7 ++--- > drivers/scsi/libsas/sas_event.c | 13 +++------ > drivers/scsi/libsas/sas_init.c | 6 ---- > drivers/scsi/libsas/sas_internal.h | 1 - > drivers/scsi/mvsas/mv_sas.c | 14 ++++----- > drivers/scsi/pm8001/pm8001_hwi.c | 40 ++++++++++++-------------- > drivers/scsi/pm8001/pm8001_sas.c | 7 ++--- > drivers/scsi/pm8001/pm80xx_hwi.c | 35 ++++++++++------------ > include/scsi/libsas.h | 7 ++--- > 15 files changed, 69 insertions(+), 106 deletions(-) > > diff --git a/Documentation/scsi/libsas.rst b/Documentation/scsi/libsas.rst > index f9b77c7879db..a183b1d84713 100644 > --- a/Documentation/scsi/libsas.rst > +++ b/Documentation/scsi/libsas.rst > @@ -189,8 +189,8 @@ num_phys > The event interface:: > > /* LLDD calls these to notify the class of an event. */ > - void (*notify_port_event)(struct sas_phy *, enum port_event); > - void (*notify_phy_event)(struct sas_phy *, enum phy_event); > + void sas_notify_port_event(struct sas_phy *, enum port_event); > + void sas_notify_phy_event(struct sas_phy *, enum phy_event); > > When sas_register_ha() returns, those are set and can be > called by the LLDD to notify the SAS layer of such events Maybe this was missed in the rebase, but I think that this comment can go/be changed at some stage. Thanks, John