Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1969652ybj; Wed, 6 May 2020 08:24:40 -0700 (PDT) X-Google-Smtp-Source: APiQypLFftyEzxdYeFAxFf0ucaTjiM0wx24CSlicOeYGbQW0IplZ4tMqNTYLoJvmJYMgXYHwLaJs X-Received: by 2002:aa7:d342:: with SMTP id m2mr7645236edr.341.1588778680050; Wed, 06 May 2020 08:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588778680; cv=none; d=google.com; s=arc-20160816; b=Crw7gFJOWyj6HMYh6usdljKOcfi61N56bB6brkVfs1ueZ600E0YOmsWozy1y3/MqjU TLNlUcviFc9ShlgAWXKFnvsfX0Y60cwCKSfK/49qZ45gI+xcOAU5m0Xtl8QQnC4se/+m kdjGj08DzNm/6WiUMwFFSVf72tu5lM8XC8PFzThQrWs3EqSGtSbACVdXAabV7OtdaIKT GRw8uLRFMUYnLoj+NngspCdH5uDS6364iwaS45tSz9DSJrQFMhtxz6y7goxbbsLsZJXh BBeWSjKlpdU4EgCVg8xdtV2RVsYIO0O5KmwTjSTwaM/uSw52j1rtar6geegHksALlPkm 4Stg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kNCWdV8/+AGjtP2p3WK+9hU4Ae/O6HF9eIpblfnc1AM=; b=Woah+7y9qnq6JRwwajLBuv72gXPi4Gs97+NfZ5AYHm3DrF4mP4iUAtDJ/GqFLoBoja M4yberYN5aS/TnlEqp4lj8z+GRwMGWki3rmJi7BmtQH8l0vRLdFEj1m84IA09o+ORlKN p8DiiCW0F23AWVwVHZnTBmE2fNCMA2fWfqko97141Vwr+x7GwLSq/xqTeyqAtfpqDobc SOKIoFHzA36/T4AJCERZ0hBQfp58s8njPjWFtoCtiPuKbytMCHyQg/8tUVQbq24a2eOK umXq4z1Y8WCkTjmM0dsg0YvD9el59veovVKdTCRVxQfnzB7Fa163ufJ5Hz+hhDDUaD74 kXRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QfcNm0Kp; 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 e21si1229123edq.508.2020.05.06.08.24.16; Wed, 06 May 2020 08:24:40 -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=QfcNm0Kp; 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 S1729556AbgEFPWW (ORCPT + 99 others); Wed, 6 May 2020 11:22:22 -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