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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 13BE8C4724C for ; Wed, 6 May 2020 15:22:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E421F2080D for ; Wed, 6 May 2020 15:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778548; bh=+pE8sGvSzhyzM1lmu2Si50vS5WEGHwFn5xiL0d50HMU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=buQ3I9G48keCtHDOyb7bZjgUcMIDsq+U1SGF/uJGchajUXyx+VZLsFawhDIBcAuvd Nbl7c21oVcOtp4c6ef4pNfRf7ubHBPBA+s0kUd4rHEtlI9Nq97Q5wiOeqBgEBY9KOk KVi2p7zWLUR84C7MzjVFLYEBfl8ErLGYjdRMzfv8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729560AbgEFPWX (ORCPT ); Wed, 6 May 2020 11:22:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:35962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729403AbgEFPWV (ORCPT ); Wed, 6 May 2020 11:22:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F2EC6214D8; Wed, 6 May 2020 15:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588778540; bh=+pE8sGvSzhyzM1lmu2Si50vS5WEGHwFn5xiL0d50HMU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QfcNm0KpE/RtsiDqfDC8DOAWU86AMBX+DLRnNIy0jsPDWYLPOsRbP+Q1io4uXbRAf 0fJ3/8DRIsu5k6XLpH3O7giw5QGxPF6IYE4ufTAeV+SnpMKLQqcPiggoQH7S1VV8PY S5VM95W/t0cxh9hCocfsUznQxCprtFM5fax2gZys= Date: Wed, 6 May 2020 17:22:18 +0200 From: Greg KH To: Aishwarya Ramakrishnan Cc: Dmitry Torokhov , Andy Shevchenko , Marco Felsch , Ondrej Jirman , =?iso-8859-1?Q?Myl=E8ne?= Josserand , Philipp Zabel , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: edt-ft5x06: Use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops Message-ID: <20200506152218.GA3447721@kroah.com> References: <20200505153325.20113-1-aishwaryarj100@gmail.com> <20200506150623.3841-1-raishwar@visteon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200506150623.3841-1-raishwar@visteon.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 06, 2020 at 08:36:22PM +0530, Aishwarya Ramakrishnan wrote: > From: Aishwarya Ramakrishnan > > On Tue, May 5, 2020 at 11:49 PM Greg Kroah-Hartman wrote: > > On Tue, May 05, 2020 at 09:03:24PM +0530, Aishwarya Ramakrishnan wrote: > >> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file > >> operation rather than DEFINE_SIMPLE_ATTRIBUTE. > > > No it is not, why do you think so? > > This change is suggested by Coccinelle software. > Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Not a good thing, I do not know why that was added :( > > The two defines do different things, that is why we have 2 different > > defines. You can not just replace one with the other without > > understanding why one was used and not the other one. > > > Did you test this change to verify that everything still works > > properly? Why is it needed to be changed at all? > > DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() > imposes some significant overhead as compared to > DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). What kind of overhead? Is it required? > But I missed to use debugfs_create_file_unsafe() function in the patch. Yeah, don't use the unsafe stuff unless you know what is happening here please. greg k-h