Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1055162pxx; Fri, 30 Oct 2020 00:12:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtXb1XmViJCHoTmtGvWTZocNaEW8DogcTDwkudQrqXpZvOTsypeZtXg+muuwlWbU39cggf X-Received: by 2002:a50:f0c5:: with SMTP id a5mr820966edm.91.1604041973234; Fri, 30 Oct 2020 00:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604041973; cv=none; d=google.com; s=arc-20160816; b=uT8pV5Hg1BQpKq4Y3CZCuReAtrIH4sDs/sSVEzYSiDDICRnPrAMXyquPhMzvEZSmCg JgrrZlyw65UfF/WHA7IkL5sRT7dMaXlU4urS0lIZJkXfvacAe1ohCD9qd3J9tNweEfHc ez4zGeBc7Wn3xVzjUinOYZeWU+FqU+PaFdSvrGWs52PeHspQGutCW3yDtAy6zFok941v Xo42C8jgqr93+j9gy5Py5mQS4sQy+Je9E8kk7HWPLxurr2bitg6TlWIjr5PPa/dS/h3q xwt5qnSo4nFAD0fMSblFRPGB72YAa5l8NbTPfB+EegJNN6DSnKMHkbiU9z4s7+3k/F6Z ZOLA== 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=qSGvMnq7wt5MrQXXO3LNSCv8hGR7UtSHkhjqrccTkYM=; b=DPQJyZJ8fJdfcHg0bw7swFaqyVUI/Vv22Pf5/9p4LOKKZOZzZg8OzulSCirH2qWlTt qmzNnb4KXiqFdZBN0vWxzvjrksIWkA1SnKVMnZ3XcQeqIzroDHUJYOTKIFFF2RxRcJCN YT3ulM1qwV3ZgMra1TcQKpJ6YT7eGD2Zwd3wA/4l1qGZm34RwHTd6qXiqNFnFyaFVveN CZLLujdMFeftuN8AiIWqf5xCEVZSNOUZlV6eLTWZhKliVL5A+V8hEVWWjESEXQ7gEr18 Zu7qJfQFA5HBGY9k1CQZXARU7c8UqTMzckNZHerrhPT+TwUZjVo2WHB7euKe8MVzVaYR Cjfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wp8/hvRE"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si224523edl.447.2020.10.30.00.12.30; Fri, 30 Oct 2020 00:12:53 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="wp8/hvRE"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbgJ3HKd (ORCPT + 99 others); Fri, 30 Oct 2020 03:10:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:44726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgJ3HKd (ORCPT ); Fri, 30 Oct 2020 03:10:33 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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