From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755085AbcHSN1U (ORCPT ); Fri, 19 Aug 2016 09:27:20 -0400 Received: from mout.web.de ([212.227.17.11]:57481 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754951AbcHSN1S (ORCPT ); Fri, 19 Aug 2016 09:27:18 -0400 Subject: Re: [Cocci] Coccinelle: Script to replace allocate and memset with zalloc functions To: Amitoj Kaur Chawla References: <20160801070233.GA19102@amitoj-Inspiron-3542> Cc: LKML , Coccinelle , Gilles Muller , Julia Lawall , Michal Marek , Nicolas Palix From: SF Markus Elfring Message-ID: <33c75c5f-59d5-5fd4-6767-6144b4f245bc@users.sourceforge.net> Date: Fri, 19 Aug 2016 15:26:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:WBUhw+iim4l3v62dsC7+aXeK0Sln+gPecMNxc1FIsEf2MubYEt3 V5M318h3uboXvvAUnF0ikdjlT7aJ5eSC9xiY93Aei5/evTgwtlF3rYBB0/gGn1SkOWn/hR2 yr6JQYD1GuMyKQ/v2edYHn8tSuXIa3RXrmoGcmlJ61NxbG7e8l5R1HPqd59jbtrsIU2gGay w7TAxtQlTpcMVJRGG1E2A== X-UI-Out-Filterresults: notjunk:1;V01:K0:LMqmWMb1Qfc=:mPE3EY3xQh/nMZLaJ6B88A VgjJ0dSN83/NavU0NtB+B8Oq7G6onzUG0a/nEowC8W2pQ5IqdEI00G0cIA3w9ob/04tTaKUMT KPsDJB+ctG9eNEeiz4xZL9MMFDPDip40XwzWCvGQYq5C+jeUERMeoB7iuKdzu337YDPsknOvw 6kFvEbjX3/5Wcc4fJGImukGpvDSY0otEHKuDDzgYwbGdaw8t/kXaxCIj6Rsn1TQKz6pLtOq1E wrIa5sgyJe4v085BpUTFwkRsPlbax1FM3zuZHWgL7ZDHct3xU9YbQoyrfa7ED8cbgN4ZkI+Pg BSkT7DyKT0xTaB7vz6ARqEi+2iSfHT3H3OCQ0rMWiguphfzLfxV4nWwye2ukufSR0uTJtihYF wBJArFuATQKA7EhfX7kUgNL1PbgzKliqqiDWyA/2OPwo4OREw+l7XyQzO5DGpnhy7wA7HQu2M dxJ5EyBS8/M56S69XwCmDhGMb2QEwph9MnCRcJjybnk511zPGyDZysK/H9f3HGOZ2sQnzFj76 Ycn5o30ZS4sZbGLw5kBzEJjdN1OPbrAdTElJZkCe99ekpq+aAXGiIXVHK3NLGeameR2PN2cIW b3izPqrtZDKxO99kXcswQz4tagrwdRoGO+36bnEMmtnyj7H03QeZna26+3NY7NZt0WL+xJvnw oG9KOtxvaizkfJvJLZTKZ3BRoRPGj/dSl+99qI2vBTEdN1d4XL0rN58MleyYYDcDYppI0NC5I jBpMr5YIF6CiSIqqN4HIl+pXPd5eLlIM4IISiXHe+S8HT1p+cuVL76BlxKBsn7pKTHTUoYbiI o7A7pl/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> I suggest to take another look at a few implementation details. >> >> 1. Would it make sense to merge such SmPL rules into one >> so that code duplication could be reduced a bit >> in such a script? >> >> 2. How do you think about to extend the shown check list >> with the function "kvm_kvzalloc"? … > kvm_kvzalloc function doesn't fit the same pattern as the other > functions in this semantic patch, and is kvm specific, Has this one got a similar function property? Do you prefer to exclude such functions which belong to subsystems so far generally? > so the semantic patch looks fine as is. How do you think about to express the shown source code repetition as an aspect by an other script format? Regards, Markus