From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D35A1C54EBC for ; Sat, 7 Jan 2023 20:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232574AbjAGUEM (ORCPT ); Sat, 7 Jan 2023 15:04:12 -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> 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 >