Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp432365imj; Sat, 16 Feb 2019 03:43:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IbAyk7PUctct+b3k0LS5NkejRt6D7osP/7zvpWL/a9sfykzU3pS1XZjQmkwy5cEHAEpNBar X-Received: by 2002:a63:d104:: with SMTP id k4mr9569808pgg.227.1550317399519; Sat, 16 Feb 2019 03:43:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550317399; cv=none; d=google.com; s=arc-20160816; b=uTORASQwXipYY6W82JBwo8ItTtx4wiI+PMRn92K2oHRMHUv6GcAdOcb4fDq/Rgbgjc Tygyc177fKuLMVslo+KOMwQAI1jB0DN+fFYkq1Wn4CTzMXw1gIghTEVSImLwfW9P5ubw JJr9+RNdDDEpPwH0sd2vLyXdwPhUmTQkX32AP6wckNTHUEn3zrMyvvJx/V9j/Rze0K1A r6ydGu/Te1d2yRapYgdHy/2Y7EMl6iyYQ0R8QmleTSyzbwWXkn6hCH7+NJlrXBZe0bmD RqWiWC2D5+LDzIY0eRtugTsL2S33m+uuJ7wXkls3hFIXU35CRoUFxh59B94PXQIVZUPl 3rHA== 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=/UMfxUEh6rM86LUvxKe8va7tKqQn+pmUwOkkXeBBoJg=; b=cDOwEEL373KVzITuFjO2R7sRNhkF3Coh8YwlXtYSz1OWGmeycrZtpRrFrX9FbW4E5D NhKgMuMgS5O0XAAPNXClQ5M4zKe8i8wGFLFmL6OduNmn9fiscnINHHFo62QH+Ewm6LJ4 XUYeltrLR2W3o8ub9PYrHOJorGkrxD5Ccoi1XUYqhlElxTt6ZNOHhJOYKWIDcvVMjmhc /42owydmv4PKgsb8vFs9htiDU2OPz5zx4HiXtotR/dt+XqO1hl14cFf3wRL6hHK+RPxl Vb35QbXxuLWR7qWz0/ABRyrJj3Mi9jfHA0N3I5RF1nsegBl6MG8EB88PO5KgHRbHp6dw N2yw== 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 q6si7793433pgq.442.2019.02.16.03.43.03; Sat, 16 Feb 2019 03:43:19 -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 S1730552AbfBPIc2 (ORCPT + 99 others); Sat, 16 Feb 2019 03:32:28 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:41909 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730494AbfBPIc1 (ORCPT ); Sat, 16 Feb 2019 03:32:27 -0500 X-IronPort-AV: E=Sophos;i="5.58,376,1544482800"; d="scan'208";a="296376296" Received: from abo-58-107-68.mrs.modulonet.fr (HELO hadrien) ([85.68.107.58]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2019 09:32:25 +0100 Date: Sat, 16 Feb 2019 09:32:24 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Wen Yang , Gilles Muller , Nicolas Palix , Michal Marek , Yi Wang , Masahiro Yamada , Wen Yang , Cheng Shengyu , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [v5] Coccinelle: semantic code search for missing put_device() In-Reply-To: <6a07c337-533c-61c2-d033-575539309738@web.de> Message-ID: References: <201902161529041506841@zte.com.cn> <6a07c337-533c-61c2-d033-575539309738@web.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1848019999-1550305945=:3212" 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-1848019999-1550305945=:3212 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Sat, 16 Feb 2019, Markus Elfring wrote: > >> We will modify the the if in the when code like this: > >> > >> @@ -22,7 +22,7 @@ if (id == NULL || ...) { ... return ...; } > >> ... when != put_device(&id->dev) > … > >> - when != if (id) { ... put_device(&id->dev) ... } > >> + when != if (...) { ... put_device(&id->dev) ... } > > > > This looks ok. > > I have got another different software development opinion also for > such SmPL code in the adjusted line. > I find this specific source code search variant irrelevant > because the shown reference release function should be found > by the first SmPL when specification already. > Would you like to determine generally if the desired function call > is present at all? > > Thus I do not see a need (or requirement) for a duplicate search attempt. Why don't you actually try it and see what the difference is rather than repeatedly giving false information? julia --8323329-1848019999-1550305945=:3212--