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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E07AAC2B9F8 for ; Tue, 25 May 2021 16:07:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3D1F61378 for ; Tue, 25 May 2021 16:07:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233312AbhEYQIh (ORCPT ); Tue, 25 May 2021 12:08:37 -0400 Received: from ale.deltatee.com ([204.191.154.188]:38082 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231810AbhEYQIg (ORCPT ); Tue, 25 May 2021 12:08:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=bMSykNOnDrSLzZd4YGTT1jegBxJN7hV+lKNP/+EU6Bs=; b=ZV7bE1VoOTfh29nV8f+IWLNpHH 7NBxywppA1+TujQvojfjR3FJK56qyxhztVFSBHJx5GkV7FM0enFX/sxYSHAm5gA+uJjZsPiihHtCe AFXZ1PLt40YXMQdzeC32y6fooeFW+T3m6s/O87jvrHqniT+BGrB2XlrAzli6jlAe22wDuQKo/ZwKs judkqf+JR9srivAIre9jhdfLWL1ZgT+B91fMeGoRB4Yw4RyLaawR0KLrlim+PJy4QXHN4f6tj06kM 02SOkyvXhxFXo2VJEzJo019qja42QH12MVG6M2YWtItfunnA0rlBkt88VQCFwqxPGCfc/ZnbKHRiv uS9uvuog==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.92) (envelope-from ) id 1llZaD-00067f-9u; Tue, 25 May 2021 10:07:06 -0600 To: =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Bjorn Helgaas Cc: Bjorn Helgaas , Joe Perches , Oliver O'Halloran , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Tyrel Datwyler , Russell Currey , Kurt Schwemmer , Vidya Sagar , Xiongfeng Wang , linux-pci@vger.kernel.org References: <20210524211430.GA1123248@bjorn-Precision-5520> <20210524211934.GA1124194@bjorn-Precision-5520> <20210525103257.GB48588@rocinante.localdomain> From: Logan Gunthorpe Message-ID: Date: Tue, 25 May 2021 10:07:00 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210525103257.GB48588@rocinante.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-pci@vger.kernel.org, wangxiongfeng2@huawei.com, vidyas@nvidia.com, kurt.schwemmer@microsemi.com, ruscur@russell.cc, tyreld@linux.ibm.com, paulus@samba.org, benh@kernel.crashing.org, mpe@ellerman.id.au, oohall@gmail.com, joe@perches.com, bhelgaas@google.com, helgaas@kernel.org, kw@linux.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH v3 03/14] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 2021-05-25 4:32 a.m., Krzysztof WilczyƄski wrote: > Hi Bjorn, > > [...] >>> I really like this, but I would like it even better if the >>> sysfs_emit() change were easier to review. >>> >>> It seems pointless that the current code uses strlen() when >>> scnprintf() and dsm_label_utf16s_to_utf8s() both have that >>> information and we just throw it away. >>> >>> I think it should be possible to split the len and >>> dsm_label_utf16s_to_utf8s() changes to a separate patch, which would >>> remove the need for the strlen, and then the conversion to >>> sysfs_emit() would be completely trivial like all the rest of them. >>> >>> My goal is to make all the sysfs_emit() changes look almost >>> mechanical, with the non-trivial parts separated out. >> >> And BTW, when all the sysfs_emit() changes are trivial like that, I >> would probably squash them all into one patch that converts all of >> drivers/pci/ at once. >> >> That would still leave a few separate patches: >> >> - This dsm_label_utf16s_to_utf8s() change >> - The resource_alignment newline change >> - The devspec_show newline change >> - The driver_override change > > Got it! I will send v4 updated as per the above suggestion. Also, if > Logan does not mind, I will carry his "Reviewed-by" over as there will > be no changes to the actual code, just how the patch will be arranged. Yup, I'm good with that. Still looks fine by me. Logan