Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp472104ybd; Sat, 29 Jun 2019 00:41:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyphOCxVf8OaNfXJV0QZK11vb9A3ElIBPrggmjZYhTbvvjF080KbIQ7eaCNRUcoMcQF5IpF X-Received: by 2002:a17:902:363:: with SMTP id 90mr15928153pld.340.1561794110895; Sat, 29 Jun 2019 00:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561794110; cv=none; d=google.com; s=arc-20160816; b=pmFjxy253GWto5VNsHczr3oovZ35EcVz+BCxiTH7vkDnDWgi2r3pBIVxRNPmL7hedG AY3WTYZBkvOSPYiJZo+9wn3Xn2MAy7j34tYgCwwdWxJNncrADR0O4Vmm8LeaNDbTVW9z xOUWSFnIjeUUnTDBdkuWKgrEzgtoaFj13bbsjN2JLvspNtzauofCX4oT+rM+gzjtIDul ttRiMJi+2Zxc+bKaVnm8Opva7zxxRp+G1DXKVLUYr1ul38h8c1PDfZV/+DeubejUpfBy J4Lcemjd6k41NjTFMLtDsT+VhdhKF6juH//dvycrk2qKhi8209EnZzDi4Sr1rCZeRsbi mvUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:references:cc:to:from:subject :dkim-signature; bh=zTI0w2KLrXyEn2sy7/G71wrpoQWNhY7YiJUmhNtVTjM=; b=eHni3IyAAgsror0HjBX17WR3B8W69jMg51jnio3GkPidZsiZm5ffP9L3pku30if/ta y2tf3/+tyhjalpNrGb0IPLl8TnYMyn1lQ9FOlghRXyEzVp5yo7EXCgyiKSUJMmM30g7N 1NKU5kAPmRCsIs33DUsGXoeqYigwbAPnTpMJdhckkNQ5B3nP/nSSwv72g5pDLosK/uil NrpN/iF0SzUBtSoYwcAxzcv5mwHoyDRlEOdF27+wY8u/7kjKFk+qqN5EKdMJdEF1uv/7 XtCNBXciSfoHcuj+jwO29ytB4WbiWgheBnYYiVb0+2ewB1c7SQzHHO6uJhiLBtr98DoG F8dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=Zza18gqE; 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 m11si144640pfa.0.2019.06.29.00.41.34; Sat, 29 Jun 2019 00:41:50 -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; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=Zza18gqE; 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 S1726827AbfF2HlZ (ORCPT + 99 others); Sat, 29 Jun 2019 03:41:25 -0400 Received: from mout.web.de ([212.227.17.11]:41873 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbfF2HlY (ORCPT ); Sat, 29 Jun 2019 03:41:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1561794052; bh=JGm6xjnJ/hvdnhaxOvO5r4QNC/iO6BgDVdE/wPZe9z8=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=Zza18gqEAaHreow3+DIA3ZoGBENvFOyD50F30lix5aIlZvUynzQvcdLenFcL6Jac8 zwq/GnzVhzwkbw81qDqPXrMJhlRFCCuzXC6F0kIUlJt/jyBVyzNykCEGqM4RVVQIEM rmvig2SExsRER2n1JKN5C2oU20BXuh/kT+eoa+mY= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.2] ([93.132.176.71]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M40zO-1iXZyQ09uE-00rYIk; Sat, 29 Jun 2019 09:40:52 +0200 Subject: Re: [v2] coccinelle: semantic code search for missing of_node_put From: Markus Elfring To: Wen Yang , linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Cc: Yi Wang , Julia Lawall , Gilles Muller , Nicolas Palix , Michal Marek , Masahiro Yamada References: <1561690732-20694-1-git-send-email-wen.yang99@zte.com.cn> <904b9362-cd01-ffc9-600b-0c48848617a0@web.de> Openpgp: preference=signencrypt Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQvCC1r3MGoxEC1tuEa24vPCC9RZ9wk2sY5Csbva0WwYv3WKRZZBv8eIhGMxs rcpeGShRFyZ/0BYO53wZAPV1pEhGLLxd8eLN/nEWjJE0ejakPC1H/mt5F+yQBJAzz9JzbToU 5jKLu0SugNI18MspJut8AiA1M44CIWrNHXvWsQ+nnBKHDHHYZu7MoXlOmB32ndsfPthR3GSv jN7YD4Ad724H8fhRijmC1+RpuSce7w2JLj5cYj4MlccmNb8YUxsE8brY2WkXQYS8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LiWTgKlih2QYULvW61XU+mWsK8+ZlYUrRMpkauN4CJ5yTpvp+Orcz5KixHQmc5tbkLWf x0n1QFc1xxJhbzN+r9djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: <76641efc-2e3e-8664-03b2-4eb82f01c275@web.de> Date: Sat, 29 Jun 2019 09:40:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <904b9362-cd01-ffc9-600b-0c48848617a0@web.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:kQ3P0CsmExYuhpgLOWqOg91cp8lvok84fySGm5yOssSiP5iuL9G zNT+A0uRqecWi4HnKVq5bJr7FwdeDQ+PdYbxbkmeMmkXuvB0sFxcj2PY5lFfBxImN+kULhQ 7mycJX2Re4m9ZE5njSbGGsj4gVyW+vy8DKJnbJxHdWYkHN8c89iUqLGvroHNjA3yL+nNqEs ncIT0w9/T9uf1ZfTWYslg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:W7bN9icyko8=:Re3W9TdA834co/YS5gnAs8 y7GK8OUA0U0GbZg2W58IeYCwl1EY9l7RjL+wlioC5T8Ihde5VTQPo5d0gnbpKbT0mDqrhLpIx 7k6tDZO7oq3N7EhIrHIoxaaBTZyBT1PClJrBpOcwyvNkZKuqWrZqNYsrNC9jxOZXKHPd3b/3r 7Fe7TNdSnSlQKLUZdzxGdOtz2ftnWnEgzYm6ahoMBBVPqEFs7Jp1/+dr+ZPb9qz71CTVlIQpH JvSoeD52hP5SCiN/uDJ9imo29lTAnnuBqTPtTsxQt78c5h2fUv7jYpAT9oJn1o0kkWd/J00C9 TQGJx7djBbqBWsj+z9s3QIed1qSrxoYhrmACSK1uHEl4IY3Qpygj6rn/7X5ZPVvm2ofzwpSPM 2Fi4WA2G0LNE8rvr6BdRllwVoDZw9AMEPtqio6V4TCTBDAfRpW6LgaM/flCA8o9HOOK6KkvAR rqCNbgIJpbiLFIZ9uFovaEAHKrDruDvbtTjl0O/5utAIfW8zbon+rSIVlGHpc8ldx/zEoA4Z+ ge4TCjLMIFIlPjofLD5qNaffRf1W2f9R45RMEBmbsp7f4sV8+kLT81LRZhd3EolRq4xPt+yqp SRRLJAByEIG5r5BsTdUajMZ0Qu12o1GbosgqEEn0JlsghsR8uclg1l7UZFbreGC0KJxtxhy0K H5y/e+1dTu+arFXOWCSZoZfjwdmNgjmWj+3Gml/WtHq0K57dLWpMpcASYAsxRLGupTZgZiVnN BC9WUL6R3gqvp/HJ3YlDLFHki+CHhUHAXxME57K78LtZKle3FQDt1P9VkXFNtFj7gyBZaix9i eVUh6rhy/WQMx6C2BXkG2gst9jcCEehNUujUWn+v13FN/p7fTwahvUvep7DLLm/rdn8AxvI10 EAGpCqkijEQXnVUZkUlvI3Y9vrrF4N/1UOy5xtLHmhi+3UTJ3Vdrifculm27mkvoMX9+HKPhf wOoT6MkQwzok4YmW8EgMJGonW/34RLRoFzSFfpawbywE9HCVLjUiEeJ0CGyd1hDCqzavbLYsh FImktHz45FxIr1IpjLoqUj6OBwMD1ltGiWzrYyIDwfImepGnEW4wI/HvB1pBk41IsmfMrr4o9 UVB8EvxCbUkUtfsAa8T9R7Yt3Xl91mhHZFF Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +if (x =3D=3D NULL || ...) S >> +... when !=3D e =3D (T)x >> + when !=3D true x =3D=3D NULL > > I wonder if this code exclusion specification is really required > after a null pointer was checked before. I would like to add another view for this implementation detail. The when constraint can express a software desire which can be reasonable to some degree. You would like to be sure that a null pointer will not occ= ur after a corresponding check succeeded. * But I feel unsure about the circumstances under which the Coccinelle sof= tware can determine this aspect actually. * I find that it can eventually make sense only after the content of the local variable (which is identified by =E2=80=9Cx=E2=80=9D) was modi= fied. Thus I would find the exclusion of assignments more useful at this place= . Regards, Markus