Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp795850ybi; Wed, 19 Jun 2019 08:02:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuIkiynKtmDQS28UUZyDE6Y1oUbGABJ36sb06+XKsgmNIhcN7rNr/c8HHekGBmDV9KRD2t X-Received: by 2002:aa7:9f1c:: with SMTP id g28mr102308835pfr.81.1560956555707; Wed, 19 Jun 2019 08:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560956555; cv=none; d=google.com; s=arc-20160816; b=mNBFHmt0XRDBYcHGidsS7hz5eDy35iJLqQJ/PNXkiNObe+pkD1/Hg5ULE5r2D1K3Wy w6TngkTvx2zZs0nrJfLXwJc3BY34W8681xqCA2Ht/a8L/Kv15ElfB50gdFRAuabeytjE cx18kpD30CVNbZBdDlEUXHg0HLG7nG13PpchUNnIo4CGtK72Waxu6YONBeeh9/ahNNxY mchXrKw7Z9VBi54JUaI8I9Bqn7dky2yTN+DNQPsvkvf/aoz1XkuVB/hGDKrl5e352XLu Y6w22c4L2WM4b9xbDIncRz+SVtSIvFGJMWb+WQCxNGkYRCa8AmzuN9AgH0+XoBPoyWJ1 LhwA== 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:dkim-signature; bh=IoNirHOjx8WjhuT2O5pgaWIbzqCgx9A+RHIyLGyGbb0=; b=lwvbc9gAeV9NBrRHUlg+bBrFSD5lSe1QtwvToqjwHOmUsmbTCZLncba6jHFedTyPZu /t5+C0qJsLV3+VHtDheKA/1EhutEcKNfXVFfzzjJald5iPIb2a0B3mer+3BLueM3Bpbs AB1vvrRAiiDFcbrto9xxmRBKrci2/Tz7oppqi3VeRAgtZT/esuOa4MKlME6kobBmt+jK +FAdB7n9FlHHhOBCRMU6D42PhE4WWcbMIPoyMgZwRZWfKUUvfls6jMySXvpTryDuUGfb cYBuw/y2uXK/6j7CW70XUcV5CmfK4HWVZMp2PPMdJ9I8eqJl1TLsZgovTu39KVvh/KQC +V7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MliQoUrK; 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 d2si3251938pgc.75.2019.06.19.08.02.15; Wed, 19 Jun 2019 08:02:35 -0700 (PDT) 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=pass header.i=@kernel.org header.s=default header.b=MliQoUrK; 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 S1727002AbfFSPCL (ORCPT + 99 others); Wed, 19 Jun 2019 11:02:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbfFSPCL (ORCPT ); Wed, 19 Jun 2019 11:02:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A3F412183F; Wed, 19 Jun 2019 15:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560956530; bh=yfxdDVL/L5lNeV3SeQ7WR171eTNKD9P+ikTOSH+xc1s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MliQoUrKGz0uikxExyDjZMWCoS7+rjh9EwaO98Jwv+ImdfIwscw8hUsGkEDL4Gx4P tYIASjvTrcgRzT9GASiutDMJwIaViXugwlbugykfuW/FNAvla3cgErYjQXEWbZBlui Xp3gbNjrxIJtraqotk+fvCHVExeUK/bZvZLfPUxY= Date: Wed, 19 Jun 2019 17:02:07 +0200 From: Greg Kroah-Hartman To: Mauro Carvalho Chehab Cc: Johan Hovold , Linux Doc Mailing List , Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Stefan Achatz Subject: Re: [PATCH 04/14] ABI: better identificate tables Message-ID: <20190619150207.GA19346@kroah.com> References: <6bc45c0d5d464d25d4d16eceac48a2f407166944.1560477540.git.mchehab+samsung@kernel.org> <20190619125135.GG25248@localhost> <20190619105633.7f7315a5@coco.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190619105633.7f7315a5@coco.lan> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 10:56:33AM -0300, Mauro Carvalho Chehab wrote: > Hi Johan, > > Em Wed, 19 Jun 2019 14:51:35 +0200 > Johan Hovold escreveu: > > > On Thu, Jun 13, 2019 at 11:04:10PM -0300, Mauro Carvalho Chehab wrote: > > > From: Mauro Carvalho Chehab > > > > > > When parsing via script, it is important to know if the script > > > should consider a description as a literal block that should > > > be displayed as-is, or if the description can be considered > > > as a normal text. > > > > > > Change descriptions to ensure that the preceding line of a table > > > ends with a colon. That makes easy to identify the need of a > > > literal block. > > > > In the cover letter you say that the first four patches of this series, > > including this one, "fix some ABI descriptions that are violating the > > syntax described at Documentation/ABI/README". This seems a bit harsh, > > given that it's you that is now *introducing* a new syntax requirement > > to assist your script. > > Yeah, what's there at the cover letter doesn't apply to this specific > patch. The thing is that I wrote this series a lot of time ago (2016/17). > > I revived those per a request at KS ML, as we still need to expose the > ABI content on some book that will be used by userspace people. > > So, I just rebased it on the top of curent Kernel, add a cover letter > with the things I remembered and re-sent. > > In the specific case of this patch, the ":" there actually makes sense > for someone that it is reading it as a text file, and it is an easy > hack to make it parse better. > > > Specifically, this new requirement isn't documented anywhere AFAICT, so > > how will anyone adding new ABI descriptions learn about it? > > Yeah, either that or provide an alternative to "Description" tag, to be > used with more complex ABI descriptions. > > One of the things that occurred to me, back on 2017, is that we should > have a way to to specify that an specific ABI description would have > a rich format. Something like: > > What: /sys/bus/usb/devices/-:./::./pyra/roccatpyra/actual_cpi > Date: August 2010 > Contact: Stefan Achatz > RST-Description: > It is possible to switch the cpi setting of the mouse with the > press of a button. > When read, this file returns the raw number of the actual cpi > setting reported by the mouse. This number has to be further > processed to receive the real dpi value: > > ===== ===== > VALUE DPI > ===== ===== > 1 400 > 2 800 > 4 1600 > ===== ===== > > With that, the script will know that the description contents will be using > the ReST markup, and parse it accordingly. Right now, what it does, instead, > is to place the description on a code-block, e. g. it will produce this > output for the description: > > :: > > It is possible to switch the cpi setting of the mouse with the > press of a button. > When read, this file returns the raw number of the actual cpi > setting reported by the mouse. This number has to be further > processed to receive the real dpi value: > > VALUE DPI > 1 400 > 2 800 > 4 1600 > > > Greg, > > what do you think? I don't know when "Description" and "RST-Description" would be used. Why not just parse "Description" like rst text and if things are "messy" we fix them up as found, like you did with the ":" here? It doesn't have to be complex, we can always fix them up after-the-fact if new stuff gets added that doesn't quite parse properly. Just like we do for most kernel-doc formatting :) thanks, greg k-h