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 X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B56EC00A89 for ; Fri, 30 Oct 2020 08:35:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A349720739 for ; Fri, 30 Oct 2020 08:35:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wp8/hvRE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A349720739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 280F96ED0E; Fri, 30 Oct 2020 08:35:50 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D4306E957; Fri, 30 Oct 2020 07:10:33 +0000 (UTC) Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1665120723; Fri, 30 Oct 2020 07:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604041832; bh=6UZfI9KlukChYkAwmZBY+j32nu5aC1F84wLitkAFcHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wp8/hvRE/LfhJJ1P3TNOzq9lgzVnDlBRiSdLAl6MZXbf1TkKDHk95RR2Xjzd6+IUb tgKDQcRYbI6wWvk5mHsZThQB/1uDo+V8qIpoGs4X6ScEv9ONzxbN9egoDEZGb29nxz T8j3F0UclYetTTGfjJGzHyDJSfrpyLmCI0/UquMY= Date: Fri, 30 Oct 2020 08:11:20 +0100 From: Greg KH To: Deepak R Varma Subject: Re: [Outreachy kernel] [PATCH] drm/amdgpu: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() Message-ID: <20201030071120.GA1493629@kroah.com> References: <20201030032245.GA274478@my--box> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201030032245.GA274478@my--box> X-Mailman-Approved-At: Fri, 30 Oct 2020 08:35:49 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, melissa.srw@gmail.com, outreachy-kernel@googlegroups.com, dri-devel@lists.freedesktop.org, Daniel Vetter , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Fri, Oct 30, 2020 at 08:52:45AM +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 > --- > Please Note: This is a Outreachy project task patch. > > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > index 2d125b8b15ee..f076b1ba7319 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > @@ -1551,29 +1551,29 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(fops_ib_preempt, NULL, > - amdgpu_debugfs_ib_preempt, "%llu\n"); > +DEFINE_DEBUGFS_ATTRIBUTE(fops_ib_preempt, NULL, > + amdgpu_debugfs_ib_preempt, "%llu\n"); Are you sure this is ok? Do these devices need this additional "protection"? Do they have the problem that these macros were written for? Same for the other patches you just submitted here, I think you need to somehow "prove" that these changes are necessary, checkpatch isn't able to determine this all the time. thanks, greg k-h _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6889248551394607104 X-Received: by 2002:a25:e053:: with SMTP id x80mr1532885ybg.382.1604041835841; Fri, 30 Oct 2020 00:10:35 -0700 (PDT) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 2002:a25:a268:: with SMTP id b95ls2509189ybi.10.gmail; Fri, 30 Oct 2020 00:10:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhgg0vEzuK2YcbIWavn2kRCpSPwYxOJvgeMQmyq9MNli+6z0SIEWv+r3K9H0yJMnVos+x9 X-Received: by 2002:a25:e6d0:: with SMTP id d199mr1825023ybh.398.1604041834022; Fri, 30 Oct 2020 00:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604041834; cv=none; d=google.com; s=arc-20160816; b=nZxnosF2q0FlaNVn8+dyGd92NjaulAcDyFykaWnnQGRwIalRoFPsx9B8uIvUG1V4pz Zr+uB9iZlfqVUTEwd+pwUQrGRGyFUsGTdzy6yQKARYS/C0pw6C1jkmM+DOSbdNpuVxfX qvsQvvxLGX/IR2rAOJdzAZLQlRsXVVazucdaxHenAkPTAdd1gcdnd4CeMEAjiVsBRQCA WsbJHlAUnyhxSc7y88OsEFGXKU66mhV/AFWIvcXv/ONQ+X934UCUlLP3CzwnsGvwD753 bYEday4LhWv1141Fpo5dUacBx4NRqwwBNbBr/D0kpEUt7K/Ej3UencyYFUKY9TeWhXpX f3zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature; bh=qSGvMnq7wt5MrQXXO3LNSCv8hGR7UtSHkhjqrccTkYM=; b=cdOVeTZd+lluiRj6BAtR6pz/shEvj1O3pP5Hp+GMOmV5E2SZdAFHV4vv5OBfuCWBbq R+01r5ZV6Ao15Il9emDK0zIlRJW22T/KnXyynHSO5OGYZobyYm8Mfw4xrDULVjK+fL9t 72Nxjhi8uCcKcDCcLDod4c95V3ZEZ8G/pUBrg3d66Y2bVlM5ymH7JjO2GLKygM9qMivN K9y+VKgHGLcD/iYTvO341UDRNoZnml4A2GDhboYs+9DzTXDwFsHIxw+YSbQ1cdwlGshR wR517xaO7Rhu4iTL5ZfpDUJZd/v0YnDwmdz8hJdRL+S+NWOwY+Kr26B5GmKljJbPxqtn ssqw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wp8/hvRE"; spf=pass (google.com: domain of gregkh@linuxfoundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by gmr-mx.google.com with ESMTPS id r8si347994ybl.1.2020.10.30.00.10.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2020 00:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of gregkh@linuxfoundation.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wp8/hvRE"; spf=pass (google.com: domain of gregkh@linuxfoundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1665120723; Fri, 30 Oct 2020 07:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604041832; bh=6UZfI9KlukChYkAwmZBY+j32nu5aC1F84wLitkAFcHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wp8/hvRE/LfhJJ1P3TNOzq9lgzVnDlBRiSdLAl6MZXbf1TkKDHk95RR2Xjzd6+IUb tgKDQcRYbI6wWvk5mHsZThQB/1uDo+V8qIpoGs4X6ScEv9ONzxbN9egoDEZGb29nxz T8j3F0UclYetTTGfjJGzHyDJSfrpyLmCI0/UquMY= Date: Fri, 30 Oct 2020 08:11:20 +0100 From: Greg KH To: Deepak R Varma Cc: outreachy-kernel@googlegroups.com, Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, melissa.srw@gmail.com, daniel.vetter@ffwll.ch Subject: Re: [Outreachy kernel] [PATCH] drm/amdgpu: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() Message-ID: <20201030071120.GA1493629@kroah.com> References: <20201030032245.GA274478@my--box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201030032245.GA274478@my--box> On Fri, Oct 30, 2020 at 08:52:45AM +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 > --- > Please Note: This is a Outreachy project task patch. > > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > index 2d125b8b15ee..f076b1ba7319 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > @@ -1551,29 +1551,29 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(fops_ib_preempt, NULL, > - amdgpu_debugfs_ib_preempt, "%llu\n"); > +DEFINE_DEBUGFS_ATTRIBUTE(fops_ib_preempt, NULL, > + amdgpu_debugfs_ib_preempt, "%llu\n"); Are you sure this is ok? Do these devices need this additional "protection"? Do they have the problem that these macros were written for? Same for the other patches you just submitted here, I think you need to somehow "prove" that these changes are necessary, checkpatch isn't able to determine this all the time. thanks, greg k-h 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 X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDA8CC4741F for ; Fri, 30 Oct 2020 07:10:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4254F2151B for ; Fri, 30 Oct 2020 07:10:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wp8/hvRE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4254F2151B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 256296E957; Fri, 30 Oct 2020 07:10:34 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D4306E957; Fri, 30 Oct 2020 07:10:33 +0000 (UTC) Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1665120723; Fri, 30 Oct 2020 07:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604041832; bh=6UZfI9KlukChYkAwmZBY+j32nu5aC1F84wLitkAFcHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wp8/hvRE/LfhJJ1P3TNOzq9lgzVnDlBRiSdLAl6MZXbf1TkKDHk95RR2Xjzd6+IUb tgKDQcRYbI6wWvk5mHsZThQB/1uDo+V8qIpoGs4X6ScEv9ONzxbN9egoDEZGb29nxz T8j3F0UclYetTTGfjJGzHyDJSfrpyLmCI0/UquMY= Date: Fri, 30 Oct 2020 08:11:20 +0100 From: Greg KH To: Deepak R Varma Subject: Re: [Outreachy kernel] [PATCH] drm/amdgpu: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() Message-ID: <20201030071120.GA1493629@kroah.com> References: <20201030032245.GA274478@my--box> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201030032245.GA274478@my--box> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, melissa.srw@gmail.com, outreachy-kernel@googlegroups.com, dri-devel@lists.freedesktop.org, Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Oct 30, 2020 at 08:52:45AM +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 > --- > Please Note: This is a Outreachy project task patch. > > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > index 2d125b8b15ee..f076b1ba7319 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c > @@ -1551,29 +1551,29 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(fops_ib_preempt, NULL, > - amdgpu_debugfs_ib_preempt, "%llu\n"); > +DEFINE_DEBUGFS_ATTRIBUTE(fops_ib_preempt, NULL, > + amdgpu_debugfs_ib_preempt, "%llu\n"); Are you sure this is ok? Do these devices need this additional "protection"? Do they have the problem that these macros were written for? Same for the other patches you just submitted here, I think you need to somehow "prove" that these changes are necessary, checkpatch isn't able to determine this all the time. thanks, greg k-h _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel