linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 陈华才 <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>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()
Date: Mon, 13 Nov 2017 16:37:09 +0800	[thread overview]
Message-ID: <tencent_2CE7124212471D7F3E9CA16E@qq.com> (raw)
In-Reply-To: <20171110123059.GA9296@lst.de>

But in b44_init(), there is no device instances.
 
 
 
------------------ Original ------------------
From:  "Christoph Hellwig"<hch@lst.de>;
Date:  Fri, Nov 10, 2017 08:30 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>; "stable"<stable@vger.kernel.org>; "Michael S . Tsirkin"<mst@redhat.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@animalcreek.com>; "Robert Baldyga"<r.baldyga@hackerion.com>; 
Subject:  Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

 
> diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
> index a1125d1..2f6ffe5 100644
> --- a/drivers/net/ethernet/broadcom/b44.c
> +++ b/drivers/net/ethernet/broadcom/b44.c
> @@ -2344,6 +2344,10 @@ static int b44_init_one(struct ssb_device *sdev,
>  	struct net_device *dev;
>  	struct b44 *bp;
>  	int err;
> +	unsigned int dma_desc_align_size = dma_get_cache_alignment(sdev->dma_dev);
> +
> +	/* Setup paramaters for syncing RX/TX DMA descriptors */
> +	dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
>  
>  	instance++;
>  
> @@ -2587,12 +2591,8 @@ static inline void b44_pci_exit(void)
>  
>  static int __init b44_init(void)
>  {
> -	unsigned int dma_desc_align_size = dma_get_cache_alignment();
>  	int err;
>  
> -	/* Setup paramaters for syncing RX/TX DMA descriptors */
> -	dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
> -

This looks wrong - you override a global variable for each probed
device.

      reply	other threads:[~2017-11-13  8:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171023071025epcas4p3e9b9c0af7c0a34561f0d57a20a4f9946@epcas4p3.samsung.com>
2017-10-23  7:12 ` [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment() Huacai Chen
2017-10-23  7:12   ` [PATCH V9 2/4] MIPS: Implement dma_map_ops::get_cache_alignment() Huacai Chen
2017-11-06 18:21     ` Christoph Hellwig
2017-10-23  7:12   ` [PATCH V9 3/4] scsi: Align block queue to dma_get_cache_alignment() Huacai Chen
2017-11-05  2:39     ` kbuild test robot
2017-10-23  7:12   ` [PATCH V9 4/4] libsas: Align sata_device's rps_resp on a cacheline Huacai Chen
2017-10-24 13:30   ` [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment() Marek Szyprowski
2017-10-25  1:22     ` 陈华才
2017-10-25  7:21       ` Marek Szyprowski
2017-10-26  6:33         ` 陈华才
2017-11-03  4:48           ` 陈华才
2017-11-03  5:14             ` Christoph Hellwig
2017-11-03  6:15               ` 陈华才
2017-10-24 19:11   ` Mark Greer
2017-11-06 18:18   ` Christoph Hellwig
2017-11-10 12:30   ` Christoph Hellwig
2017-11-13  8:37     ` 陈华才 [this message]

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_2CE7124212471D7F3E9CA16E@qq.com \
    --to=chenhc@lemote.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@linux.vnet.ibm.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=ralf@linux-mips.org \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).