Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: 陈华才 <chenhc@lemote.com>
To: "Christoph Hellwig" <hch@lst.de>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Fuxin Zhang" <zhangfx@lemote.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"James Hogan" <james.hogan@imgtec.com>,
	linux-mips <linux-mips@linux-mips.org>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"Roland Dreier" <rolandd@cisco.com>,
	"Pawel Osciak" <pawel@osciak.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Michael Chan" <michael.chan@broadcom.com>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Ivan Mikhaylov" <ivan@ru.ibm.com>,
	"Tariq Toukan" <tariqt@mellanox.com>,
	"Andy Gross" <agross@codeaurora.org>,
	"Mark A . Greer" <mgreer@mvista.com>,
	"Robert Baldyga" <r.baldyga@samsung.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment()
Date: Tue, 26 Sep 2017 09:48:01 +0800	[thread overview]
Message-ID: <tencent_7716E99906A9D63D4592EFB6@qq.com> (raw)
In-Reply-To: <20170925125107.GC8130@lst.de>

Hi, Christoph,

Can I put the declaration in asm/dma-coherence.h?

And, last time you said it is OK to pass a NULL to dma_get_cache_alignment() and cc all driver maintainers. I have do so.

Huacai

------------------ Original ------------------
From:  "Christoph Hellwig"<hch@lst.de>;
Date:  Mon, Sep 25, 2017 08:51 PM
To:  "Huacai Chen"<chenhc@lemote.com>; 
Cc:  "Christoph Hellwig"<hch@lst.de>; "Marek Szyprowski"<m.szyprowski@samsung.com>; "Robin Murphy"<robin.murphy@arm.com>; "Andrew Morton"<akpm@linux-foundation.org>; "Fuxin Zhang"<zhangfx@lemote.com>; "linux-kernel"<linux-kernel@vger.kernel.org>; "Ralf Baechle"<ralf@linux-mips.org>; "James Hogan"<james.hogan@imgtec.com>; "linux-mips"<linux-mips@linux-mips.org>; "James E . J . Bottomley"<jejb@linux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@oracle.com>; "linux-scsi"<linux-scsi@vger.kernel.org>; "Roland Dreier"<rolandd@cisco.com>; "Pawel Osciak"<pawel@osciak.com>; "Kyungmin Park"<kyungmin.park@samsung.com>; "Michael Chan"<michael.chan@broadcom.com>; "Benjamin Herrenschmidt"<benh@kernel.crashing.org>; "Ivan Mikhaylov"<ivan@ru.ibm.com>; "Tariq Toukan"<tariqt@mellanox.com>; "Andy Gross"<agross@codeaurora.org>; "Mark A . Greer"<mgreer@mvista.com>; "Robert Baldyga"<r.baldyga@samsung.com>; "stable"<stable@vger.kernel.org>; 
Subject:  Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment()

 
> index aba7138..e2c5d9e 100644
> --- a/arch/mips/include/asm/dma-mapping.h
> +++ b/arch/mips/include/asm/dma-mapping.h
> @@ -39,4 +39,6 @@ static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
>  #endif
>  }
>  
> +int mips_get_cache_alignment(struct device *dev);

All the other mips generic dma helpers are prefixed mips_dma_*
so it might make sense to follow that.

Also please don't add arch-local helpers to asm/dma-mapping.h - this
is a header used by linux/dma-mapping.h and should not contain
implementation details if avoidable.

> +					   dma_get_cache_alignment(NULL)) / mdev->limits.mtt_seg_size;

As said before - please don't pass NULL to this function but the proper
device, which would be &mdev->pdev->dev in this case for example.

  reply	other threads:[~2017-09-26  1:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  9:46 [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Huacai Chen
2017-09-25  9:46 ` [PATCH V7 2/2] scsi: Align block queue to dma_get_cache_alignment() Huacai Chen
2017-09-30 23:30   ` kbuild test robot
2017-09-25 12:51 ` [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment() Christoph Hellwig
2017-09-26  1:48   ` 陈华才 [this message]
2017-09-26  6:10     ` Christoph Hellwig
2017-09-25 12:57 ` Robin Murphy
2017-09-26  1:44   ` 陈华才

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=tencent_7716E99906A9D63D4592EFB6@qq.com \
    --to=chenhc@lemote.com \
    --cc=agross@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=hch@lst.de \
    --cc=ivan@ru.ibm.com \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.petersen@oracle.com \
    --cc=mgreer@mvista.com \
    --cc=michael.chan@broadcom.com \
    --cc=pawel@osciak.com \
    --cc=r.baldyga@samsung.com \
    --cc=ralf@linux-mips.org \
    --cc=robin.murphy@arm.com \
    --cc=rolandd@cisco.com \
    --cc=stable@vger.kernel.org \
    --cc=tariqt@mellanox.com \
    --cc=zhangfx@lemote.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