Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1587766ybg; Thu, 4 Jun 2020 13:42:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuaAYbhYdAJqDzsndi4/6wTjg5X/x2ai4b5a6Hw4dlTA2MCnJdL1QVnqCwK6IQ7jKm0SUU X-Received: by 2002:a17:906:b293:: with SMTP id q19mr5760003ejz.412.1591303350071; Thu, 04 Jun 2020 13:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591303350; cv=none; d=google.com; s=arc-20160816; b=FcMR5wLK7QYEn+wNHh/HA9oRQoipm5hsZaGtXjjbai8NuGX86q64yrE2NZqO7AJEPn aJOs7gxmBumom8dUbU3glaNnDyAP+f2Utj7lrLCaGq1sGVkAOxdnW4xxPhSoEdjUiwoS Wn2PsS+dqR89Y7khzQAYyhQ/uWUx8N/mlVfLPO1Pq5LiR958q1qVrkSIeUeNVcJIquKY VVlxruYo4n2IMD2OIbKdTGc8qigdFPi4/bGFECqjktETx7lSi3L/7SOWfWxPa/bIh9D2 W1Z96e654bD4SRqai8Lm5ji5xlF/1kOIQ6IXsX+prX8ejDI8Fc6eMZmfkrTpWuJmiW22 nJRQ== 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=n4qcFbrYrQboDsoGvWR4IKKjkBw2HOoEx50CuF4/sRg=; b=b8gGuptgeVx4p/6zNAMvL8rA0qHJMqka5iaJkTT5Kd/f16GnC8FLumOedY6SS7ZOB8 YtirwknIVPts4JkGM27ZJO/tUCmHMuqG3YX3Tw0pNkUI5457ro4hHxs0G89P3I64MYXr BgweyZ6hKtboorijlq/J2z4I2Bf3cSiQWrdpymfqpxxxvsee3OPNJHU8vpzg0WpugrAA w1KcAf3OFXIONq/50N7vCVRjTRHAUXEDsGQ8YuSLs4lm509wIXrr7PLYDfT6a6ZWpI8h moF9z8U2Ifk26KUhZOHnjVU+zubaeP0TCNQ5h0dNHL8ONrbT4nwoNZMefXP09E/tBXyK eEzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=X+1urrch; 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 dn12si2435499ejc.287.2020.06.04.13.42.06; Thu, 04 Jun 2020 13:42:30 -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=X+1urrch; 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 S1730007AbgFDUjY (ORCPT + 99 others); Thu, 4 Jun 2020 16:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729921AbgFDUjU (ORCPT ); Thu, 4 Jun 2020 16:39:20 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2674C08C5C0 for ; Thu, 4 Jun 2020 13:39:20 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id 69so5870371otv.2 for ; Thu, 04 Jun 2020 13:39: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=n4qcFbrYrQboDsoGvWR4IKKjkBw2HOoEx50CuF4/sRg=; b=X+1urrchhlAJ6Ly5eKLEwlLZBlos/tPMbW2qcDX2ccbNN0J0XQByplLqMfeDaRcNHQ EvnZLIGtALIexNJWE7WZhaFK5yQsyRt8/i1DxNLSpK+1LzHPWpUKOETN1BYjFdCjB+Vl /AP5kdUUtAL9HKi1PmPBX5OXwcuOL94Gi6dhk= 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=n4qcFbrYrQboDsoGvWR4IKKjkBw2HOoEx50CuF4/sRg=; b=F8+l5aFlxUzknwOPn0422YI2xzoyxRdKdzB2ickIUDy/XkgrKQmLZrPaUaC1sd2bY+ ziDaZJ1+jtl/M4DWBMa60AGCX9pSHNDjNEZkPoBqE3Q5Qgv+/PdzkuVl3lE5+/j/TAq/ q4iOpZktHT/PuQe8yht7Rn4k0WuOhHTnFnPCrEDIjG+BN0VIAnmF/+u1IawGj+WmFZI5 wrfLv98RwuqS6FbrdN2YsEdv13O6/bH5lZC/Sz4kYWDd3j0Hy92g/+DgwG4wVcezUS32 MI2BOQWqf2YxbAG1bMSXWGUct05PiFPbt2brFl23aDlKg/4LNtXWEzNQtKWpLf3dzvHN Pk1w== X-Gm-Message-State: AOAM531LjQVVzc45yEhOKkVXqE9+yJvl71a0nwqkYMVbOKQj1V2zRV3K 7Q00ZLSejyzZ34JuO1oxuF5hdA== X-Received: by 2002:a9d:7f8c:: with SMTP id t12mr2603935otp.66.1591303160057; Thu, 04 Jun 2020 13:39: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 f2sm1527259otc.45.2020.06.04.13.39.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jun 2020 13:39:19 -0700 (PDT) Subject: Re: [PATCH] scripts: add dummy report mode to add_namespace.cocci To: Julia Lawall , Matthias Maennich Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, YueHaibing , jeyu@kernel.org, cocci@systeme.lip6.fr, stable@vger.kernel.org, Shuah Khan References: <20200604164145.173925-1-maennich@google.com> From: Shuah Khan Message-ID: Date: Thu, 4 Jun 2020 14:39: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: 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/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. thanks, -- Shuah