Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp1062679lko; Tue, 13 Jul 2021 16:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWEeAtHRrFByHSKzXShRovVsa2xA88Xle+lEI/KahSQ/JskVY/CERQ8qP36O0DgHlD/nl5 X-Received: by 2002:a17:907:7608:: with SMTP id jx8mr8404521ejc.233.1626217877072; Tue, 13 Jul 2021 16:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626217877; cv=none; d=google.com; s=arc-20160816; b=lrcydOWyk5amsau5seHDq9dMtc+Dobvz6P60+9rIjQXnDInenov219e9Umg+yNOHHk XWpnPPwTqIa+mfBQ8KtS8uYFJoEVAYtRiOmnhqs3pIzH/QJHNwONj1mZxcgndVxvy2Hp Y0GiLKe6TDN3L+WRkLAeJydKqAsecksliJzyEod3MlzLJhAJILrjdVGRWzUssFnq+uZ4 lOLX5Q41z50/zoQJR4U2CwdMoxDqtjrPxkHzmYDfHL4pWjRdc4gYtYcHwhhvI6gInf3J fRfy9VbZGIUV9bIk4BLz6vxo+6h0ZCT+fhXuPXxPydWxgF31zJwRzWBIvHReqP+m8TIY 4UIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=WE5XQsF9W7CQH3BaGwtAKm7l+9e+gjlJR3Jdex8CNUU=; b=zerH8aB2kAgtV8YIaEPyDmMYPqt6OxApp/Evtdck43eabdClv1s4291b+SBKdkMJB8 glYuqcrk8OickI9RZjmLqkUBwyHts+7gd/R8/YMK5G8VIj/T8MAFu7n0QnIXzsY7XAJV QIOhIlPgK+TYonqc6HmFa6wA0h8FpTnTtQBQyga8YwpGttp2SSdX9F7A77OYhPC8swlV 0rHV8xfZGTwWl5brFljCpfkrXd7z/yNxrBA61utM0/ofbX1RebTbvs3J553+jJ2h0HsY pgV7DjXmsrWpVyJSCTGO3sgR5hOyGG7xuxnYTuCC+L64gNhWFoEq1+FGmHJRISt99k0O mFjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si269048edq.141.2021.07.13.16.10.51; Tue, 13 Jul 2021 16:11:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236702AbhGMXMQ (ORCPT + 99 others); Tue, 13 Jul 2021 19:12:16 -0400 Received: from smtprelay0070.hostedemail.com ([216.40.44.70]:49996 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235417AbhGMXMQ (ORCPT ); Tue, 13 Jul 2021 19:12:16 -0400 Received: from omf09.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 508902C5A4; Tue, 13 Jul 2021 23:09:25 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA id 7F83A1E04D8; Tue, 13 Jul 2021 23:09:24 +0000 (UTC) Message-ID: <42a843710a652e110b71ab6beafc3a3e6e11dfd3.camel@perches.com> Subject: Re: cocci script to convert linux-kernel allocs with BITS_TO_LONGS to bitmap_alloc From: Joe Perches To: Julia Lawall Cc: cocci , LKML , kernel-janitors@vger.kernel.org Date: Tue, 13 Jul 2021 16:09:22 -0700 In-Reply-To: References: <08b89608cfb1280624d1a89ead6547069f9a4c31.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.02 X-Stat-Signature: uztexi7wie66gnpui9nawg7xurxs43hk X-Rspamd-Server: rspamout01 X-Rspamd-Queue-Id: 7F83A1E04D8 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19+E355a2jKrTaUCYH65AOx1cK8B6P3fac= X-HE-Tag: 1626217764-847900 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-07-13 at 23:33 +0200, Julia Lawall wrote: > > > On Fri, 9 Jul 2021, Joe Perches wrote: > > > > Here is a cocci script to convert various types of bitmap allocations > > > > that use BITS_TO_LONGS to the more typical bitmap_alloc functions. > > I see that there is also a bitmap_free. Maybe the rule should be > introducing that as well? Yes, but as far as I know, it's difficult for coccinelle to convert the kfree() calls of any previous bitmap_alloc to bitmap_free as most frequently the kfree() call is in a separate function. Please do it if you know how, you're probably the best in the world at coccinelle. I don't know how... cheers, Joe