Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp835922imj; Fri, 15 Feb 2019 07:36:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IZuOgFn6nnOGV+t24qZaLP0TTUyK3AWMElncjTgUesDekTmslM3lDTUUX1MmeWlDehSe5q1 X-Received: by 2002:a17:902:20e2:: with SMTP id v31mr10894306plg.307.1550244976010; Fri, 15 Feb 2019 07:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550244976; cv=none; d=google.com; s=arc-20160816; b=ey6RRBtnvGjImbcOJTUjDusWPHoO49vo2m2kjOpm14PxX/3BMrBkXbpzmTTJb/FTej a471ukCFkLMsk8KOr7v+WWO36zzPrIZ8BUwcMyyG/LwkXrpo9eSy33aGGL3j5bN/2555 IFDsDA674LNjReCPobmP0obYwFDhTeBC9K+DkHAuhoo5Otc0Z+Gf2lkULQBy777C3/Y9 2coyOy2CqSKvbh56UgaoRLC4GKLcWCDvspbRW2udqW+TquL9T9eziHOaQ5DgexDnTZJv 5aOqKMXWH7TpaxnF61cVYkJELDM27LBxkhWZLfdvP24qVujINgJySEqK4peToXQk0V4P phfA== 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=nwICotXM+awJ254fueUgaPP4uFqgdJSVkelf7GcjnrU=; b=iYHtVImHLDuOWXYbnop62aH9TYdz7L9COPAR2lbVBG7yRbucaZw6nifp3gLh9Jxzxq xRJ7qDv8uQ8OsR/NkN7/+u/JVc/EEIoP1TecIaT8C0lQip/pLNMwZhnOu93hwFmkE8GG L48sBNPrNSgQEgBEPYjnbR0VNUAdw7diWO4ZuzxCGyjh7Z3vWLRVXTsNO/+Pd/QbVTb+ nWEIbwxO8X7kH3ESRQSIx7sBL2mbosIH0E6vExOyJ2KeXjtCY+pCDYazoJ7SWDbihlDM y8Om5rq6SiTERVG+oFx9Qz8fOsW1HDN9nTyXB3XEz4zhqS9nOqLQN9de6Jj0s4uxJBj5 q6Ug== 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 k26si5784263pgb.72.2019.02.15.07.35.58; Fri, 15 Feb 2019 07:36:15 -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 S2391172AbfBOICm (ORCPT + 99 others); Fri, 15 Feb 2019 03:02:42 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:61873 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391063AbfBOICl (ORCPT ); Fri, 15 Feb 2019 03:02:41 -0500 X-IronPort-AV: E=Sophos;i="5.58,372,1544482800"; d="scan'208";a="369523313" Received: from abo-58-107-68.mrs.modulonet.fr (HELO hadrien) ([85.68.107.58]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2019 09:02:18 +0100 Date: Fri, 15 Feb 2019 09:02:18 +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: [v4] coccinelle: semantic patch for missing put_device() In-Reply-To: Message-ID: References: <201902151452197117145@zte.com.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Feb 2019, Markus Elfring wrote: > >> So I plan to modify the following to capture both cases: > >> -local idexpression id; > >> +expression id; > > > > I'm not sure that this is a good idea. > > Why have you got doubts here? > > > > There is likely no need for a put in the latter case. > > I have got understanding difficulties for such information. > What did you try to express with this sentence finally? The whole goal of the semantic patch is to ensure that put_device is called when needed. If the value is stored in a structure, then someone else will likely take care of calling put_device later when the structure is destroyed. julia