Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2581303ybk; Tue, 12 May 2020 03:03:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIhP8ZLJZ0ydRCxTb/QgXvKzu/kSD+zpeU75MCz/EC070CdY01xBG1cuOVb0uluYTQDN9gn X-Received: by 2002:a50:c60c:: with SMTP id k12mr16734944edg.111.1589277826202; Tue, 12 May 2020 03:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589277826; cv=none; d=google.com; s=arc-20160816; b=pZVzJaXQLE6C8Ru6lwbrhQ0c0YTBUEHo8jPaME8RA1WVfoKkC04iUVoGsxKDBDKinZ CzZpAuKKPaxt7INmgKCVE7uiw8VhBMNuXGR+BIkPYmm25SIDvGOevfz9056jmSgVHNaS qqyDwmKtWVT1YR5CAkdsEsm9HW2e/1wv50PhWblwHTevylpknUbvsmhYbZOPZyABD/sC IfUtNIIt3lhUwiBvfNYVvQndF90dhQ4pAc1823SLfwpWdyNXydPyzKdILka+FQFZvQro Ku7OM30sibQT8PR+8inoKvLvx5ArgJaDNOkQLNcRICikoujFEx9TJhMOdDicp4eBRyKl P6Ww== 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=OBAAeWYqLoW8A+FeHDejmlPmuRS+jOu8iF1yDPr2bLE=; b=LfEfMqUDmUV7By4ruFg7Y1qsaEcakp3NOp8WBFRdjS9LDFczNtiudpcB024bZMgC3x cIPtncYdhJ2C0hdK1+hl+vIg0LkaLwSq+c+tGWTbp/yQCQUnxdkzJ3Q7uhiZ2E3Pf0Wz RcS3vqZsVybtzq3+66eYb7Oqj9uEJe9YcngYTNdlIZaU1TcIsfVPq84WAA/Mac4MvoQu Irymzan+4UVeipzmZES9kWykIzJfMQyizQvjMvVLlQ1EY+md42auE1vJUrpZg1GJyGYN 6MclFSzPeSHcNK2OEYAUb1A/D4qFOnDdsgomDDUV9VOOReajU8dpRPCNp2z0bbj9NSk9 lqLg== 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 d8si7522010edq.328.2020.05.12.03.03.23; Tue, 12 May 2020 03:03:46 -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 S1729334AbgELKBr (ORCPT + 99 others); Tue, 12 May 2020 06:01:47 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2192 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725889AbgELKBr (ORCPT ); Tue, 12 May 2020 06:01:47 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 7C7D7900A0AC61A3F0CA; Tue, 12 May 2020 11:01:45 +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 11:01:44 +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> <66c3318d-e8fa-9ff4-c7f4-ebe23925b807@huawei.com> From: John Garry Message-ID: <920c5d36-5637-1fba-034b-8ea3d41c131c@huawei.com> Date: Tue, 12 May 2020 11:00:53 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 10:35, Jason Yan wrote: > > > 在 2020/5/12 16:23, John Garry 写道: >> 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. >> > > When there is more than one storage cards(or controllers) in the system, > I'm tring to find out which host is belong to which card. And then I > found this in scsi_host in sysfs but the output is '(null)' which is odd. "dmesg | grep host" would give this info, like: root@(none)$ dmesg | grep host0 [ 8.877245] scsi host0: hisi_sas_v2_hw > >> I mean, if we had the sht show_info method implemented, then it could >> be useful (which is even marked as obsolete now). >> > > I found this is interesting while in the sysfs filesystem we have a > procfs stuff in it. It's only the name of the procfs entry, if it exists. And, since .show_info is obsolete, I don't see why .proc_name is not also obsolete. > I was planned to rename this entry to 'name' and use > the struct member 'name' directly in struct scsi_host_template. But this > may break userspace applications. > Thanks, John