Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1049689ybc; Tue, 19 Nov 2019 13:38:29 -0800 (PST) X-Google-Smtp-Source: APXvYqz30fYdxjq98btodOo+J1Cq3nIBgYuFaNKYXlsRz5IA7LK1levd7OQC8hsc0LBGGYQfgM81 X-Received: by 2002:a05:600c:2143:: with SMTP id v3mr8368024wml.3.1574199509275; Tue, 19 Nov 2019 13:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574199509; cv=none; d=google.com; s=arc-20160816; b=JwUJhRyTmtaHTWiid/SmFQSHYDhzyTNZ3A9ofzJfG5QqMG+NEvUou/ZyoKUbuTmnnG seGzGUSjNiLg8cNhiRNl+Q243HlelrA0XSbhtXolbtWLmeKsfhXoJYp4MnaZVryHLlCD zDs8mNEVv+SiN33E0mebcK5M+M6wUBkEKXQsi+JgsZY7lAvYo9/PRxXN70Hx7NdRNyAz gPIulU24CKnQbGRINAAQPsB/E3SnDHbgjj2wCUjBgGvJ5pMb4YgdXn1fxyv23yTzodrU VEvGh/T4UMyBerj5d0VfvWv3Q7npQM7euZxj47c8uHZBJD94Yr2YyZruaOMhvskl2WRA QTjA== 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=fN2att3rSSISqL3uj9apKZH409I6YSdxSRqAFqESgyE=; b=DvOPsaXoYUSIcOYBKq2T+AZW/MsghnfA81mKCqdq/mzuAZ/Poy/xcEs3kSmTS+yXNw dzopT1sFZ3wqQlCWoEjZ1AyGJlmgvY33ubOgQ4xkDgl6fs7wFJa75Fr/4Pf7yPpqzHBV uVLMnNKWFegpWTe+zHaXk14qOVkOqlsLSZ6BlUDh4JVaIQiJ+SBS//X9qxrmfdoO9yCt Ifa/uoyHKIJ+O2JjHsm0by4h6YIedUyAUw/0qkA8TuArt2PL98OEsCZhhB38ha4jpXik hgNTIs8EDWYqdFuPSwwnj7wf6KQSICsn0r5YdAftTVKbWxiBf4RPJnKDGAfGxoChdlRa v3PQ== 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 v26si17631852edd.364.2019.11.19.13.38.05; Tue, 19 Nov 2019 13:38:29 -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 S1727233AbfKSVgy (ORCPT + 99 others); Tue, 19 Nov 2019 16:36:54 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:60288 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727038AbfKSVgy (ORCPT ); Tue, 19 Nov 2019 16:36:54 -0500 X-IronPort-AV: E=Sophos;i="5.69,219,1571695200"; d="scan'208";a="327306099" Received: from abo-228-123-68.mrs.modulonet.fr (HELO hadrien) ([85.68.123.228]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 22:36:52 +0100 Date: Tue, 19 Nov 2019 22:36:51 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Julia Lawall , cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Gilles Muller , Masahiro Yamada , Michal Marek , Nicolas Palix Subject: Re: [PATCH 2/4] coccinelle: platform_get_irq: handle 2-statement branches In-Reply-To: Message-ID: References: <1574184500-29870-3-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-319011006-1574199412=:2592" 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-319011006-1574199412=:2592 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Tue, 19 Nov 2019, Markus Elfring wrote: > > From: Masahiro Yamada > > I wonder about this information. > Would you like to use the tag “Suggested-by” instead? Sorry, I seem to have done something quite wrong on this patch. I will fix it. > > > … > > +++ b/scripts/coccinelle/api/platform_get_irq.cocci > > @@ -31,6 +31,25 @@ if ( \( ret < 0 \| ret <= 0 \) ) > … > > +ret = > > +( > > +platform_get_irq > > +| > > +platform_get_irq_byname > > +)(E, ...); > > + > > +if ( \( ret < 0 \| ret <= 0 \) ) > > +-{ > > +-dev_err(...); > > +S > > +-} > > How do you think about to use the following SmPL code variant? And the benefit is what? julia > + ret = > +(platform_get_irq > +|platform_get_irq_byname > +)(E, ...); > + > + if ( \( ret < 0 \| ret <= 0 \) ) > +-{ > +-dev_err(...); > + S > +-} > > Regards, > Markus > --8323329-319011006-1574199412=:2592--