Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Li Chen <lchen.firstlove@zohomail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kishon Vijay Abraham I" <kishon@ti.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"\"Krzysztof Wilczyński\"" <kw@linux.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci <linux-pci@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V6] misc: pci_endpoint_test: simplify endpoint test read and write operations
Date: Mon, 7 Feb 2022 11:56:13 -0600	[thread overview]
Message-ID: <20220207175613.GA404082@bhelgaas> (raw)
In-Reply-To: <17ed3719e68.113a2df6350634.5087699168706664746@zohomail.com>

On Mon, Feb 07, 2022 at 04:09:05AM -0500, Li Chen wrote:
> From: Li Chen <lchen@ambarella.com>
> 
> 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.

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().

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.

Bjorn

  reply	other threads:[~2022-02-07 18:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 10:11 [PATCH V3] misc: pci_endpoint_test: simplify endpoint test read and write operations Li Chen
2022-01-20 11:57 ` Greg Kroah-Hartman
2022-01-20 12:48   ` Li Chen
2022-01-20 12:47 ` [PATCH V4] " Li Chen
2022-01-26 18:07   ` Greg Kroah-Hartman
2022-02-07  8:42     ` [PATCH V5] " Li Chen
2022-02-07  9:09       ` [PATCH V6] " Li Chen
2022-02-07 17:56         ` Bjorn Helgaas [this message]
2022-02-08  4:20           ` Li Chen
2022-02-08 15:21             ` Bjorn Helgaas
2022-02-09  2:42               ` Li Chen
2022-02-09  2:49               ` [PATCH V7] " Li Chen
2022-05-11 16:52                 ` Lorenzo Pieralisi
2022-05-12 14:07                   ` Kishon Vijay Abraham I

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207175613.GA404082@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=lchen.firstlove@zohomail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox