Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2540472pxx; Sun, 1 Nov 2020 01:25:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8YEQiZb9WTE7NuDzKV/ja76GT1IRDJ1XQuhnKgx9SfhU3kywsr2dwiUAc/lenl4G5FfMA X-Received: by 2002:a17:906:14d:: with SMTP id 13mr10166689ejh.516.1604222745194; Sun, 01 Nov 2020 01:25:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604222745; cv=none; d=google.com; s=arc-20160816; b=h/7ZpCnFqk93qaE29foZUIG78c6Ous+rYJ1NomybsRItn+OU4N+2SbaJdhBKM1X18k O22ojUlyOREdLJic+kczjHW6c5seQq9EbBE7CXqmQlL8ahTHWy4TPNnAxbiLcFhAhNmg IniK9RaQXFUISYt0+rJveOy8SYsCeomsFfAfjdH08L9uw8DJe3yrOUz73ZTdtGE3ZPbr UdoVcHQ59dll2cFzeS29MOvP00ZjavM3TvF4t7y7BMd1JDtatYbgHIWPXvNjj/qsBDmN W43uzxP2SWfa8E/G10kCsbc83aQYF6Twd20GfeOM17R3TH6HAUJ3jRNbMjBqy0ULcU+9 jtMA== 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; bh=DIePVJLm7jFmE7mVjhd4h6se4wOo+ayfAVqJ3ZjVSt8=; b=mjHKaRaRhRY4qVwI4X62t7ADE4wzJK/IpjpDcS1X6zQJWZ5GB35vt7DvM3/9ljNnBZ w0Gm6eal0B7V7fli1HIRFnYvFKjyYdPVI1RpdjqzzW4roeIdvuovSOCRBDdypu8SZou5 ziFZQtlnUkppphOcdqVaXwsQs7bWBOisBIqDhajo+y+bQMedwqN/71CGpXHkp++Nlj4J je4owRaAA2lQMWRV4U6s9bIYf4/kNTi487KmAHi6BspbHs9TglCFex4eS0vjD+gCAAgU pgWyvPnAAmsGGbedgYRghKUNEcNUjjR6Rvc+fyddBpAvuIpHZ5qGOusvnTsGNxwNjEwU IWyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca27si8251068edb.244.2020.11.01.01.25.22; Sun, 01 Nov 2020 01:25:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbgKAJWX (ORCPT + 99 others); Sun, 1 Nov 2020 04:22:23 -0500 Received: from asavdk4.altibox.net ([109.247.116.15]:37468 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgKAJWW (ORCPT ); Sun, 1 Nov 2020 04:22:22 -0500 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id AAF35804F6; Sun, 1 Nov 2020 10:22:17 +0100 (CET) Date: Sun, 1 Nov 2020 10:22:16 +0100 From: Sam Ravnborg To: Deepak R Varma Cc: outreachy-kernel@googlegroups.com, Guido =?iso-8859-1?Q?G=FCnther?= , Purism Kernel Team , Ondrej Jirman , Thierry Reding , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, melissa.srw@gmail.com, daniel.vetter@ffwll.ch Subject: Re: [PATCH] drm/panel: st7703: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() Message-ID: <20201101092216.GB1166694@ravnborg.org> References: <20201030033150.GA275009@my--box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201030033150.GA275009@my--box> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VafZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=S4BYaaioAAAA:8 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=P2jyfWBKOuCc-NuxQl4A:9 a=CjuIK1q_8ugA:10 a=NWVoK91CQyQA:10 a=gP6mnyLQ4wGU0PyH625T:22 a=Vxmtnl_E_bksehYqCbjh:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Deepak On Fri, Oct 30, 2020 at 09:01:50AM +0530, Deepak R Varma wrote: > Using DEFINE_DEBUGFS_ATTRIBUTE macro with debugfs_create_file_unsafe() > function in place of the debugfs_create_file() function will make the > file operation struct "reset" aware of the file's lifetime. Additional > details here: https://lists.archive.carbon60.com/linux/kernel/2369498 > > Issue reported by Coccinelle script: > scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci > > Signed-off-by: Deepak R Varma Based on discussions triggered by other patches doing the same replacement I will ignore this patch for now. If the conclusions are that this is indeed the right thing to do then please let us know so we can apply this patch. Thanks, Sam > --- > Please Note: This is a Outreachy project task patch. > > drivers/gpu/drm/panel/panel-sitronix-st7703.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > index c22e7c49e077..89b71d4f810d 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c > @@ -502,15 +502,14 @@ static int allpixelson_set(void *data, u64 val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL, > - allpixelson_set, "%llu\n"); > +DEFINE_DEBUGFS_ATTRIBUTE(allpixelson_fops, NULL, allpixelson_set, "%llu\n"); > > static void st7703_debugfs_init(struct st7703 *ctx) > { > ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL); > > - debugfs_create_file("allpixelson", 0600, ctx->debugfs, ctx, > - &allpixelson_fops); > + debugfs_create_file_unsafe("allpixelson", 0600, ctx->debugfs, ctx, > + &allpixelson_fops); > } > > static void st7703_debugfs_remove(struct st7703 *ctx) > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel