From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752281AbeCVFT4 (ORCPT ); Thu, 22 Mar 2018 01:19:56 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:51979 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbeCVFTx (ORCPT ); Thu, 22 Mar 2018 01:19:53 -0400 Subject: Re: [PATCH v10] mmc: Export host capabilities to debugfs. To: Ulf Hansson CC: Andy Shevchenko , Linus Walleij , Adrian Hunter , Shawn Lin , , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Vladimir Zapolskiy References: <1520917812-20047-1-git-send-email-harish_kandiga@mentor.com> <1521109575.10722.654.camel@linux.intel.com> From: Harish Jenny K N Message-ID: <3fcd7a2a-19a3-859c-0b24-8ac07bfaa1e2@mentor.com> Date: Thu, 22 Mar 2018 10:49:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [137.202.0.87] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 16 March 2018 01:27 PM, Ulf Hansson wrote: > On 16 March 2018 at 05:20, Harish Jenny K N wrote: >> >> On Thursday 15 March 2018 05:59 PM, Ulf Hansson wrote: >>> On 15 March 2018 at 11:26, Andy Shevchenko >>> wrote: >>>> On Thu, 2018-03-15 at 11:12 +0100, Ulf Hansson wrote: >>>>> On 13 March 2018 at 06:10, Harish Jenny K N >>>>> wrote: >>>>>> >>>>> Honestly, I don't like this, but maybe other people do, then I am fine >>>>> with this approach. >>>>> >>>>> If were to decide, I would just rather print the caps field in a >>>>> hexadecimal bit form and leave the translation to the user. >>>> A compromise would be to print both: >>>> >>>> 0xHHHHHHHH\n >>>> Description of each enabled field, one per line >>>> >>>> >>>> Another format would be: >>>> >>>> Bit XX: Description of a field >>> If we were to print the description, there is no point in printing the >>> bits in hex. Or is it? >> Yes. I also do not see the use of printing hex value if we are printing the description. >> >>> As I said, if you and other folkz thinks this is valuable, then I am >>> fine as well. Just saying, it's not my preferred option. >>> >>> >> >> I just want to inform that the idea of printing the description came after discussion in https://www.spinics.net/lists/linux-mmc/msg48246.html, where it was decided adding utility in mmc-utils was not going to work ( reason: We may very well be changing the bit offsets for the caps and caps2 in the mmc kernel header, keeping a copy of them is not a good idea. It's just a matter of *when* it will break). > I recall. However, I didn't realize all these strings were going to be > needed. :-) > >> On Thu, 2018-03-15 at 11:12 +0100, Ulf Hansson wrote: >>> If were to decide, I would just rather print the caps field in a hexadecimal bit form and leave the translation to the user. >> I think translation becomes difficult for the above reason and hence I would prefer printing the description. > Okay. > >> Note: Printing values in Hex was the original idea and it is also available in https://www.spinics.net/lists/linux-mmc/msg48213.html just in case if it is required. > Yeah, so maybe I should apply that one, then we can take it from there!? Fine with both the approach. Please consider this. Thanks, Harish Jenny K N