Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2527313ybk; Tue, 12 May 2020 01:27:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7QMWrKgqwJTvyT/Rap5m3Z4Yaatx81ocSC6Jxs4IrJnULwRvbNeG9BSKGIZJQYBhJTyfR X-Received: by 2002:a05:6402:c8f:: with SMTP id cm15mr291100edb.117.1589272030868; Tue, 12 May 2020 01:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589272030; cv=none; d=google.com; s=arc-20160816; b=PIVdT3158Urr7yZg3ihqS9aEpv3UhOsv6cgA2ZCOVBSKqJzcoQxgfFYc9a5vOwhrcp GSTdrnwBSKK9f9oV/dTf8S4ry9/LGtjQXcGgjYZwTzPexR3R33dBPdgS7KeRFsEFkgLu keS2nWT1oGrAbkwVq4j1kTwcM8irK5MVnuXRMnoFHgmzbvplHJdiBTqPHOc/u8o+Osfy DwmCPrJhTt7wgNnS0UMuI2b0k5rwEpH/wjXyLm2EvMEGij9BKrmMyCanUivf9qb0qxHr PnYNcTvxw0tKmt5uqXY57TP5mXjPOI2wKaGtAarnmKwNpk5s4tDS+ZnVIW5hzmX95f1a CfGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CTttybfnJPiB6UEvX0k7dnxvvR4pxDRinojEnRWChEM=; b=pXPz6gJFYFCsoheB/hv+4Cpwd3IE1/8voFLrRGHSRRbk7ZTKiMkJpac8iT2Asc7swf 4LaYmoZl/4qDoEXuUc3MW5B5TK8wzkTWXBDkrwHQaOqAEF2u90JVm2VKyWniB/ngQAjg 2c6o03dVkzooz3zLIkU5XXF+rZxDw9MxY9G8Y1HsJzJGo6isG6q9xC8AI6Ltr9Z1DSsL OOlcinP/TcNTLtC16qDHAS8QWnn8yd7WUowHVVKSBit8VWpoDT8GZf2KH+TUBaCjf7Bx OrNjMDCGk7EFY0FwU/FF8oJ8NEJZFoZpWJL/6RE3CWA3d+ybRMDCqHwhAAPSFKWWDwJM SPMg== 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 f25si7598335edw.292.2020.05.12.01.26.48; Tue, 12 May 2020 01:27:10 -0700 (PDT) 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 S1729179AbgELIYo (ORCPT + 99 others); Tue, 12 May 2020 04:24:44 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2191 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725987AbgELIYo (ORCPT ); Tue, 12 May 2020 04:24:44 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 010C748A63C88A72CE11; Tue, 12 May 2020 09:24:43 +0100 (IST) Received: from [127.0.0.1] (10.210.169.134) 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.1913.5; Tue, 12 May 2020 09:24:42 +0100 Subject: Re: [PATCH] scsi: hisi_sas: display correct proc_name in sysfs To: Jason Yan , , , , CC: Xiang Chen References: <20200512063318.13825-1-yanaijie@huawei.com> From: John Garry Message-ID: <66c3318d-e8fa-9ff4-c7f4-ebe23925b807@huawei.com> Date: Tue, 12 May 2020 09:23:51 +0100 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: <20200512063318.13825-1-yanaijie@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.169.134] X-ClientProxiedBy: lhreml733-chm.china.huawei.com (10.201.108.84) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2020 07:33, Jason Yan wrote: > The 'proc_name' entry in sysfs for hisi_sas is 'null' now becuase it is > not initialized in scsi_host_template. It looks like: > > [root@localhost ~]# cat /sys/class/scsi_host/host2/proc_name > (null) > hmmm.. it would be good to tell us what this buys us, apart from the proc_name file. I mean, if we had the sht show_info method implemented, then it could be useful (which is even marked as obsolete now). Thanks, John > While the other driver's entry looks like: > > linux-vnMQMU:~ # cat /sys/class/scsi_host/host0/proc_name > megaraid_sas > > Cc: John Garry > Cc: Xiang Chen > Signed-off-by: Jason Yan > --- > drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 1 + > drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 + > drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > index fa25766502a2..c205bff20943 100644 > --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c > @@ -1757,6 +1757,7 @@ static struct device_attribute *host_attrs_v1_hw[] = { > > static struct scsi_host_template sht_v1_hw = { > .name = DRV_NAME, > + .proc_name = DRV_NAME, > .module = THIS_MODULE, > .queuecommand = sas_queuecommand, > .target_alloc = sas_target_alloc, > diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c > index e05faf315dcd..c725cffe141e 100644 > --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c > +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c > @@ -3533,6 +3533,7 @@ static struct device_attribute *host_attrs_v2_hw[] = { > > static struct scsi_host_template sht_v2_hw = { > .name = DRV_NAME, > + .proc_name = DRV_NAME, > .module = THIS_MODULE, > .queuecommand = sas_queuecommand, > .target_alloc = sas_target_alloc, > diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c > index 374885aa8d77..59b1421607dd 100644 > --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c > +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c > @@ -3071,6 +3071,7 @@ static int debugfs_set_bist_v3_hw(struct hisi_hba *hisi_hba, bool enable) > > static struct scsi_host_template sht_v3_hw = { > .name = DRV_NAME, > + .proc_name = DRV_NAME, > .module = THIS_MODULE, > .queuecommand = sas_queuecommand, > .target_alloc = sas_target_alloc, >