Received: by 10.223.176.5 with SMTP id f5csp1483520wra; Sun, 4 Feb 2018 05:10:55 -0800 (PST) X-Google-Smtp-Source: AH8x226jHSdeyhALlD2Lld6AlQh9e/br6Donp241AijY/lcbarPtXZ2RVSVuYQRgmzKfLX0lXGcY X-Received: by 2002:a17:902:328:: with SMTP id 37-v6mr34763828pld.398.1517749855263; Sun, 04 Feb 2018 05:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517749854; cv=none; d=google.com; s=arc-20160816; b=UKiTBoR8ArEqs2sSSk/3lOsu86RGWFGiB9zyBqODjAVtpMtr5NNvov7J/rpe83zAAF 7aucp3L3By2mIeumPhkuz2QZmfF6235sOkwxySmTi6xPDri2zXOnD8KCyQz2RXMQaXrm h38sc0EKfMKxORg13zZff+Ak0gF3O8bTy2UZT281C8g7RIig0eXgWUPUg8kPj5HL+nAK KSJzZPls+t9/ABuFaW1KVo18mZ31ls9B4sgH0+VK2JCNO/QKjqu8NwLKASmApnzQZGW0 RYaWx3tg+LsJe7YR021YiFLixNxNWEVNi8xOpDo8ibnFTRbZAQfLjCcMrW1aKXiE2of8 c4Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:wdcipoutbound :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature:arc-authentication-results; bh=Wfofd0tfaahTb59tSKDqhneSbQoq+Q34qqq9Xcb3u0U=; b=IwuQhmMvpitX9j9BabWuLBVeA1z7EBuCVllzCYA0D2vMOXCpVnJJrwxsra4mf/tgGp blJb6bTXVeJI14OsZ2tcnj/vTSev438YaoBoV1xcLY3ZpymTlCzM30eSGUoQG5bDNfH4 X2uLRp2ROaF0xd2qV46vPO+8g0+hxTHPUT9K0a/FebnijEcuPEfxzaEMbjJF0p3sEbyO avGRJimoWjy5dUKurMmeOK+EA2Uq0UOrVrUMe/qy87mVUR8SYy6nciZlmv30zdJIK97+ 6AkWB9bHYPG56K3u/yRfoiOz7aSe7OQAXLdB2RULlVBnSEzqALs0MO6HlNZYiFRdgJz3 Rw2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=F1r2KXnK; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=KkL4H4dr; 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 i127si2590881pgc.565.2018.02.04.05.10.40; Sun, 04 Feb 2018 05:10:54 -0800 (PST) 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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=F1r2KXnK; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=KkL4H4dr; 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 S1752027AbeBDNJ0 (ORCPT + 99 others); Sun, 4 Feb 2018 08:09:26 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:39710 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeBDNJN (ORCPT ); Sun, 4 Feb 2018 08:09:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1517749755; x=1549285755; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=b4K3l3tvWbUlExO5f18jKGnRzTtX8zxAvcUEvtzgQo8=; b=F1r2KXnK4xxZQMD4oifvZItv/CUQsKvqZsMmQc6340dnL+rjnEDZzWJN hbR1ieAMZF0StB2OTY1I7XWtiPrJu4FuL2AHDNTQsLW8FQsvPeohYf4LF VTFYnHiUQoTGGz/6NbQiZi5wk+OvrL0kQbA56k2/JcZBSrN7j1Uy/aHc9 ZzutGU6nffUaUkC1rkISm3nwIdi9mJ79jeCmmkHbmCuvtWYmrWxOwDCqe 04QkTB61lYxF6g0RCbVB/UAXhQiUTrTWyCH+nnz8utZyrAPHWsfaQwN1C ZYvMe8wi2Un/L9M2qsa2qdpc1Qz4DYCtB/lmFUZfg+T5U1/vkRUPNJnS/ g==; X-IronPort-AV: E=Sophos;i="5.46,458,1511798400"; d="scan'208";a="70645010" Received: from mail-cys01nam02lp0053.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.53]) by ob1.hgst.iphmx.com with ESMTP; 04 Feb 2018 21:09:14 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Wfofd0tfaahTb59tSKDqhneSbQoq+Q34qqq9Xcb3u0U=; b=KkL4H4drKkYNzjxGirIBDiEdPbSJ6Vsm0srxvRY72/H0o5imR9SzIyp0+yaBWfGUKPacvOh7bgQ9+BNa8YUnkIdEGDEFPaAcX5/SPLtdUg4aQjlBoDYat6LyUxOM+rhB/9z6AGp9ece+GLqDxjEj3X1o7qEdfGhdP4JHwjGscMI= Received: from DM2PR0401MB0975.namprd04.prod.outlook.com (10.160.98.140) by DM2PR0401MB1391.namprd04.prod.outlook.com (10.160.221.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Sun, 4 Feb 2018 13:09:09 +0000 Received: from DM2PR0401MB0975.namprd04.prod.outlook.com ([fe80::bc62:c854:7dfd:7eb]) by DM2PR0401MB0975.namprd04.prod.outlook.com ([fe80::bc62:c854:7dfd:7eb%15]) with mapi id 15.20.0464.015; Sun, 4 Feb 2018 13:09:09 +0000 From: Stanislav Nijnikov To: Greg KH CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jaegeuk@kernel.org" , Alex Lemberg Subject: RE: [PATCH v4 01/10] ufs: sysfs: attribute group for existing sysfs entries. Thread-Topic: [PATCH v4 01/10] ufs: sysfs: attribute group for existing sysfs entries. Thread-Index: AQHTm3fxo1n5KlULckmz1QORVYth36OPxRSAgARmIJCAAAalgIAABxiA Date: Sun, 4 Feb 2018 13:09:09 +0000 Message-ID: References: <1517501746-19075-1-git-send-email-stanislav.nijnikov@wdc.com> <1517501746-19075-2-git-send-email-stanislav.nijnikov@wdc.com> <20180201165923.GA12838@kroah.com> <20180204123343.GA940@kroah.com> In-Reply-To: <20180204123343.GA940@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Stanislav.Nijnikov@wdc.com; x-originating-ip: [212.25.79.133] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR0401MB1391;7:sDFp3EGzKPIPsx7+AvrwwlSMLbYpvB5TXxoh+c1E7/UUBnAgdRAr5M6idaC+jFEVaKn6xT5kPJgSPR7p1RFvpvrlKXmE/JC3wB3T8V6buv9J8i9OiWyJQd9Ll4IarolFYEMXWWG32SOcbVCA+i8p0RHFp+IB45dsMOpy79sqJDqo2zFle9u+GgYY3KmXN88w3sLE873qQ6ZGs2xxDp0EhXBUIgRaA6Q1uNiXt2HXF7ZqNBNEJ+avqDl+N70OCgrl;20:VKP2DCZo3O8muncUhVqgahUCkdenZ7T3S4XSYzQmXaGwe1pp5vv8P/Dr8xvkx3AbJkPZ2+aIajtHJUXwQCiQKK3R27WRFZE8NSnKs2tAwS0yfZIZvSso6y9GGjMSbkvmWlR0ExaKLRG/Rzner4L6tqEl4HB35LBF805VZ9+r4Ys= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 95c33611-3d75-45ce-b67b-08d56bd07ab7 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:DM2PR0401MB1391; x-ms-traffictypediagnostic: DM2PR0401MB1391: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:DM2PR0401MB1391;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0401MB1391; x-forefront-prvs: 05739BA1B5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(376002)(346002)(39860400002)(39380400002)(396003)(13464003)(199004)(189003)(99286004)(5660300001)(59450400001)(2900100001)(6436002)(55016002)(9686003)(53546011)(97736004)(53936002)(26005)(8936002)(2906002)(66066001)(8676002)(81166006)(81156014)(3660700001)(3280700002)(316002)(102836004)(6916009)(72206003)(2950100002)(54906003)(6506007)(14454004)(68736007)(76176011)(7696005)(478600001)(105586002)(106356001)(229853002)(186003)(93886005)(86362001)(3846002)(6116002)(5250100002)(4326008)(6246003)(74316002)(305945005)(25786009)(33656002)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0401MB1391;H:DM2PR0401MB0975.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-microsoft-antispam-message-info: d/WV7oeR3YofJjjFK6cGUnk+7H7Ao+nlas04uwfPdRaJqj4cpvftOcW+rSJFy0IWoPH72XgIP2Gu4+s/3fsxPA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95c33611-3d75-45ce-b67b-08d56bd07ab7 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2018 13:09:09.5272 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0401MB1391 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Sunday, February 4, 2018 2:34 PM > To: Stanislav Nijnikov > Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; > jaegeuk@kernel.org; Alex Lemberg > Subject: Re: [PATCH v4 01/10] ufs: sysfs: attribute group for existing sy= sfs > entries. >=20 > On Sun, Feb 04, 2018 at 12:29:06PM +0000, Stanislav Nijnikov wrote: > > > > + curr_len +=3D snprintf((buf + curr_len), (PAGE_SIZE - curr_len), > > > > + "\nAll available Runtime PM levels info:\n"); > > > > + for (lvl =3D UFS_PM_LVL_0; lvl < UFS_PM_LVL_MAX; lvl++) > > > > + curr_len +=3D snprintf((buf + curr_len), (PAGE_SIZE - curr_len), > > > > + "\tRuntime PM level [%d] =3D> dev_state > > > [%s] link_state [%s]\n", > > > > + lvl, > > > > + ufschd_ufs_dev_pwr_mode_to_string( > > > > + ufs_pm_lvl_states[lvl].dev_state), > > > > + ufschd_uic_link_state_to_string( > > > > + ufs_pm_lvl_states[lvl].link_state)); > > > > + > > > > > > sysfs if "one value per file", not "random text that someone has to > > > parse per file" please. > > > > > > Huge hint, if you ever care about checking the size of the sysfs > > > buffer you are writing into, you are doing something really really wr= ong. > > > > > Hi Greg > > It's the existing code, added by: > > commit 09690d5a6ae1b7e4cb5ac429c311b99d09352c12 > > Author: subhashj@codeaurora.org > > Date: Thu Dec 22 18:41:00 2016 -0800 > > > > scsi: ufs: provide sysfs attribute to select the PM level > > > > This patch provides the sysfs attribute to choose the power managem= ent > > level for UFS runtime and system suspend. > > > > Reviewed-by: Sujit Reddy Thumma > > Signed-off-by: Subhash Jadavani > > Signed-off-by: Martin K. Petersen > > > > I just moved it to an another file and changed the sysfs entries > > creation by Jaegeuk Kim' request. At the moment the entry shows the PM > > level, the device state, the link state and all possible PM levels. Do = you > want me to change it? >=20 > Ah, you are just moving this code around. Ok, that's fine for this patch= , but > please fix it up as part of this patch series because this isn't an accep= table > sysfs file at all. If it were documented that would be a lot more obviou= s as to > just how wrong it was :( >=20 > And, as it wasn't documented, you can change it as it's obvious no one us= ed it > :) >=20 > thanks, >=20 > greg k-h =20 Can I fix these entries not in this patchset? As long as I know they are us= ed and I would prefer that change of the existing sysfs entries behavior be related = to a separate patch. Regards. Stanislav.