Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp636931ybx; Wed, 30 Oct 2019 02:35:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiw24TDmDl5m2WdyCUqSMERkclwF8zZ4Uakc2j4uDH5REhh81bEbTfI/vJEfvVyEVDhz70 X-Received: by 2002:a17:906:4b16:: with SMTP id y22mr8015526eju.56.1572428109014; Wed, 30 Oct 2019 02:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572428109; cv=none; d=google.com; s=arc-20160816; b=qd7wUctXs1uphCVufCKXHZXqZbggSanEbL8Tg+SpsAdVRG0ASIKbMgft9JD++Ktzv2 mqycpL4cDEI4S2s05AJbCVyYYx5l5H4h1CHJCTKfURMwUVlyGeFyxds14GVMealtViIs h2xTyL3eXsfpOVF6oGZuqIlG6EkoKyjD+4Qusns0yQDlcENbBYzPzmR6+5d0y6kfQ0LS GNRLn2LOj0oMWK859b8G5TVtzwq/ukThgQiSqq1JI384APYMnE4hUMINSoLvkjnozGAC UN0O6nMnf1sisNJurdNScOYt41jJch7o4vJ3uOvx4MdGPtbsp4R6/bFfcp2tL+CZrpRP wb+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=V5jFI+IsMgOCUNSyar78nJpmanOh3i3X5Fk/t58WuTM=; b=C7ijItVmcAVj3JTAiaob08YVZx2zzldqU10YUaFDuS8nCmLBjhoj8RJkjQEHoeVYr3 Q++AMhHKSHfeWcKh96Kim+vi7lxX/F57QfXk14xHsdRnkawapI8gOQ+H/cMsmGX+Iqs+ TKjh3/9pNAtIL8V3Bj3G9FSd05RL1K6v6BAmsiVAKmJTAbq+q6h1MfJTIUv0Se9nlNi+ JMAbIk2hyZxU/n7vLYj5A573A5p+Ox8YzgYrvq2DKZcorSUG/HEnaHT+WdTA2wW24zjU w1P3a5PAYDmCTlEZ+4bo4hSPkM4shxiGE157q5xtnhZ6jCnbgxOJVXh245Bk99LRuQ+S bLpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi5si1206748edb.68.2019.10.30.02.34.45; Wed, 30 Oct 2019 02:35:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726435AbfJ3JdX (ORCPT + 99 others); Wed, 30 Oct 2019 05:33:23 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:49820 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726028AbfJ3JdW (ORCPT ); Wed, 30 Oct 2019 05:33:22 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A67A73E0A51CECA0DC52; Wed, 30 Oct 2019 17:33:20 +0800 (CST) Received: from [127.0.0.1] (10.133.219.218) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Wed, 30 Oct 2019 17:33:14 +0800 Message-ID: <5DB958DA.7080305@huawei.com> Date: Wed, 30 Oct 2019 17:33:14 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Ardelean, Alexandru" CC: "jic23@kernel.org" , "Popa, Stefan Serban" , "Hennerich, Michael" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops References: <1572423581-59762-1-git-send-email-zhongjiang@huawei.com> <1572423581-59762-2-git-send-email-zhongjiang@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.219.218] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/30 17:13, Ardelean, Alexandru wrote: > On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote: >> [External] >> >> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file >> operation rather than DEFINE_SIMPLE_ATTRIBUTE. > Not sure if "more clear" is the word. Should be more clearly. :-) > But it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they are > debugfs attrs. > > In any case, this is no big deal. > So: > > Reviewed-by: Alexandru Ardelean > >> Signed-off-by: zhong jiang >> --- >> drivers/iio/imu/adis16460.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c >> index 6aed9e8..2e7a582 100644 >> --- a/drivers/iio/imu/adis16460.c >> +++ b/drivers/iio/imu/adis16460.c >> @@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void *arg, u64 >> *val) >> >> return 0; >> } >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops, >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops, >> adis16460_show_serial_number, NULL, "0x%.4llx\n"); >> >> static int adis16460_show_product_id(void *arg, u64 *val) >> @@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg, u64 >> *val) >> >> return 0; >> } >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops, >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops, >> adis16460_show_product_id, NULL, "%llu\n"); >> >> static int adis16460_show_flash_count(void *arg, u64 *val) >> @@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void *arg, u64 >> *val) >> >> return 0; >> } >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops, >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops, >> adis16460_show_flash_count, NULL, "%lld\n"); >> >> static int adis16460_debugfs_init(struct iio_dev *indio_dev)