Received: by 10.213.65.68 with SMTP id h4csp527309imn; Tue, 13 Mar 2018 11:55:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELuEcCIzkbvQWj4F1MCkrUrWbV+q2sCrulOrwEuY2+SQ+2H+A3Swebl9pUN+tUSXMo0hLufz X-Received: by 10.99.121.131 with SMTP id u125mr1311388pgc.263.1520967316376; Tue, 13 Mar 2018 11:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520967316; cv=none; d=google.com; s=arc-20160816; b=eNEsrB7xkLpz98HIgMGlgyyGnl0xrLYIV9pIskPUMI4Cd7+nQKvsGV/QtrnOxXf0vo omBQKns5lOsJsKXZjPJWi2H2XB6PQeAiLFIySA0ySKFUZhA7jJxHhvpTiKXeJOhrqsrU dcBpLB28vpyScTIc0XtUeDp3UbOls2CgB7sF3MHL7DLJ1y9Qd1ryN9BWmj2m0NPppinX XW5oAKRYl43g8bzMVvqAPr8ib2Z7LcKmEyJCyKzenmJmpB/OYfCI3wa388rnV8JQd1gC APNIafIeHoizfZCMJUSsmvJg9JkUy1QcZzNLw8TxuHr+EE6hC1WSU3A7VeBh+ZgvXaci f1Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=yceX+H8EJV3/ak2+UlrX00oyE/avQszfk05lVu+DZyw=; b=xkRn9NHJ9/sUvm5xOSnEfs9knZKqytAvFJrNg6/FFOzIIZTo/TLAe1LuhPDAF6w/6G LNyp29vZIu64T+6mevuYf0IyxrTKVaFqCR4In+QThh/HEf6dvemjIR5MTIdh1ibU2FDg W4ENsPiu+erDCbafi7JFzG4/C7q3ZqvfpafJ4weh8ypQRBEfY8Tf4CkBaJX8yi4RmVZ+ Efcqx+qCunv1gsv/edZEQKbXQRtJcHeM935mRL+wzE6KBJIRPdvG33veAQzHWVMBhNDK /nJw7hOniy5Rnbf0LbXLESqJLgn2u0sGB4IKssDOHiZ3Qo2iXKdpR/L93XVTLMNJykz+ A9HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=E+fC8z6k; 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 k3si579533pff.82.2018.03.13.11.55.01; Tue, 13 Mar 2018 11:55:16 -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; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=E+fC8z6k; 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 S1752515AbeCMSyK (ORCPT + 99 others); Tue, 13 Mar 2018 14:54:10 -0400 Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54]:58912 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751606AbeCMSyI (ORCPT ); Tue, 13 Mar 2018 14:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yceX+H8EJV3/ak2+UlrX00oyE/avQszfk05lVu+DZyw=; b=E+fC8z6kvnGqvsB9YSB7yz5EhMYOR1aUp3RgQ6u9K0vAT6TpfWCbdakuIoDdwLX4AQozNFHOJB0bMd4xbY76nj3EmH2fcToH6DERnzRxnOS2WPE3DhjkmpiGbK6goHDC3xIpwElSJ6rVLatqt74IjPZHs0283rLVua2OqC7h/Tg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.109.62] (165.204.78.1) by SN1PR12MB0702.namprd12.prod.outlook.com (2a01:111:e400:c42a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Tue, 13 Mar 2018 18:54:05 +0000 Subject: Re: [PATCH v2 1/5] iommu/amd - Add debugfs support To: Andy Shevchenko Cc: iommu@lists.linux-foundation.org, Joerg Roedel , Linux Kernel Mailing List References: <152055660594.63229.5131049527614494130.stgit@sosxen2.amd.com> <152055664720.63229.16209149030018336339.stgit@sosxen2.amd.com> From: Gary R Hook Message-ID: <30bd9559-0e44-bd18-6b9a-ec35bc8276f3@amd.com> Date: Tue, 13 Mar 2018 13:54:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR08CA0047.namprd08.prod.outlook.com (2603:10b6:300:c0::21) To SN1PR12MB0702.namprd12.prod.outlook.com (2a01:111:e400:c42a::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 81d43744-021d-4bb6-4f6f-08d58913cbec X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:SN1PR12MB0702; X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0702;3:tMIZU+0nDm/0/qBffNt8rhLGW3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cgEMe83nkVliqFH0yMdotNRkMnGun1JFoCMpoEHt5fIi/k9Lxg7rh6KjATTfwL8gFEeGjFa64Z9GGc2d9pgcXiHaNlQo/92QY0h6iNqfswGFAt3ajd6LxpSTVjL8+zfF8ufmpwEwgyP3ecZLGtqFIhCItv5+jGce0jehJ/tqoXCbt++ytlGiPe4LeMlGcmBIOcd0siUWloW1uUwmgv+DMTNHCwQ9r3WxXHHw6PLCyFrCybeviXhdOP1QdSecwUA0UkKIeBWdF4DZf9rLIpR3vDiTTGW11EfmmhfLrWzI2f6L+zD52IFougLWFheEhWvk4MtDO+//Dt;4:ygaqRdfK2MKSN2k5qB5YQ8NVd38eXtNQ67LcBFsNJonyYQ+uhNBQXdSxxS9mTsFyWEPFWVym95/m0IkOOR/3NZcrCUIC66neSsiWjGZ6RkerrQV8CED4Zqk+KG4lb80mFPdRBzyL/me0IwIWV5CbUUtNO7/vswgNEiQ9gH0FRmg+BBiDKDKyjUg2mBFt0EZSC80Kc+YwH/nbV0TSYcjRDz2KUDyYP+GRyXUEQoaPpFpo6jf+OGdoYX9K3aynmeEgGtSRzHNpXg+Zjer1Yp0drFf9Aec4A32KzCyCndgp3izQlt8E9wPdMYgOQTQK5VPo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231221)(944501244)(52105095)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:SN1PR12MB0702;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0702; X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39380400002)(346002)(396003)(39860400002)(376002)(366004)(189003)(199004)(54906003)(6116002)(59450400001)(64126003)(67846002)(31686004)(16576012)(186003)(386003)(6246003)(65806001)(77096007)(76176011)(2906002)(2486003)(4326008)(6306002)(53936002)(966005)(25786009)(53546011)(106356001)(86362001)(66066001)(3846002)(26005)(65956001)(52146003)(23676004)(47776003)(58126008)(68736007)(39060400002)(229853002)(52116002)(36756003)(31696002)(230700001)(478600001)(7736002)(6916009)(2950100002)(6666003)(316002)(16526019)(8936002)(81166006)(81156014)(8676002)(50466002)(105586002)(65826007)(72206003)(5660300001)(6486002)(305945005)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0702;H:[10.236.109.62];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwNzAyOzIzOlIweTV2aXQ0WTUvd01PeUQ1OSs1QUFMbTM3?= =?utf-8?B?ZlZqMnB4NVdJV05ORzJCUnA5OWFDQUp6L0FFUjduNnB6b3NRbnMzM2tZVm16?= =?utf-8?B?UU9ocTZKTFYvTUVwaU4xYlZDL1EzOXd2SEJON242aUx1MkxheUN0ZU1pVW90?= =?utf-8?B?aGhjRmI2UTBnRmRNZzBzZHlYaDc3REcrNDE0dHJ6TFFxKzMzKzVzWUdYNGVM?= =?utf-8?B?TFEzZXJXQ2FRSTZuWUw0MVN4NmppUG9mMHlYKzRtRjQ0clZzMnhPY2NTN3RQ?= =?utf-8?B?WGlGbFVVMVNvcGF6MzRJTmo1bW9xZ0g3T1pKM1ZVdDhVa2c1K2xxQWhVQU9Z?= =?utf-8?B?Q2Z2TllQa2RUcW51UlkvdUxKZTBTSksyNGpKNTZvYnlocmNRci9waDJHSERJ?= =?utf-8?B?NXFBTVhrUUZpeDBqbHZvL25taVJjT1hGOXVQK1NsRU90ZXRvYWIvMDZtUW9K?= =?utf-8?B?TTRqcll4T3RjUUlvNHNYdmE4MTJFUlpNOG0xRmRzNDd6bDh0bC9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qxqNScnsfiPtQf1MaWb1ZjyXfQD+QGPDn6POOi1gRd3pvyU9B32E27qKMWsFc7OaBoWosWss X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 18:54:05.4563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81d43744-021d-4bb6-4f6f-08d58913cbec X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0702 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13/2018 12:16 PM, Andy Shevchenko wrote: > On Fri, Mar 9, 2018 at 2:50 AM, Gary R Hook wrote: > >> + default n > > Redundant Roger that. >> +#include >> +#include >> +#include > > Keep in order? What order would that be? These few needed files are listed in the same order as which they appear in amd_iommu.c. I'm gonna need a preference spelled out, please (and a rationale, so I may better understand). >> +#include "amd_iommu_proto.h" >> +#include "amd_iommu_types.h" > >> +/* DebugFS helpers */ >> +#define OBUFP (obuf + oboff) >> +#define OBUFLEN obuflen >> +#define OBUFSPC (OBUFLEN - oboff) >> +#define OSCNPRINTF(fmt, ...) \ >> + scnprintf(OBUFP, OBUFSPC, fmt, ## __VA_ARGS__) > > I don't see any advantages of this. Other way around, they will simple > makes things hard to read an understand in place. I used this technique in the CCP driver code (where it was accepted), in an effort to do the opposite of what you claim: make the code more readable. Given the 80 column limit, a large number of arguments, and very long statements, IMO something needs to give. I don't find the use of #defines to be obfuscating. I'm not trying to argue, but rather simply state the perspective / reasoning I used to create a source file I feel is manageable. I have 17 more iommu patches built upon this strategy, and this seems to be advantageous for all of them. > > >> + for (i = start ; i <= end ; i++) > > Missed {} Wasn't sure about the M.O. given that the body of this loop is a single if statement. And I don't see anywhere in https://www.kernel.org/doc/html/latest/process/coding-style.html in section 3.1 where curly braces are called for in this situation. May I ask for clarification on the style rule, please? > >> + if ((amd_iommu_dev_table[i].data[0] ^ 0x3) >> + || amd_iommu_dev_table[i].data[1]) >> + n++; >> + return n; >> +} > >> + >> +static ssize_t amd_iommu_debugfs_dtecount_read(struct file *filp, >> + char __user *ubuf, >> + size_t count, loff_t *offp) >> +{ >> + struct amd_iommu *iommu = filp->private_data; > >> + unsigned int obuflen = 512; > > Sounds like way too much. I can tune these up. > >> + if (!iommu) >> + return 0; > > When this possible? It was intended as a sanity check, but if this happens, much worse has already gone wrong. I'll remove. > >> + obuf = kmalloc(OBUFLEN, GFP_KERNEL); >> + if (!obuf) >> + return -ENOMEM; >> + >> + n = amd_iommu_count_valid_dtes(0, 0xFFFF); >> + oboff += OSCNPRINTF("%d\n", n); > >> + return ret; >> +} > > >> @@ -89,6 +89,7 @@ >> #define ACPI_DEVFLAG_ATSDIS 0x10000000 >> >> #define LOOP_TIMEOUT 100000 >> + >> /* >> * ACPI table definitions >> * > > Doesn't belong to the patch. I'm sorry, I don't understand. The added blank line doesn't belong to the patch? > >> +#endif >> + >> + > > Extra unneeded line. > Thanks,