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 12432C54EBE for ; Tue, 10 Jan 2023 06:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230515AbjAJGuw (ORCPT ); Tue, 10 Jan 2023 01:50:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbjAJGum (ORCPT ); Tue, 10 Jan 2023 01:50:42 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F15C23726D for ; Mon, 9 Jan 2023 22:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673333418; bh=3KaCdpCLhRbvvNI0DI23jFXuIUWpZ5VYOO2VZGDg4LA=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=UthIZuQsGBWU3ZoNHYDt3YRD3Je6JMr352tXPWTRrfrMHElR5kpF830/41B8x8M8l MJ0twekvggE+Ooe0MlIB7SXgYJnwxDA1/2IdHXantDyxIjrgQMZ8PNFYm3EaAf2Hau GfrEZjnHyhHGG1u4u1/urU99hDKUvkSD53U+E61I= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via ip-206.mailobj.net [213.182.55.206] Tue, 10 Jan 2023 07:50:18 +0100 (CET) X-EA-Auth: sY7JOkE2geYQPQNYTsUXSW5mVARRXg5Tda5wKW6gPAGmTE9v5gbkig2Bl1SRnXRzlUiEnqh7MwmdKhO8vsxKornoLTl8b/ng Date: Tue, 10 Jan 2023 12:20:13 +0530 From: Deepak R Varma To: Rodrigo Vivi Cc: Julia Lawall , 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2023 at 02:06:13PM -0500, Rodrigo Vivi wrote: > On Sun, Jan 08, 2023 at 01:33:41AM +0530, Deepak R Varma wrote: > > 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? > > doh! newby coccinelle user detected! My bad, sorry! > > make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci > > do shows everything. > > So, could you please mention this line in the commit message so we don't forget that? Sure, I will do that. > > Also could you please provide patches for the other cases? > 1 patch for each file is desirable in this case since it touches different areas. Sounds good. I will separate patches one per file and send in a series as appropriate. Thank you, ./drv > > > > > Thank you, > > ./drv > > > > > > > > julia > > > > > > >