Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1648636pxb; Wed, 9 Feb 2022 01:08:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN1GkcuAw9zIbAWzDwzLKD4apbtTLyM3bAWbFDx1wMGnAq74F896rhr7Afee3KqR3yKZak X-Received: by 2002:a17:902:b692:: with SMTP id c18mr1151827pls.51.1644397712042; Wed, 09 Feb 2022 01:08:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644397712; cv=pass; d=google.com; s=arc-20160816; b=GTBuwQO/EV4erB9cYBPzlM75DcSliIcXSCcBO5UNq3cYT4t+sts7oHd3VcwLAO3XB3 N+NPkUyq3boVSaFj4RIv+tXN0YRZHg8CJPUNBQ4fJ90YAvURam4HLMJQPCVvUAdkIBpe joGb4n45KzVH1On4z11GPNI1QIHxaDfo1FqM1myIqIFVQqlXelXLC5d6PmP2szemh/mu 9VSYghd1ZwTWF+LGv3kd2sDQwUKg9J4X5cjEZP755Z9UnG6OjrxJsqtliftmdo8ehxF3 9HgHwAKkCxI2BcbjnkEV+09S1Qs9apuhAq9ZP0BM5BMvKdII/dq/boBcqqCC4INXnwAx snjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=Fd1dN+H9VpLs2Rn96C0ylDOWq0q9ugp5pJzIMQqGhXc=; b=xGxz33yCBBdZSHO8at/s+2S/RhhYzQxGq5Td5vPiNm+bj8BCHu6XHyWWxiFYnEP/dh 8L9LsTvhXygnfC3XLl1FM1X5xgiL8NSJvyXbZKax5yhMb71Ri8yiWVuplET8NMTvH5xb 3S8qEVkdfCGhySULfNEbLqS45Umj84PhK3g7YU7WEMpLoajDbf3UT/UHhyVYDYgOfVZf FRasObEMdr3bUWooP8GR2+QVWGl8NFkWMr8EcrZC0NEjqyuKzDxIYuPAVvTyaZQXYQL/ NZTlkgrqiWAFgSN0TQ8A0nt8IwTwvtORlQHWEZ/DmdlZ9kLlwxiqUtY3JCxUM2Mv7prM M3uw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zohomail.com header.s=zm2020 header.b=Z0bAkZa1; arc=pass (i=1 spf=pass spfdomain=zohomail.com dkim=pass dkdomain=zohomail.com dmarc=pass fromdomain=zohomail.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zohomail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j3si17047554plr.585.2022.02.09.01.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@zohomail.com header.s=zm2020 header.b=Z0bAkZa1; arc=pass (i=1 spf=pass spfdomain=zohomail.com dkim=pass dkdomain=zohomail.com dmarc=pass fromdomain=zohomail.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zohomail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E07E0E019D05; Wed, 9 Feb 2022 00:51:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345064AbiBHEUa (ORCPT + 99 others); Mon, 7 Feb 2022 23:20:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233749AbiBHEU2 (ORCPT ); Mon, 7 Feb 2022 23:20:28 -0500 Received: from sender4-pp-o95.zoho.com (sender4-pp-o95.zoho.com [136.143.188.95]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19FF1C0401DC; Mon, 7 Feb 2022 20:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644294016; cv=none; d=zohomail.com; s=zohoarc; b=A/gZ4I2W1aFDF/7HB6EFQWWvauCeg2zwErlsABsQdO7YXK3o6iwT75rOn9X6Jm3sz5eMhqmxEBxlBhref12Eb/REUm34PTohaSUjrhVUKQb6qJ3knwZhWihN/ryZGsjUko2fUBz6IgSMjMwSJ1Tf7yp6BXbopmZF9jbcobGHtEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644294016; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Fd1dN+H9VpLs2Rn96C0ylDOWq0q9ugp5pJzIMQqGhXc=; b=UCxIu+4iZdjV7OXZLMc/pMjWN7GvUcVk9cqQoM/ncGf+fHY6DBxO8mGvtRwPF4SUrhKUI/JRCJLirNKnajGufAneWwbnbkYnMQz2Hx9btOiG/WF2fdkMRxotVEkeXYV1/L6UDIiIqlPLQdvfMz3NeqtaLbkpbcbmkS9+4S5iiIU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zohomail.com; spf=pass smtp.mailfrom=lchen.firstlove@zohomail.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1644294016; s=zm2020; d=zohomail.com; i=lchen.firstlove@zohomail.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=Fd1dN+H9VpLs2Rn96C0ylDOWq0q9ugp5pJzIMQqGhXc=; b=Z0bAkZa11QHSnDBoKchxvwAKwUtv30GQ7YYOZyf9jOOXhEqcXifJk9OfpEZD2mdH cLYmhP0qsH98apYNmyHFh3j3IpCAyJDHBon/KHo5/SdQuY46YjNv5G5MlsSOvaw6luE ADiPnpnTGMYA24Cn18X508G+QwRa90rb5aoEKu9w= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1644294015113890.2803542207891; Mon, 7 Feb 2022 20:20:15 -0800 (PST) Received: from [45.80.185.188] by mail.zoho.com with HTTP;Mon, 7 Feb 2022 20:20:15 -0800 (PST) Date: Mon, 07 Feb 2022 23:20:15 -0500 From: Li Chen To: "Bjorn Helgaas" Cc: "Greg Kroah-Hartman" , "Kishon Vijay Abraham I" , "Lorenzo Pieralisi" , =?UTF-8?Q?=22Krzysztof_Wilczy=C5=84ski=22?= , "Arnd Bergmann" , "Bjorn Helgaas" , "linux-pci" , "linux-kernel" Message-ID: <17ed78f886f.d22c200668349.8594449941761827257@zohomail.com> In-Reply-To: <20220207175613.GA404082@bhelgaas> References: <20220207175613.GA404082@bhelgaas> Subject: Re: [PATCH V6] misc: pci_endpoint_test: simplify endpoint test read and write operations MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ---- On Mon, 07 Feb 2022 12:56:13 -0500 Bjorn Helgaas wrote ---- > On Mon, Feb 07, 2022 at 04:09:05AM -0500, Li Chen wrote: > > From: Li Chen > > > > Introduce pci_endpoint_epf_transfer_data to simplify > > read and write operations. > > > > Also tabify this file. > > Thanks for the patch. > > This doesn't apply cleanly on v5.17-rc1. Please make it apply cleanly > there or at least mention where it *does* apply. Ok, will send v7 which will be based on v5.17-rc3. > > Please separate the whitespace tabification changes and the > pci_endpoint_epf_transfer_data() changes into two separate patches. > When they're mixed together, it's harder to review the patch. > > > #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \ > > - miscdev) > > + miscdev) > > Always indent with tabs when possible: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=v5.16#n18 > > Hmm, coding-style.rst is unfortunately not very explicit about that. > > But it's obvious from the existing code in this file that things > should not be indented four spaces, as you did in > pci_endpoint_test_transfer_data(). So, can I say space is not allowed in indentation? If so, I should not use emacs's tabify, because it will not convert 4 space to 8-width tab. I'm also not sure is scripts/Lindent or clang-format is a good choice here, they do too much changes. > > Your patch should match the style of the existing code. > > > +static bool pci_endpoint_test_transfer_data(struct pci_endpoint_test *test, > > + unsigned long arg, const int operation) > > +{ > > + struct pci_endpoint_test_xfer_param param; > > + bool ret = false; > > + u32 flags = 0; > > > > + // if we ask rc to write to ep, then ep should do read operation, and vice versa. > > Please use /* */ comments to match the prevailing kernel comment > style: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=v5.16#n598 > > And spell out or at least capitalize "RC" and "EP" since they're not > real words. > Thanks, will do it in v7. > Bjorn > Regards, Li