Received: by 10.223.176.5 with SMTP id f5csp1411264wra; Sun, 4 Feb 2018 03:29:52 -0800 (PST) X-Google-Smtp-Source: AH8x226T/ygrfNPAEvGLHGBT3VOhUBHPXMXLNuG8lXpvbCBSMZzHD9jGB+pE74+Zcudw5/+GXVvm X-Received: by 10.99.178.92 with SMTP id t28mr968858pgo.193.1517743792044; Sun, 04 Feb 2018 03:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517743792; cv=none; d=google.com; s=arc-20160816; b=oBatjuzKJxtjkR8u9Wom0x+RQbsjDK4zTvMNoKhQpGq9iDgKOwtd32cmhHceSsJnze A3+4KG5Nc/PHC9CWH7wJGHvNNBfzh2PslS/5RAcnMrvvOb75MvFp6q1HlAF1fBsX91AO tHLsMw7r/CfIslamweG/uYf3I6bIK2liHZ7b51GX7drw8dbfdRzsKE4I1tQ20lddmHvE /kYIK/PGJpMEkQd8Jvnl+ioQco7RDYXxv84HoPY1BG4JxK6XVx2KC3OeHyvjkkR+84UP 8nN1fsy4TGote+1/RoGCFICHmJcowgdEELKAuI9Qqg/flRwmvHTk4kkj3E0nykgumI5q iTeg== 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:arc-authentication-results; bh=suq5WbxfTYVo8pp8BO7HBLeaUKcbGfKnphTBmxzHyXs=; b=UuxTHQNdR/HvbNqtR5ym/OXwWKimAq6gtV2RUxI8tOfOBLJqEHYsUVZ++EcwChk437 k/Zbw2kiXJbOaEfKEoK70Vzmg7pQDYXr2nvNHsem0OUji67Uo9U/kebpAGP0lHRYTmrw w/DiK38Bu++lVhKKoSzgosOoyAMWfrf5jChYfDAs//ek+/yQmRkzGKYit59DWnmSl7Mu bKuO8IW/Sv1cC9934uFMmICSPb8IeeolRKy8uYRmK/+fNJwDm/aap7UVT6hcMY+Ca/Tp zrjUygkq1A0yYY9TOymrW8b7jXyYEKW9c4eRX/YwRnt8d3RopPaq6MaNWWQ1VjquiB// mpAQ== 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 i1-v6si5248280pld.42.2018.02.04.03.29.37; Sun, 04 Feb 2018 03:29:52 -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; 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 S1751768AbeBDL3L (ORCPT + 99 others); Sun, 4 Feb 2018 06:29:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44150 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeBDL3G (ORCPT ); Sun, 4 Feb 2018 06:29:06 -0500 Received: from localhost (unknown [104.153.224.167]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 53267F9A; Sun, 4 Feb 2018 11:29:04 +0000 (UTC) Date: Sun, 4 Feb 2018 11:44:42 +0100 From: "gregkh@linuxfoundation.org" To: Stanislav Nijnikov Cc: Bart Van Assche , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jaegeuk@kernel.org" , Alex Lemberg Subject: Re: [PATCH v4 02/10] ufs: sysfs: device descriptor Message-ID: <20180204104442.GA7519@kroah.com> References: <1517501746-19075-1-git-send-email-stanislav.nijnikov@wdc.com> <1517501746-19075-3-git-send-email-stanislav.nijnikov@wdc.com> <1517531145.2746.26.camel@wdc.com> <20180202071735.GC9314@kroah.com> <1517589119.2675.19.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 04, 2018 at 09:03:25AM +0000, Stanislav Nijnikov wrote: > > -----Original Message----- > > From: Bart Van Assche > > Sent: Friday, February 2, 2018 6:32 PM > > To: gregkh@linuxfoundation.org > > Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; > > jaegeuk@kernel.org; Alex Lemberg ; Stanislav > > Nijnikov > > Subject: Re: [PATCH v4 02/10] ufs: sysfs: device descriptor > > > > On Fri, 2018-02-02 at 08:17 +0100, gregkh@linuxfoundation.org wrote: > > > On Fri, Feb 02, 2018 at 12:25:46AM +0000, Bart Van Assche wrote: > > > > On Thu, 2018-02-01 at 18:15 +0200, Stanislav Nijnikov wrote: > > > > > +enum ufs_desc_param_size { > > > > > + UFS_PARAM_BYTE_SIZE = 1, > > > > > + UFS_PARAM_WORD_SIZE = 2, > > > > > + UFS_PARAM_DWORD_SIZE = 4, > > > > > + UFS_PARAM_QWORD_SIZE = 8, > > > > > +}; > > > > > > > > Please do not copy bad naming choices from the Windows kernel into > > > > the Linux kernel. Using names like WORD / DWORD / QWORD is much less > > > > readable than using the numeric constants 2, 4, 8. Hence my proposal > > > > to leave out the above enum completely. > > > > > > Are you sure those do not come from the spec itself? It's been a > > > while since I last read it, but for some reason I remember those types > > > of names being in there. But I might be confusing specs here. > > > > Hello Greg, > > > > That's a good question. However, a quick search on the Internet for the > > search phrase "Universal Flash Storage" "qword" did not yield any results > > about UFS in the first ten search hits. And I haven't found any references to > > the DWORD / QWORD terminology in the "UNIVERSAL FLASH STORAGE HOST > > CONTROLLER INTERFACE (UFSHCI), UNIFIED MEMORY EXTENSION, Version > > 1.1" document either. Maybe that means that I was looking at the wrong > > document? > > > > Thanks, > > > > Bart. > > > > > The UFS spec 2.1 specifies size as first letter in names of the descriptor parameters and attributes (e.g. bDeviceClass, wSpecVersion, dPSAMaxDataSize, qTotalRawDeviceCapacity, ...). But usage of the enum could be easily removed. It matches the naming scheme of the spec, so in my opinion, it's fine as-is. But as I'm not the author here, it's up to you what you want to use, you have to maintain this, not me :) thanks, greg k-h