From nobody Fri Jun 19 09:48:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84EAAC43217 for ; Tue, 5 Apr 2022 23:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578718AbiDEXYm (ORCPT ); Tue, 5 Apr 2022 19:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389627AbiDENeE (ORCPT ); Tue, 5 Apr 2022 09:34:04 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34E15137022 for ; Tue, 5 Apr 2022 05:39:47 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 235CdbGR027079; Tue, 5 Apr 2022 07:39:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1649162377; bh=/OV5EIXkyfTUEfMK+NbO/uRsTKu3O0KPAyqpHSHxqVY=; h=From:To:CC:Subject:Date; b=rBhAQvK+jG6gu6yh+a7D4lygUBpzbeisNCiBjy3MNPUnwXIrHof24o1aJMlicO6tc P58OgNH+HBMBItFGCTa1Mo1RTPG/vdjiUMWMY0sNLaFoWxatW0qG7oxjQkmOJHPtzB 8DSsfUVYO1E4JjPYVAV2pwlcCnQ3Wj/Yx0n0cHPQ= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 235CdbAo035535 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Apr 2022 07:39:37 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 5 Apr 2022 07:39:37 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 5 Apr 2022 07:39:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 235CdbEr112656; Tue, 5 Apr 2022 07:39:37 -0500 From: Nishanth Menon To: Nicolas Palix , Julia Lawall CC: , , Kirill Smelkov , Nishanth Menon Subject: [PATCH V2] coccinelle: api/stream_open: Introduce metavariables for checks Date: Tue, 5 Apr 2022 07:39:36 -0500 Message-ID: <20220405123936.30259-1-nm@ti.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Coccinelle spatch version 1.1.1 reports the following: warning: line 134: should no_llseek be a metavariable? warning: line 141: should noop_llseek be a metavariable? warning: line 223: should nonseekable_open be a metavariable? warning: line 290: should nonseekable_open be a metavariable? warning: line 338: should nonseekable_open be a metavariable? So, introduce these as symbols to be specific C identifier to match. Signed-off-by: Nishanth Menon --- based on: next-20220404 Changes since V1: * Switch from identifier to more specific symbol V1: https://lore.kernel.org/all/20220404215926.14811-1-nm@ti.com/ scripts/coccinelle/api/stream_open.cocci | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/coccinelle/api/stream_open.cocci b/scripts/coccinelle/= api/stream_open.cocci index df00d6619b06..d33732f35710 100644 --- a/scripts/coccinelle/api/stream_open.cocci +++ b/scripts/coccinelle/api/stream_open.cocci @@ -129,6 +129,7 @@ identifier llseek_f; =20 @ has_no_llseek @ identifier fops0.fops; +symbol no_llseek; @@ struct file_operations fops =3D { .llseek =3D no_llseek, @@ -136,6 +137,7 @@ identifier fops0.fops; =20 @ has_noop_llseek @ identifier fops0.fops; +symbol noop_llseek; @@ struct file_operations fops =3D { .llseek =3D noop_llseek, @@ -216,6 +218,7 @@ identifier stream_writer.writestream; =20 @ report_rw depends on report @ identifier fops_rw.openfunc; +symbol nonseekable_open; position p1; @@ openfunc(...) { @@ -283,6 +286,7 @@ identifier stream_reader.readstream; =20 @ report_r depends on report @ identifier fops_r.openfunc; +symbol nonseekable_open; position p1; @@ openfunc(...) { @@ -331,6 +335,7 @@ identifier stream_writer.writestream; =20 @ report_w depends on report @ identifier fops_w.openfunc; +symbol nonseekable_open; position p1; @@ openfunc(...) { --=20 2.31.1