Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2818911ybt; Mon, 22 Jun 2020 07:49:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqTLbJgVuxnL783saE4hN6CjBzDCQiyaHNDf5JeW32gX/5POBIrxkSwVt64bfPE3Q8uinT X-Received: by 2002:aa7:d2d2:: with SMTP id k18mr10067753edr.16.1592837340994; Mon, 22 Jun 2020 07:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592837340; cv=none; d=google.com; s=arc-20160816; b=s501mDDc+IjPTo7JKHWXzEXKk0qE9QdOxcyWvY1WV/yf4e/9tNm0fqw3a5vVWgOMed u9U1ytkNzsICABD8PV1Lm9CD5wsY1BbVe7kGKBN8KlbGVSIe4oK0sZ9CWN0lerogGMCD 8yslqkPwNDWuEufLtjK4WMu9Pq9XEFy2fi7VO2ReWIxHtu6KLxekRDS6ICr1RciYtGsL cEcSr6dTvtGFfVTvMTnnsAaYttY7InUMS/s9zfoiqSr1mQ+dpTheLnizAdrdivfDg5/Y tUW5NvW43lAlDsZ/hue7dc/L4s/h9Rcjoc/EQ4i6W+QBI+84VlAbHM9pv6IpS4WJRmq2 jkRA== 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:from:references:cc:to:subject:dkim-signature; bh=bibVHEU3JMl6WYz1eGuG4xe8py8Hpo9EpfUixb5KAwQ=; b=gxodEgYKwNMtLCrhwTyL7kD18PTPHoWm2AQtj1Flfga+cUvS+3v78kBfgXICxKZ2FO AkJcNfdB523KqDPy5B9K4VbMYMzSFjmxDnkLVSrRTsLmubq1eZb21VVBRCirEv4IOQsr By+igTRSoY7g0fsWwKQm0e2utyeV6q5tNAfRaVD6wdLh8JxrKA/LQxFy1YdfwVDtj3CY HT79Q91THkUuVrrf59HVckr5XUyZVGeTHVYJ/vFhUi35p4uzd5Ix7lO/YONpVtAdOb4u 2GMs2ir5ruabYzd7kaXn1b5J3oZJG+N8t513ACfHNhZT3QP/OaBnTJXRk4v1RGmxXsXi OgYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=X0FJOcp6; 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 a6si8752354ejs.628.2020.06.22.07.48.38; Mon, 22 Jun 2020 07:49:00 -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; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=X0FJOcp6; 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 S1729160AbgFVOqV (ORCPT + 99 others); Mon, 22 Jun 2020 10:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbgFVOqU (ORCPT ); Mon, 22 Jun 2020 10:46:20 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A72C061573 for ; Mon, 22 Jun 2020 07:46:20 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id x202so15849418oix.11 for ; Mon, 22 Jun 2020 07:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bibVHEU3JMl6WYz1eGuG4xe8py8Hpo9EpfUixb5KAwQ=; b=X0FJOcp6+5/IGDlD6069Y26SKrjwT9WG1ad1kqnco1dtIv1V8IFOU64KGlgAFym0ni XZH3Of/dCoZzu26HH6veTfiZ8GxyXu9vXBHnW3T2aysKegvAlbVDwC9oRES7uzRXO3lf zXhwqPTlC9wfbWpFsdq80ygL5J3kmemq8JWos= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bibVHEU3JMl6WYz1eGuG4xe8py8Hpo9EpfUixb5KAwQ=; b=ndLuX62bVsgyK6Kzh8FHQEvkWKiQOmEoqrkheFYLDnyfDa4k5SgkN8x0nC2kf+yWQv 77V0uLdICIC3IPKVGBdS06891LJ88TWyny3NHrsxjWz7JUjlHbKnkAsRo0A45UEz0tsY 8MKAiGEx1SEImEl3zyp+N63mGOV1ETQ64x+ECehnPBMg4H9bk0pa2cXGacuiLgsYZeGo K0O9IjBtSDuUz6avifhA8cse790+o24Yjp7KdaJ2MVvmejR1eIA2gP6Kxumea+YundBX 7gELX6scCh/8GziIbt4QwCegPnAsJH5sTNJPE5Ou3Vepgnfpl6ROzfKseACwsnScHBIH JPFQ== X-Gm-Message-State: AOAM5307y+0eYqyfLhmRYosmgC01/ZbYDdDgx1tVjWP9ecxZD4cDGzEP bGIsePvUHMzijiORQERpGtXjyg== X-Received: by 2002:aca:eb12:: with SMTP id j18mr12510057oih.28.1592837180117; Mon, 22 Jun 2020 07:46:20 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id u80sm3272937oia.5.2020.06.22.07.46.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 07:46:19 -0700 (PDT) Subject: Re: [PATCH] scripts: add dummy report mode to add_namespace.cocci To: Matthias Maennich , Julia Lawall Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, YueHaibing , jeyu@kernel.org, cocci@systeme.lip6.fr, stable@vger.kernel.org, Greg Kroah-Hartman , Shuah Khan References: <20200604164145.173925-1-maennich@google.com> <20200622080345.GD260206@google.com> From: Shuah Khan Message-ID: <0eda607e-4083-46d2-acb8-63cfa2697a71@linuxfoundation.org> Date: Mon, 22 Jun 2020 08:46:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200622080345.GD260206@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/22/20 2:03 AM, Matthias Maennich wrote: > On Thu, Jun 04, 2020 at 02:39:18PM -0600, Shuah Khan wrote: >> On 6/4/20 1:31 PM, Julia Lawall wrote: >>> >>> >>> On Thu, 4 Jun 2020, Matthias Maennich wrote: >>> >>>> When running `make coccicheck` in report mode using the >>>> add_namespace.cocci file, it will fail for files that contain >>>> MODULE_LICENSE. Those match the replacement precondition, but spatch >>>> errors out as virtual.ns is not set. >>>> >>>> In order to fix that, add the virtual rule nsdeps and only do search >>>> and >>>> replace if that rule has been explicitly requested. >>>> >>>> In order to make spatch happy in report mode, we also need a dummy >>>> rule, >>>> as otherwise it errors out with "No rules apply". Using a script:python >>>> rule appears unrelated and odd, but this is the shortest I could >>>> come up >>>> with. >>>> >>>> Adjust scripts/nsdeps accordingly to set the nsdeps rule when run >>>> trough >>>> `make nsdeps`. >>>> >>>> Suggested-by: Julia Lawall >>>> Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed") >>>> Cc: YueHaibing >>>> Cc: jeyu@kernel.org >>>> Cc: cocci@systeme.lip6.fr >>>> Cc: stable@vger.kernel.org >>>> Signed-off-by: Matthias Maennich >>> >>> Acked-by: Julia Lawall >>> >>> Shuah reported the problem to me, so you could add >>> >>> Reported-by: Shuah Khan >>> >> >> Very cool. No errors with this patch. Thanks for fixing it >> quickly. > > I am happy I could fix that and thanks for confirming. I assume your > Tested-by could be added? Yes Tested-by: Shuah Khan > > Is somebody willing to take this patch through their tree? > My guess is that these go through kbuild git?? thanks, -- Shuah