From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.134.164.83 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796053763; b=vd3xNGBQ+sQV108W24VoKKss/XVl8+9sg9CKExJi9UKJdq9vMBHoYqTqR1EKgmZDuiAC w2LEIhE1dWt5dG+TCLFLxpsBtsKTQG+dmzEEj6R+gKaRpGXPU46x/rNR1M7o6fmBOY3lr OSSkTk1GK0PEhUCKdBKtWePitzFxQ8yNADAHTwsxy4vrPuscVIFNszcrNSH0bIlVFL620 d8yorWNs8CydwjWyQkIve3H/coQV9RoN0ibceuNRK8ES7JpjXKNpvLm4CwAzRT+o3dkEc zRPnQte9dY2hinffGKlYPFagTsDyPA9i2F9/W4HkR0DBci+qQ7f0BjSOlJlM+Cma2xA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796053763; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID: References:MIME-Version:Content-Type; bh=3lb1YB4yfL/gQ6FrocA0kRZzNqTdwipzBAosweXtTjk=; b=zOpGk2DRV1TbB1BgxfvxpJ01XPYhuuvq+VeYEX5HDRye7c0JMzyKItxE2BHfkcHwp7jJ h1rGf1xcJGVi/TO4WvbfnDjr6izZAQuPSVVkF325FGAGkp+jJZucT1cvM4oFymiGG7/jn TfB4xPaNV89LY/fV/2ZfbqS+DCbrc4dv8DMi1EfBFBd1Nsg8wweJ0k2R+uYxOJvbfYwin OMeYzfxuzCskz2izQ8WcLxQ0EnShmugEWnefoUEHUgo0jqHjnYwhr6hhV3GfTcxBEUxlq EHATXVf18V1f3CTlMVMZ4LdC/1wLxdUG6iaqzrUjyxJoUslCnjIxkeKQlc70m5nnppg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=RdCZv5Uo; arc=none smtp.remote-ip=192.134.164.83 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 106C8606A31C; Mon, 30 Nov 2026 15:49:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 106C8606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=RdCZv5Uo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=3lb1YB4yfL/gQ6FrocA0kRZzNqTdwipzBAosweXtTjk=; b=RdCZv5Uo3Pxa57ir2JNIwKNnFT2DRaq3b3bHnUpy8ZOkp5gc1qVbrWFw 4GX9DW713I7sdboDdHd5IHJCto8J8Ec5AiaTNck7j06ZuJMA1xVxxSAB0 pQ1K0g6EvMkcM/kDKzKxDY87aulozNYKwfWYIOTKieVIvx033aDGKh4oF o=; X-CSE-ConnectionGUID: n3TFoYppTWe2g5RWzbDicg== X-CSE-MsgGUID: 59CdAU36TYOAQKFXPEyjCg== Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.27,243,1787004000"; d="scan'208";a="308095447" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:49:14 +0100 Date: Mon, 30 Nov 2026 16:49:14 +0100 (CET) From: Julia Lawall To: Markus Elfring cc: cocci@inria.fr, tools@kernel.org, kernel-janitors@vger.kernel.org, LKML Subject: Re: [cocci] [RFC] Detecting unchecked return values (with SmPL)? In-Reply-To: <992efd40-4f9f-48e3-83e8-ebff61c4f295@web.de> Message-ID: <2143c92c-6cd4-223-dea4-b8f4e6fa97b9@inria.fr> References: <214cdbae-b798-4ea4-8c1e-9eabdfd1663a@web.de> <3241c2f-7d9-f7e-d2f5-1e7980340c4@inria.fr> <992efd40-4f9f-48e3-83e8-ebff61c4f295@web.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Mon, 30 Nov 2026, Markus Elfring wrote: > >> Macro and function calls for which a return value is not assigned to a variable > >> can be found also by a script (like the following) for the semantic patch language. > >> > >> @display@ > >> identifier i; > >> statement s; > >> @@ > >> ( > >> *i(...); > >> &s > > &s seems totally unnecessary. > > Would you find the following SmPL script variant more appropriate for > efficient source code searches? > > > @display2@ > expression e; > identifier i; > @@ > (e = i(...) > | > *i(...) > ); > > > Would you be looking for more advanced data constraints here? *i(...); seemed completely fine. There is no need to consider the other contexts in which a funcion call can occur. julia > > Regards, > Markus >