Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp163677yba; Mon, 20 May 2019 06:43:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXsz4FW98dcIOC99DQSclp3foAU06jvwf02Pm4QqJ6Y8bqmUHCrb4/2ZJ6ljI8vTAVbZ8r X-Received: by 2002:a17:902:5c2:: with SMTP id f60mr28951700plf.104.1558359831574; Mon, 20 May 2019 06:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558359831; cv=none; d=google.com; s=arc-20160816; b=ZPqUYuGNWTsSrrpfTC957Tp5gX1T8avOg/FCwhH/VI9Sd/s6RjwvOOuGqMcWuUk28K JuEGBeliHO5LgXf0UGTgDYdsTBIW1w2iiHyKzmH//xaEaCMjKi7pBb0fU2qbSux2Bkfe nsV26uMowYjW93AdXh9qpu71O5eFQuiHQAU/h3AZ7+/RSAe1zodfqZpOtrfYzY45kA5e Bmvq+4bDBkYrT4BQN7RrcToHFf5XBh1IPpSFXHKuUvVeG6uwab3riRGSlDngPGVatusU UQGKIUPjl/4C9xTrZLMcGctmvBJrUle9QkVQwW8Ghfx26bCh5kEbSH84IzBSBcc0T5HW 2gCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bH9q4Xn2BIgLj3Y1vu4F3oUXJq9el+ZxE+XnRnLPFis=; b=Re9KEnYzRUdNnMIDsUbRxeXJevqxvXOF1thuCNPyKhU2OmXhHzAy1mmwaNSM/x16kV FQbkZ9aguiDbHekGu2bxrtvnoyH4iRVlhdU/zw9A+x6a4dMk5nQz+wtWnLYsEibe/d5/ TeuRGjqdp/qiyzDE4+4XcifJT97wx2Bc7NEqXiF9945oRCfxejsRij3hRyvXB+apWqeb +nq4GaX8z13zW96NrXC614PFdtW+OaFHpEucVvPZzhVc8mSBzv9b2IPT6yUCt5SZtJVf kXleInSJ23brJ7cKgpilN/Pb61COTlrhP9PYZNGF+hgX0WW2/7fHjq96z5ZpSHkA7a2C jYlA== 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 k21si17009773pll.425.2019.05.20.06.43.36; Mon, 20 May 2019 06:43:51 -0700 (PDT) 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 S1732224AbfETJdR (ORCPT + 99 others); Mon, 20 May 2019 05:33:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:48754 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729030AbfETJdP (ORCPT ); Mon, 20 May 2019 05:33:15 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 6D9FC80457; Mon, 20 May 2019 11:33:03 +0200 (CEST) Date: Mon, 20 May 2019 11:33:03 +0200 From: Pavel Machek To: Julia Lawall Cc: wen.yang99@zte.com.cn, Markus.Elfring@web.de, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Gilles Muller , yamada.masahiro@socionext.com, michal.lkml@markovi.net, nicolas.palix@imag.fr Subject: Re: Coccinelle: semantic patch for missing of_node_put Message-ID: <20190520093303.GA9320@atrey.karlin.mff.cuni.cz> References: <201905171432571474636@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > A semantic patch has no access to comments. The only thing I can see to > do is to use python to interact with some external tools. For example, > you could write some code to collect the comments in a file and the lines > on which they occur, and then get the comment that most closely precedes > the start of the function. How dangerous is missing of_node_put? AFAICT it will only result into very small, one-time memory leak, right? Could we make sure these patches are _not_ going to stable? Leaking few bytes once per boot is not really a serious bug. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html