From patchwork Tue Jan 10 18:29:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 3820 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2906625wrt; Tue, 10 Jan 2023 10:35:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXv31QTdzbFJf499+glKXO4C55dgL6qaa+IGbTTHi4OU8c2sUMBamKGaVmfwped96WqdhLJM X-Received: by 2002:a17:906:4e48:b0:7c1:8f78:9562 with SMTP id g8-20020a1709064e4800b007c18f789562mr55649131ejw.50.1673375715814; Tue, 10 Jan 2023 10:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673375715; cv=none; d=google.com; s=arc-20160816; b=Ax9hjajDMvbMZJp0/642Q77cacBli80L0QuKco0FiJ7/G5RnqFlQkyZRR5ZpweXX2y +kWPWR1fshoOHg0hZehyRh4g1eKlzR8DPfhQ2e8pKMbkc5j5UD3gA5+bqpDIkd2TzbhP UGOKCKd0e6UO0Z4dw+/84mMvHgQmSKH7iUEyJi43Fg6MV36Dot+Jd3/5ba3T6fawl4u4 cmnuzqDB+kGFu44ovlBlbmkpPLjtnXDqfuCxhjsq1BtRflqxBxUyMEiN/Zmsc1N1V+HG xA61J3WOU4LR5QJmOEAbuld1ILV9sI2wPYGE9NFMiS7EXkRkN2oFUYHfKdMbE58TZ4Ro NAoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=cBprVOG5rsx6zqE8R+HVQ1soEv77rhjUfPmM6JtgqfA=; b=jJ/EW++jjl9SZ8Ozx3iQv+/xRx/MLXtR3JIZeS15qvnyO+WdIEUHRgd1v8gQuI06LQ hO/4zI7YKaDOarCYw5JhsivHhYHOrWZ8UiWMAr0JnmcQ1yXzXIhbbur2HvOG0Fhw2djd cbxq1NBBGJ8qmI4TM3Va3v1ypDiHXAxfYPL9ZNoFg+GSXauQtnK8pMGiK/7jVn18HwOY UWWwUIe7e1ZtIcDaZHRkQE686aiL//C8FoBJWWjizUSjih++hTPadqjvzEnYF56P+cTf XBgvzQYcwgI/Jh4oSEP54OqONatSQef7UErEawaZYu6D38zmSLCrM6KPrqjhHecRS+sH Gbyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=OexEuoD9; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wt9-20020a170906ee8900b007d82520def9si12785632ejb.503.2023.01.10.10.34.52; Tue, 10 Jan 2023 10:35:15 -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=OexEuoD9; 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 S239157AbjAJSe0 (ORCPT + 99 others); Tue, 10 Jan 2023 13:34:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239431AbjAJSd3 (ORCPT ); Tue, 10 Jan 2023 13:33:29 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6905496C8 for ; Tue, 10 Jan 2023 10:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673375358; bh=ysQKgi/JrIlMmf5X/MsjVffw4bVjIB+SlJMK93Fc6kg=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=OexEuoD9w2rlMChDuyt0Lgha7b7LxqL3HJv8QJLNqyDAcSy+l2nixqXecxJQhxkqS 5QvyViSKyMEvFCWmZ0A5h4m2Cmv2yE15Vo4a1D1+q+CD5JNsXKoC6xcif0M6+BLN9t Zf3EpUPIuX94dRxlKAXQI/s5DZHkkRBpBUhuCuG0= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Tue, 10 Jan 2023 19:29:18 +0100 (CET) X-EA-Auth: oQ+AcTSeF9jeNjLefVNdNkG4EnXmo8P+THlMmFEOkOeY8Q9R+8z2jAIjLfGWEzOAlKzkPWXxiVB7FkaoUs3fWy/2E/lJeh2t Date: Tue, 10 Jan 2023 23:59:12 +0530 From: Deepak R Varma To: Zhenyu Wang , Zhi Wang , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar Subject: [PATCH 0/2] drm/i915/gvt: Avoid full proxy f_ops debug attributes Message-ID: MIME-Version: 1.0 Content-Disposition: inline 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754661614276037065?= X-GMAIL-MSGID: =?utf-8?q?1754661614276037065?= This patch series proposes to replace a combination of DEFINE_SIMPLE_ATTRIBUTE() + debugfs_create_file() by a combination of DEFINE_DEBUGFS_ATTRIBUTE() + debugfs_create_file_unsafe(). The change reduced overhead in terms of managing the full proxy f_ops at runtime. The patches 1 & 2 covers for the scan_nonprivbb and vgpu_status f_ops debugfs attributes respectively. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Deepak R Varma (2): drm/i915/gvt: Avoid full proxy f_ops for scan_nonprivbb debug attributes drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes drivers/gpu/drm/i915/gvt/debugfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)