Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4170808rwl; Sat, 7 Jan 2023 12:29:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuHoikQPo8cKPHruQvDHpYja+ej3z68l+S8R/5y+2DjndpCCS2Ew7DcygUf3d6PqTHNlA+X X-Received: by 2002:a05:6a20:3d26:b0:a4:69a2:6dd7 with SMTP id y38-20020a056a203d2600b000a469a26dd7mr80573329pzi.0.1673123367273; Sat, 07 Jan 2023 12:29:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673123367; cv=none; d=google.com; s=arc-20160816; b=PuNHDpmeOV5JqYEtkZembaSadX5GLsD0xUszGkbhZPwmaAyWu3CxMbqjZ073VINq9l lMjhJ6jsEJ0F4QVO4XBkPCb8EH1E43AKuxGBcBI1s/W/cyzLmBnod6Dyplp9GPW/TDWn TY+jB5pIpuIemozFMb7KT5LHfx/BGdAgEHINsvN7coD08/Fww3sJwb4K7WS9BB08NgMB H52cshq/6Q/lOB8CwYT/1vSsQQTO+sNSoiMzXgLJuTS2w1jd2yzAiGT0f1jOZbHi9jqn zCEPSBuzdXwfiUBHDXjVvt4rF6oMbzUOhvXEmfpSIYWcWkmALQHf7aQViiOeBpXXJMg9 JAhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VmBYcl9YpD/C8FXAWCP9NCZ7yFwXKSwtTFCh0N9Rp3M=; b=nUNRg/9ufsukf0CwJS7NV60GKhThyzy59+kfB8Impyv4SAJKWyK61mdW/XfwkPkreG mJIeM58jXUpbKmRcZGaRJ1EDE1XJY5C26sNd0VHNjYz5G0ywbYtz6mugyvBVSD5bOXTP cSW3iqn6wDAZBullQKm/4MiB2WwXCSuyAuaJ0E60I20NB6vCnXcMNooeVMT6FVMxIMjk kANaBqC80HyqGb4qYhgJWRx5T/7JrVIefbx26NdgvBt9eDp2FXE5jjpRdh5zYcZWp8kB OQu10mOsoISsHMxQUp8+n9tfZ7JzL9WIadDC14hfQjooGPHPePSdp7JpJy6vl9aRrxru HBDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="fjricY/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a170902d48100b0016f1eb1317esi4888168plg.471.2023.01.07.12.29.20; Sat, 07 Jan 2023 12:29:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="fjricY/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232536AbjAGUEL (ORCPT + 55 others); Sat, 7 Jan 2023 15:04:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbjAGUEJ (ORCPT ); Sat, 7 Jan 2023 15:04:09 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBBBBE31 for ; Sat, 7 Jan 2023 12:04:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673121832; bh=qvSMD/w2DQNAF9ACqwomgKEylFg7d9LZDFbLkAkAiEM=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=fjricY/vc4two4jGlMogMR9BT4DY3F5oI1AWTTzRuMJ9cFzogpuA7rFOni4I1BpSz /koZH4GQATaywou+Ntd9FgyuljEpg6oWqyrl1PiduLjyt02W9SFPzEDUs6JF2tNE4G ogXF3sPPAsU8JetEjXCMbAdptRpVXk9nEmd/Zy84= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 7 Jan 2023 21:03:52 +0100 (CET) X-EA-Auth: 3CfAlWsYnllX1G5Xz+iwFZSWEvjzz9Hk0nK4oLPYYp4TtmOmNTCnjCKf7MKgCPgnp1UUMLMVXlXiZCm2kh4NwfbxZSA2uh/P Date: Sun, 8 Jan 2023 01:33:41 +0530 From: Deepak R Varma To: Julia Lawall , Rodrigo Vivi Cc: Rodrigo Vivi , Nicolai Stange , Julia Lawall , Jani Nikula , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes Message-ID: References: <991ac2b4-f458-f6f2-f494-648ed61efcff@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <991ac2b4-f458-f6f2-f494-648ed61efcff@inria.fr> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 05, 2023 at 09:13:35AM +0100, Julia Lawall wrote: > > Hi Julia, thanks for helping here. > > > > So, my question is why this > > > > make coccicheck M=drivers/gpu/drm/i915/ MODE=context COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci > > > > didn't catch this chunck: > > > > - debugfs_create_file("i915_fbc_false_color", 0644, parent, > > - fbc, &intel_fbc_debugfs_false_color_fops); > > + debugfs_create_file_unsafe("i915_fbc_false_color", 0644, parent, > > + fbc, &intel_fbc_debugfs_false_color_fops); > > > > When I run it it only catches and replaces this: > > > > - DEFINE_SIMPLE_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt); > > + DEFINE_DEBUGFS_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt); > > There is something strange in your question. You have MODE=context but > you show the output for MODE=patch. The rule dcf matches a call to > debugfs_create_file, and the context rule matching DEFINE_SIMPLE_ATTRIBUTE > is only activated if dcf succeeds. So when the context rule gives a > report, there is always a corresponding call to debugfs_create_file in the > same file, it is just not highlighted. So the request is that it should > be highlighted as well? Hello Rodrigo, Not trying to speak for you, but I think Julia's comment appears to be the correct interpretation of your observation. Would you mind confirming/clarifying and suggest next steps for this proposal? Thank you, ./drv > > julia >