{"id":809072,"url":"http://patchwork.ozlabs.org/api/patches/809072/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1504365337-32519-1-git-send-email-bmeng.cn@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504365337-32519-1-git-send-email-bmeng.cn@gmail.com>","list_archive_url":null,"date":"2017-09-02T15:15:35","name":"[U-Boot,1/3] nvme: Fix wrong ndev->queues memset","commit_ref":"37d46870b31724b71f593de3eda274e9ad8026d4","pull_url":null,"state":"accepted","archived":false,"hash":"03c00fcb09f020ef4f0e3a34358b52cb41c5f1d7","submitter":{"id":64981,"url":"http://patchwork.ozlabs.org/api/people/64981/?format=json","name":"Bin Meng","email":"bmeng.cn@gmail.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1504365337-32519-1-git-send-email-bmeng.cn@gmail.com/mbox/","series":[{"id":1158,"url":"http://patchwork.ozlabs.org/api/series/1158/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=1158","date":"2017-09-02T15:15:35","name":"[U-Boot,1/3] nvme: Fix wrong ndev->queues memset","version":1,"mbox":"http://patchwork.ozlabs.org/series/1158/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/809072/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/809072/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"kwtVOoh9\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl01r2Z1jz9t0F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun,  3 Sep 2017 01:11:26 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid C8930C21EF1; Sat,  2 Sep 2017 15:11:20 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 2E3DAC21DAD;\n\tSat,  2 Sep 2017 15:11:18 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 86786C21DAD; Sat,  2 Sep 2017 15:11:16 +0000 (UTC)","from mail-it0-f65.google.com (mail-it0-f65.google.com\n\t[209.85.214.65])\n\tby lists.denx.de (Postfix) with ESMTPS id F0A17C21C5C\n\tfor <u-boot@lists.denx.de>; Sat,  2 Sep 2017 15:11:15 +0000 (UTC)","by mail-it0-f65.google.com with SMTP id x37so511652ita.4\n\tfor <u-boot@lists.denx.de>; Sat, 02 Sep 2017 08:11:15 -0700 (PDT)","from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139]) by smtp.gmail.com with ESMTPSA id\n\tc8sm1372273ioj.53.2017.09.02.08.11.13\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 02 Sep 2017 08:11:13 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:subject:date:message-id;\n\tbh=JnBFrs42abiLaE0Dn4ep1Gpa+GwhhbWFI2oTHzyw74A=;\n\tb=kwtVOoh9pS1uHn/wGxztHaMEhCCCcffihsHqlocY5ydrg3QR8qWFzHQ49VUgJeHV0N\n\tKO1uCtDs/hY7ihbmvlSa+sYKR42xdVogafg0zglR0N0GcFiP2+xohFU4lsJPVsZzUwMR\n\tuZk+Dz7zgha4nStWWYFP8y+u7FYfJB0TSw2ZbWR+9gEAKEeHqLWgYSTznlHeHXBCe+lu\n\tNe9cztsCattEuGpcyBlH9LgUGZKs80YthdsOppPkHnBQ7lahd+N/tStXlgMpSkOIwsCP\n\tkfYU4wy0l+1xAS33SiCe2FlEIAigvp5e/gQ1nNJ48RzuljLfpnAS3hnxPWjEzCunNxYE\n\tWqXQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id;\n\tbh=JnBFrs42abiLaE0Dn4ep1Gpa+GwhhbWFI2oTHzyw74A=;\n\tb=kfqX2QA/ktYGii3lguiqIxLVnZpZigo6NxHhpxxTfHxwdnBLm+uICMwaWp2bmapou2\n\tC4095TpNq+lefM9t7klRJqNdpCTcItOlgmFf7Wvm3aAXwAikD8yZdP5IK9ZWZ3ga0Cmp\n\t26FcCZKXQJfWZMFFnubOvi9ubDc4OZlvhqZujg22iToiN9vsJNcaLR2BlefXbVlv2H1O\n\tLM8ReoN/ALHeRCr9kRQjTU3/PGedh6hu6ZgNaCwQPJDDol8jkkPqyHe+GNMixtRlyMXM\n\t8+hO6QXSfHZdAiGgnsjmIL11MzuAjVgdydU52Ug83UoSgrtK5m0XIPzmlAY85q8MFbwX\n\tSmwQ==","X-Gm-Message-State":"AHPjjUi7R5IvduzXMaOCV5bR4Y9LAwqzhw0u7Eap1u3F/6PJh9E5S/4T\n\tzTdHy6241ZdqFw==","X-Google-Smtp-Source":"ADKCNb4zMSdI92a8MRJKE9U03QOI/BsV3d9Tc8DB7mWBLJmhjFNkXVDQ2osiO24nqUYCiiFokmqxVA==","X-Received":"by 10.36.152.193 with SMTP id n184mr1310613itd.153.1504365074521;\n\tSat, 02 Sep 2017 08:11:14 -0700 (PDT)","From":"Bin Meng <bmeng.cn@gmail.com>","To":"Tom Rini <trini@konsulko.com>, U-Boot Mailing List <u-boot@lists.denx.de>","Date":"Sat,  2 Sep 2017 08:15:35 -0700","Message-Id":"<1504365337-32519-1-git-send-email-bmeng.cn@gmail.com>","X-Mailer":"git-send-email 1.7.9.5","Subject":"[U-Boot] [PATCH 1/3] nvme: Fix wrong ndev->queues memset","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"memset() was given a sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *)\nto clear, which is wrong.\n\nReported-by: Coverity (CID: 166729)\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n drivers/nvme/nvme.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)","diff":"diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c\nindex ec32d0d..4448754 100644\n--- a/drivers/nvme/nvme.c\n+++ b/drivers/nvme/nvme.c\n@@ -791,8 +791,7 @@ static int nvme_probe(struct udevice *udev)\n \t\tprintf(\"Error: %s: Out of memory!\\n\", udev->name);\n \t\tgoto free_nvme;\n \t}\n-\tmemset(ndev->queues, 0,\n-\t       sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *)));\n+\tmemset(ndev->queues, 0, NVME_Q_NUM * sizeof(struct nvme_queue *));\n \n \tndev->prp_pool = malloc(MAX_PRP_POOL);\n \tif (!ndev->prp_pool) {\n","prefixes":["U-Boot","1/3"]}