linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Petr Tesarik <petrtesarik@huaweicloud.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Juergen Gross <jgross@suse.com>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Christoph Hellwig <hch@lst.de>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Kees Cook <keescook@chromium.org>,
	Saravana Kannan <saravanak@google.com>,
	"moderated list:XEN HYPERVISOR ARM"
	<xen-devel@lists.xenproject.org>,
	"moderated list:ARM PORT" <linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	"open list:XEN SWIOTLB SUBSYSTEM" <iommu@lists.linux.dev>,
	Roberto Sassu <roberto.sassu@huaweicloud.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	petr@tesarici.cz
Subject: Re: [PATCH v3 1/7] swiotlb: make io_tlb_default_mem local to swiotlb.c
Date: Tue, 27 Jun 2023 12:24:24 +0200	[thread overview]
Message-ID: <2023062745-routing-palace-d0b4@gregkh> (raw)
In-Reply-To: <a1ef6eeab8b64fac817b9734da4a056f05a68d01.1687859323.git.petr.tesarik.ext@huawei.com>

On Tue, Jun 27, 2023 at 11:54:23AM +0200, Petr Tesarik wrote:
> +/**
> + * is_swiotlb_active() - check if the software IO TLB is initialized
> + * @dev:	Device to check, or %NULL for the default IO TLB.
> + */
>  bool is_swiotlb_active(struct device *dev)
>  {
> -	struct io_tlb_mem *mem = dev->dma_io_tlb_mem;
> +	struct io_tlb_mem *mem = dev
> +		? dev->dma_io_tlb_mem
> +		: &io_tlb_default_mem;

That's impossible to read and maintain over time, sorry.

Please use real "if () else" lines, so that it can be maintained over
time.

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-06-27 10:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  9:54 [PATCH v3 0/7] Allow dynamic allocation of software IO TLB bounce buffers Petr Tesarik
2023-06-27  9:54 ` [PATCH v3 1/7] swiotlb: make io_tlb_default_mem local to swiotlb.c Petr Tesarik
2023-06-27 10:24   ` Greg Kroah-Hartman [this message]
2023-06-27 10:55     ` Robin Murphy
2023-06-27 11:11       ` Petr Tesařík
2023-06-27 11:30       ` Petr Tesařík
2023-06-27 15:48         ` Christoph Hellwig
2023-06-27 17:24           ` Petr Tesařík
2023-06-27  9:54 ` [PATCH v3 2/7] swiotlb: add documentation and rename swiotlb_do_find_slots() Petr Tesarik
2023-06-27  9:54 ` [PATCH v3 3/7] swiotlb: separate memory pool data from other allocator data Petr Tesarik
2023-06-27  9:54 ` [PATCH v3 4/7] swiotlb: if swiotlb is full, fall back to a transient memory pool Petr Tesarik
2023-07-06  3:50   ` Michael Kelley (LINUX)
2023-07-06  8:07     ` Greg Kroah-Hartman
2023-07-06 14:22       ` Michael Kelley (LINUX)
2023-07-07  9:29         ` Greg Kroah-Hartman
2023-07-07 10:22           ` Petr Tesařík
2023-07-08 15:18             ` Michael Kelley (LINUX)
2023-07-10  9:36               ` Petr Tesařík
2023-07-11 15:54                 ` Michael Kelley (LINUX)
2023-06-27  9:54 ` [PATCH v3 5/7] swiotlb: determine potential physical address limit Petr Tesarik
2023-06-27  9:54 ` [PATCH v3 6/7] swiotlb: allocate a new memory pool when existing pools are full Petr Tesarik
2023-06-27  9:54 ` [PATCH v3 7/7] swiotlb: search the software IO TLB only if a device makes use of it Petr Tesarik

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=2023062745-routing-palace-d0b4@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hch@lst.de \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=jgross@suse.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mingo@redhat.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=petr@tesarici.cz \
    --cc=petrtesarik@huaweicloud.com \
    --cc=rafael@kernel.org \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=robin.murphy@arm.com \
    --cc=saravanak@google.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=wangkefeng.wang@huawei.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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;
as well as URLs for NNTP newsgroup(s).