mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matias Bjørling" <m@bjorling.me>
To: Arnd Bergmann <arnd@arndb.de>,
	Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@fb.com>
Cc: "Javier González" <javier@cnexlabs.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lightnvm: pass dma address to hardware rather than pointer
Date: Tue, 3 May 2016 19:41:52 +0200	[thread overview]
Message-ID: <5728E2E0.1000106@bjorling.me> (raw)
In-Reply-To: <1462288968-763853-1-git-send-email-arnd@arndb.de>

On 05/03/2016 05:22 PM, Arnd Bergmann wrote:
> A recent change to lightnvm added code to pass a kernel pointer
> to the hardware, which gcc complained about:
>
> drivers/nvme/host/lightnvm.c: In function 'nvme_nvm_rqtocmd':
> drivers/nvme/host/lightnvm.c:472:32: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
>    c->ph_rw.metadata = cpu_to_le64(rqd->meta_list);
>
> It looks like this has no way of working anyway, so this changes
> the code to pass the dma_address instead. This was most likely
> what was intended here. Neither of the two are currently ever
> written to, so the effect is the same for now.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: a34b1eb78e21 ("lightnvm: enable metadata to be sent to device")
> ---
>   drivers/nvme/host/lightnvm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
> index fadeb54bc7df..65de1e56e59a 100644
> --- a/drivers/nvme/host/lightnvm.c
> +++ b/drivers/nvme/host/lightnvm.c
> @@ -469,7 +469,7 @@ static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd,
>   	c->ph_rw.opcode = rqd->opcode;
>   	c->ph_rw.nsid = cpu_to_le32(ns->ns_id);
>   	c->ph_rw.spba = cpu_to_le64(rqd->ppa_addr.ppa);
> -	c->ph_rw.metadata = cpu_to_le64(rqd->meta_list);
> +	c->ph_rw.metadata = cpu_to_le64(rqd->dma_meta_list);
>   	c->ph_rw.control = cpu_to_le16(rqd->flags);
>   	c->ph_rw.length = cpu_to_le16(rqd->nr_pages - 1);
>
>

Thanks Arnd, good catch. I haven't sent the 4.7 patches upstream yet. Do 
you want me to squash your patch into Javier's or keep it separately?

      parent reply	other threads:[~2016-05-03 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 15:22 Arnd Bergmann
2016-05-03 16:14 ` Javier González
2016-05-03 17:41 ` Matias Bjørling [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=5728E2E0.1000106@bjorling.me \
    --to=m@bjorling.me \
    --cc=arnd@arndb.de \
    --cc=axboe@fb.com \
    --cc=javier@cnexlabs.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.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

all inboxes | Powered by JetHome®