Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6673890rwl; Mon, 9 Jan 2023 11:23:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtx/fa0b55HsCbnnRBkOJOJRaddDd/W1EqItomFGXtSrdr+12IvfAD6qltEI3UOZ9R8uL3b X-Received: by 2002:a17:906:311b:b0:7c1:64dc:ac25 with SMTP id 27-20020a170906311b00b007c164dcac25mr56616612ejx.23.1673292198945; Mon, 09 Jan 2023 11:23:18 -0800 (PST) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr18-20020a170907721200b007ad69eba328si10371409ejc.539.2023.01.09.11.23.05; Mon, 09 Jan 2023 11:23:18 -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=pass header.i=@intel.com header.s=Intel header.b=PGpgmuUQ; arc=fail (signature failed); 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237496AbjAITGc (ORCPT + 55 others); Mon, 9 Jan 2023 14:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237490AbjAITG1 (ORCPT ); Mon, 9 Jan 2023 14:06:27 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AD1A1A392 for ; Mon, 9 Jan 2023 11:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673291186; x=1704827186; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=+cidFi+BlpAp78LNvJTT9ElHxV0Psxw78Zz49lDRRMs=; b=PGpgmuUQTqsd2ORbJmwe+YFxZ9RvK3WGu3F1Z0vTlgQGZhDO4f8PsZdJ n2rACewsyAGHVrGoB/SrWzAjvy30VrqhW5OW/HwZhPcAAdGqHKtJiMvNH tFIOhJcaTInv4x3gGi3hqtfPfnYXNdr3D3bmrYE8Kq1HH5LanzQ/yfyqD 95eMTHr2zFYIEqbnDhF8IntB4/QDpFZvmDfpFSNGjgJnyuiFVcMVCFagA Cf/Nw1tZ+kGduCJ+Lhs7pExV/UltVzBdKJ6SfNgUJ7kSxJwWttOrzXRXq ZcHU4orCgDhEba4gqh5TLtGBDu6cjNzj9EBLRf5HjlX39KgaWjd5nNewN g==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="306474263" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="306474263" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 11:06:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="656777011" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="656777011" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga002.jf.intel.com with ESMTP; 09 Jan 2023 11:06:25 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 9 Jan 2023 11:06:25 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 9 Jan 2023 11:06:25 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 9 Jan 2023 11:06:25 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 9 Jan 2023 11:06:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQXXh7eVcHAlpRMa3CCYNP06CkoMxpMV+OeTwSnQ2kT8J9LVCxdxa78SgeH9ly/QwvavijUIYjLoh6IjlEFcKgw76jZVggm2dkTKwBulkbNh0OTNUzSGhVGEsAV4THJGvZSFAuiNEDNuka+4FLljG6/EJXKRP4mf+6VE8xmBpYDzhVsv33RSxGc27AQdqIzfhU5bDw2mQ05okBarFh+teI2TZDjAcxtqesYKwKUMiiZv5dQyFFQkXKhWLfiyridTfF8yO8I2FY5oitUPVJ+phqLSxaRoSxmV8QUKTgl5u6SWeS+lCeym+9TswXkcHhs4JPvE0ZOmjm6+ey5PYecXPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zj+bhPPBEB5wn0+zaIBGnduwFlF/ylV8YKCd/6dF75s=; b=j8CcaxIcJ5jIk/mNxNiCGfUcDPiZBHRcumPD6uXiw2Owfk9lIb3DueG90QoK6y1kh+GdF/fiwPqnnB2gBL/49TimiSH42uocfGnROMHbL5C4QtoKwwy4H3HXFThurLakwI/QWyMxgK+8KhsvkwbHpqqoC5UH3BDAwZaNy/AydPXNr+0jXbNLfK2NmosIV4F5WDQ5nJg0z7w7rd3XLcB7GXNsoknjEFslrog76HV1imGJjOojiSrl5veqQNrzFyZFD8Nh8BzwKvGZ0eEn0u5wTQkJ8CnkZRbmykld8c/j5077W2TNYmmUQS0rw6PKpPeXWGy/iZ1ASizbUJ5BuJYLxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) by CH0PR11MB5379.namprd11.prod.outlook.com (2603:10b6:610:ba::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 9 Jan 2023 19:06:20 +0000 Received: from MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::1818:e39d:454d:a930]) by MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::1818:e39d:454d:a930%4]) with mapi id 15.20.5986.018; Mon, 9 Jan 2023 19:06:20 +0000 Date: Mon, 9 Jan 2023 14:06:13 -0500 From: Rodrigo Vivi To: Deepak R Varma CC: Julia Lawall , Nicolai Stange , Julia Lawall , Jani Nikula , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , "Daniel Vetter" , , , , "Saurabh Singh Sengar" , Praveen Kumar 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> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SJ0PR03CA0056.namprd03.prod.outlook.com (2603:10b6:a03:33e::31) To MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR11MB6059:EE_|CH0PR11MB5379:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ade286d-390c-46da-8180-08daf2749753 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4MOYjGUM+OtZBwBr1Mh8KDhWI+2bJ2ROMh9xWgsYL42E3nNvw+ond4LxzUmEqyKkKIDjZ1iaMSABBL+AXuw9mgeJsM4n16h+qCSJoVubWccvVAPO3FnZL6AOO8wN0zYf2IyxhGQf+nks74Xh0wJhBYjKDd/CuSo6WUxty3581YWOz6O0rJs59e94TTikqlkLuFJ/IzJOv76oSfFVdeT5uTqWjGDnPdFNkZP3mY9u+3uKwSJuMNu50VeI3+rqruFF3S1qBZQlgtwnNVrYNTPBoi1Ak5HP00DYW/4ETCteDEiTjuCkTfbl7aTJnLhUdq7xpvTsTc/APwstA33czfHKpNhjktVI/0vr25oyTVZBd7OJsSGX7eKJ1INGpbKg4Gsx4eDkyqxFjDkwrOgtYzVcgj/qTBMGAVLmALoVKmJFlVrl/SMyfcufJfORLqzmF14AHZ1WLoUe7cNrqy9ArPgB3eoDTaa+f1tCDZMP5iTQ7YWKIVAZb52AoZJCL/5N0TopXvJoH8tUpKZHww/E/SDXa9/VHKFp0lUwXyCg//HMfRH8OPrAjul2uqsJyKc26cP21coONQ0i9rv3YKn0V4jPk35Wr3hz8gNSQDkdqHJvmn3TNx5jmcwpzl8Hq2MO81+KNZqj3Jd7rwWjq6nqkLoQkg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6059.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(346002)(376002)(396003)(39860400002)(136003)(451199015)(83380400001)(2906002)(44832011)(54906003)(2616005)(66476007)(66556008)(7416002)(5660300002)(66946007)(6666004)(26005)(186003)(36756003)(8936002)(6506007)(6512007)(478600001)(82960400001)(38100700002)(8676002)(41300700001)(6486002)(86362001)(4326008)(6916009)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0I7Sc2XG1IiOUZZQ0lUt/5vYZmKkoHT4bKhRsjodtBpLET8jBN6hsMR+VJJo?= =?us-ascii?Q?ujdMnZHMw2/63aqGExStmP4bUSsex63hJXq74RH8D5A1YdcyCQJwYjkXfSDs?= =?us-ascii?Q?YtWyLxfqPsZ9+Y2B8yHbS585EkvANoRO6DDz5KQTRoBWk1UHtMFKBzrZnPel?= =?us-ascii?Q?yd2sI1G3/+dx5TeZQmJilVQl1SayRCCZBSTgWjrb8U3Q+Ba+EEeox9vAUe+Q?= =?us-ascii?Q?9KZAnO1myCnyFNcFNuybcTKKR90Fc2VLhjrpYuVQvRAATIsWgrFgYXyk7h3D?= =?us-ascii?Q?gpyUIh2B43VFUXYOOhvpQW9YVQNBbVBUkugr6p4b0Ha/W26ZZvWqTr0wJ3xt?= =?us-ascii?Q?QBG+mRITsUx5D8OD0lOUaWyUnpLNdi7Zr3GGXEgvWgY00yXi7Am/KYmeYh+X?= =?us-ascii?Q?J2BKgKmz2en7lgI3ZpESTxQbM+4pkv+iZj6ns3U+5OjS+OSdk2kf5UOZQJkz?= =?us-ascii?Q?m3kA6p6aYEpg70gOTPCNOMxl+lfKnIT3v1XEMZi+lHu6povsCdvksbxWTT4Q?= =?us-ascii?Q?+yeSQDmhfeF4woYy3C90vWyrJySW2qWqgwEmuKjmrd9tQ32lRYDK/smWtLa0?= =?us-ascii?Q?YbYXNJNhPZvRDQbQN/vMJltih/7yQXoFoQZudT6bu5T6KravWt6f8Lnhya9h?= =?us-ascii?Q?waIis5dLSCxZlANZkUDN4KP6L1q2JGWVJ+5sz7D9MamT9X/OhAg7pSSE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JrDQJZk8pnlpiBoVPqtPi0uaCN2LgqmLXuIfKEi?= =?us-ascii?Q?ZA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6ade286d-390c-46da-8180-08daf2749753 X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6059.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2023 19:06:20.2649 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: io7ifq6d3k7ahMqLvBCQ8EQv+BahkHyrg3id2ZRElHbfvub5Ey+65Pk9AxDFIkl/05zGoa7ndukPT/EzZaBCtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5379 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE 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 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? 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. > > Thank you, > ./drv > > > > > julia > > > >