Received: by 10.223.176.5 with SMTP id f5csp2603020wra; Thu, 1 Feb 2018 03:07:40 -0800 (PST) X-Google-Smtp-Source: AH8x227ABqTKBGVRvEaVeMMDzWzpQBxZv5lQxxxMgH4/XwNDsGPLp8EDXTqlMZJyGBjVBlfxkoOE X-Received: by 10.99.168.76 with SMTP id i12mr29279536pgp.119.1517483260106; Thu, 01 Feb 2018 03:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517483260; cv=none; d=google.com; s=arc-20160816; b=hCBSZEj14Ocl3j/K/GS+p1pQT57CS1BhYgMBD3qQVhVZRVeBbmf7KuAlRp0XrLmEmn qX0xlnCiQ0w42BQGzj2xJ6KQgxAaDUOENmAUyVYpg4o9464VFSCnprRAQTDCxQnsQ+7k cJmOC5eDR05/GQk7RYHV92BVPa1QHRZQVN90/SLFpQ1gvfA7iJ7cmr6LWBYJrLaVAoAK dTc3m55nomAuZVZzTV87dNh+7JN9lBtwF3D60O/zxI/RmxAj+Zv5P3yE581btP1OBHYL QEKaxCIFxz+tjX+T4kc9wXd5FbevLksld0I+vMwbb9sK9uOUedo9I862/zks7ZUXSlwR NUSw== 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 :arc-authentication-results; bh=16TTGUvMV4mGQYl6HZqd30eo+4tE1YugIyUlnTVnY4M=; b=d/rANQCfSbihjPusr1vnhnAG5Cf9dB5jI1MoKXZEMVS4Ruph5H8jv31XtrVYNqPEze uDaD9CVD6n3AI3kc50DPgmSImUIxUxQoz1dzLUJlXr7uzfUU0kk9DZOY2+1Zmz6b1vVz YffdbyiNVdAxWClF+4qGVEkBJQUJS6ZBH9zB0JPYiq0VZLH7iwpVu2fE90qCRAQIS2rT 3XJBH8RTbfRYyPh/SVgVgar8R1C8UwIP2l/47srGdotwnL7gb6kXw5LuxCs8TydCso8O YkCcxCShmq/5i1PS2dCCMS1fPH2Q8zD5BL0LkSST2JnlZzM/tmhgttflDQOIuLFOI/JH n3BQ== 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 a10si1163522pgq.154.2018.02.01.03.07.24; Thu, 01 Feb 2018 03:07:40 -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 S1752198AbeBALGm (ORCPT + 99 others); Thu, 1 Feb 2018 06:06:42 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:39099 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbeBALGk (ORCPT ); Thu, 1 Feb 2018 06:06:40 -0500 X-IronPort-AV: E=Sophos;i="5.46,443,1511823600"; d="scan'208";a="253250421" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 12:06:38 +0100 Date: Thu, 1 Feb 2018 12:06:35 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Masahiro Yamada , kernel-janitors@vger.kernel.org, Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coccinelle: reduce false positives In-Reply-To: <20180201102501.kc5pfxojn7fhxat4@mwanda> Message-ID: References: <1517478532-5444-1-git-send-email-Julia.Lawall@lip6.fr> <20180201102501.kc5pfxojn7fhxat4@mwanda> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 Here are the results that are eliminated by my change: drivers/clk/axs10x/pll_clock.c:323:1-6 kfree(pll_clk); drivers/clk/clk-gpio.c:131:2-7 kfree(clk_gpio); drivers/clk/clk-hsdk-pll.c:410:1-6 kfree(pll_clk); drivers/clk/hisilicon/clk.c:97:1-6 kfree(clk_data); drivers/mfd/syscon.c:130:1-8 iounmap(base); drivers/mfd/syscon.c:132:1-6 kfree(syscon); drivers/pinctrl/freescale/pinctrl-mxs.c:139:2-7 kfree(group); drivers/pinctrl/samsung/pinctrl-exynos5440.c:264:1-6 kfree(gname); drivers/platform/chrome/cros_ec_debugfs.c:248:1-6 kfree(msg); drivers/pwm/pwm-lp3943.c:56:3-8 kfree(pwm_map); The semantic patch is pretty naive in that it assumes that all uses of the same name point to the same thing. Looking through the code, it looks like sometimes both an __init and a probe function are provided, and the __init function doesn't have access to a device object. julia