Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1762723ybt; Mon, 15 Jun 2020 08:47:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK6zVaDsBCe0OnjJ208DXk3AsvXPUIbPQP7tNdv8nd4Qm5brbvbBQjYigIGCAXo7pO+8Q5 X-Received: by 2002:a17:906:fc13:: with SMTP id ov19mr25707985ejb.212.1592236054224; Mon, 15 Jun 2020 08:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592236054; cv=none; d=google.com; s=arc-20160816; b=iziN8v7nuI5G+Jfdx29zhKw72CV2iq88w/ERDzLa7H0qiRPdKD7MsK1v9mySRW6B8U 3fVtHf1wxYR/Ey+j548QI9VHfCSVAucXbL59RB1QGM2ZWf65WKec82Nwm77XWz65IWlN Qw3vAmu2YR93Dkv2wI+c3xqFTNnDW5J/3SB26W7utjKvirniEODJqG+P+YGjDPgP3IQe sQn9sokgljIqTFgGclDm7X4UOupKAGsOXvyBluyemwDkoyDQLPQfqAVYFA7wkdlSGMZO hDpVSzeiWHH8cy1egHrMhmQLfPAK2cWZf9drIFw6ED84foS7fy4/5ZpfqVQ4Kj4H1Zfj j2ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=86HLybzeUVmINuihaiU9AhHg7+hXdXyGk/f7f9+1hjg=; b=E2N0O6MlUBsg4QbCPQwSaqrn7NW3NBg+RGE8RnSqI6CTF+9eZgBmEL97roU1bkhgJa CdpkyU3fogHvZGMqL7uRLkvC9en3iwnBprzfnLu08iFXFp/s+NnYqh4VKo5K9CtHgSuB k/lOdAUvjR0RKGLhM6fA+dslb1JQX7R5VoWnZxuz0hPzO7XIv9ow2wyT8nozII1EX1f6 HjZQPKUjSW+SrCkBHgwZFtmjFfp84UvSSSLvX5r3spt3anqCZQHlSVFEs358bzT75gF+ 8T3h5EyMkicDECjp+JK3ye2v6uAbHSpgpSbBN9duvXDS4sTb9VjU9OgIP2N52RJeNuk9 /nEA== 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 b17si9185722eds.13.2020.06.15.08.47.11; Mon, 15 Jun 2020 08:47:34 -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 S1730538AbgFOPnJ (ORCPT + 99 others); Mon, 15 Jun 2020 11:43:09 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:59226 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727785AbgFOPnJ (ORCPT ); Mon, 15 Jun 2020 11:43:09 -0400 X-IronPort-AV: E=Sophos;i="5.73,515,1583190000"; d="scan'208";a="351660878" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2020 17:43:06 +0200 Date: Mon, 15 Jun 2020 17:43:06 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Denis Efremov , Coccinelle , Gilles Muller , Masahiro Yamada , Michal Marek , Nicolas Palix , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coccinelle: api: add device_attr_show script In-Reply-To: <1f028ee6-b014-c240-21d8-0c1950334fe6@web.de> Message-ID: References: <1f028ee6-b014-c240-21d8-0c1950334fe6@web.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-34029661-1592235787=:23306" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-34029661-1592235787=:23306 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Mon, 15 Jun 2020, Markus Elfring wrote: > > +// Confidence: High > > Would you like to add any suggestion for a possible patch message? > > > … > > +virtual report > > +virtual org > > +virtual context > > +virtual patch > > +virtual report, org, context, patch > > Is such a SmPL code variant more succinct? This doens't matter. > > > … > > +ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) > > +{ > > + <... > > +* return snprintf@p(...); > > + ...> > > +} > > I suggest to reconsider the selection of the SmPL nest construct. > https://github.com/coccinelle/coccinelle/blob/e06b9156dfa02a28cf3cbf0913a10513f3d163ab/docs/manual/cocci_syntax.tex#L783 > > Can the construct “<+... … ...+>” become relevant here? <... ...> is fine if the only thing that will be used afterwards is what is inside the <... ...> julia > > > Would you like to consider any further software design consequences > around the safe application of the asterisk functionality in rules > for the semantic patch language? > > Regards, > Markus > --8323329-34029661-1592235787=:23306--