From patchwork Fri May 6 18:03:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9035341 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2575BBF29F for ; Fri, 6 May 2016 18:07:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 429CE20272 for ; Fri, 6 May 2016 18:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2170920274 for ; Fri, 6 May 2016 18:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758719AbcEFSHj (ORCPT ); Fri, 6 May 2016 14:07:39 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36555 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758735AbcEFSD4 (ORCPT ); Fri, 6 May 2016 14:03:56 -0400 Received: by mail-wm0-f41.google.com with SMTP id n129so67110215wmn.1 for ; Fri, 06 May 2016 11:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=//rvB9KYq8d+2mel08zWcFDQ3kuENS9wpa2jDC2iawA=; b=ov4qaYTnDOK+A8ocSXLsX3ELqMvTec6qyf9QgOX2sKZZu7DT8mwPEP8wvOC8mec5o0 ZlwNlaryZjvt7j6Y00V+KX14u99iWu7ycAJd/OLMyhoOI/jSHzQOVA+YW6Ne1lmi9124 hjsgE5j/zYwSYtI6UDosQkyKnpnDcLQhfZ44o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=//rvB9KYq8d+2mel08zWcFDQ3kuENS9wpa2jDC2iawA=; b=AWHREu4XUFjsdbeqqEGH8DXGj1J6cpClGL8OtgQDI5GMZTDxXSguf8tJXAxhWvNNb6 JU0lnP2RFEG9PxIN5xtfc/21bRjdqTuL4cgmVwuEz3kw2TuqYekqRJ/sTBIVSyFA1UvK 0KdbrPbRLI+zCUNtxRbXZkDoR2feC81hJWl3iPqQzjRX4hHUfuVkOCAoLncXHdZ+NrA/ rhV+5NSifG7l6UYJG/pfgtNZEmAZ7uRb2AkdbIMWzZ7W1bTANvAF6mKcKnuYCawprWDE TuHtKx7NBHpcxh8eGdFUjLC3AkYlBnWcdlWJ4k8fcSUJGDvAJJ5KGVOhh7aXcNdD9V8D KDDg== X-Gm-Message-State: AOPr4FUFBUvE1f9tGxr1j5+4R2HR3sDIKwC9th1OcywP/lxVuFxPhv4YkM7dKJzN5W1wyg== X-Received: by 10.194.107.6 with SMTP id gy6mr21635714wjb.20.1462557835607; Fri, 06 May 2016 11:03:55 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id kz1sm16076559wjc.46.2016.05.06.11.03.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 11:03:55 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: Arnd Bergmann , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 23/28] lightnvm: pass dma address to hardware rather than pointer Date: Fri, 6 May 2016 20:03:16 +0200 Message-Id: <1462557801-24974-24-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462557801-24974-1-git-send-email-m@bjorling.me> References: <1462557801-24974-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arnd Bergmann 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 Fixes: a34b1eb78e21 ("lightnvm: enable metadata to be sent to device") Signed-off-by: Matias Bjørling --- 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 fadeb54..65de1e5 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);