Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7384058rwl; Mon, 9 Jan 2023 23:25:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvDw1NG0bbUBv+5n8lt5EQR2NtcPM7QFzwpPGn83KRPGPQpgiBYOb3DKtdG4tgcseLkmQ2N X-Received: by 2002:a05:6a20:1584:b0:ac:31c7:9d7 with SMTP id h4-20020a056a20158400b000ac31c709d7mr104635756pzj.52.1673335555670; Mon, 09 Jan 2023 23:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673335555; cv=none; d=google.com; s=arc-20160816; b=hlHUQmPew+B0gGLevrXfc/3FxDLw/zPnj+QAlfzST70CIxR6zLrVfTL0K27FlnYPeP WXnprD+XJGTEECLcucOxyu9YjXlvrCKnJlV1bJHaVfXdzydcWC69dozVGoWxe2Bmu6q7 u8KPf6YUsAJko2QjjR/AnBebBINGjmNiraz63Br6pLnaQUwW8IZr9r+kkypms2kLPfqQ Xv21uw4bXBcOmXGR2Zp9zoO5OQSd9yr966SGMMB1ZDKh2t230VWBw7JfHAkeuEzJFpwa z41V3tBsUN89cm820RxQ26B9BjjSFGeTnHUgKHl/ZL07mmwJMbDMEnIgmKhb4CLvhZrH XR/Q== 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=XMF8U4i1/PI6QtvySXgWpbvzoksw+VPYfOx/0A6r+FI=; b=v6Wx+vWIav84qY1F86py2K5oP3XwIznxHhbj/GVZI87LgB/Ej62duMfaUnfssRST0W xRs8O7GK7NreoGf0vH352stcFaeIYaAk9wT94aIXQqXPboMEda6JxFmTIwDXn7ClJccu 1S4lTMlvKkP1dOwxk5Y8iVkmkHypctI74UKSQHPOTGeObZXuBguVuFHGXfFq2BxXyYRU ShavQOPCPyU0K05xqvGFMKRz+tYCACSiVdJAkKrYeshC5ejs1pMhhotz+aX+bJ2tuKkN sUNQQSBFv8bwOd3lRWOcDxR9Y63DqLyDhqE/7ZKflyTzDTZ0JXGP4dH8PLhJVj5FsiKq JpuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=UthIZuQs; 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 ls17-20020a17090b351100b00213dce992c1si11586810pjb.7.2023.01.09.23.25.49; Mon, 09 Jan 2023 23:25:55 -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=UthIZuQs; 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 S231243AbjAJGut (ORCPT + 53 others); Tue, 10 Jan 2023 01:50:49 -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: 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 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 > > > > > > >