From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94E90C3F2D2 for ; Tue, 3 Mar 2020 02:49:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6868E24684 for ; Tue, 3 Mar 2020 02:49:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i75FF12b"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="1hvrEVnH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6868E24684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=af8pXlr9cXG+C+2aIRWoXFUS/SzsjY5L6hP67Nn6aUg=; b=i75FF12bZ/DFd8 E0DCDadv//BV+ztLdqmuXtre4m14JOP/oVT7HrzMjZ95O5ugMbhR54Ny6ovNPAwNL4KjnhfWc41sl e5eoIvDBCXiBhdDOhEmyIVpJXywLnJVQZBzKN3Atxmdv9bf1zbVNJ6DU8UCD5iJM5/EDrtZN/Sr3Y ZtKKApXuRIsxjRB/1m6e0WZfhQd37y5ncIhqlXS043bnz9dY97JaLB9azHZsrlzjKnAv5Oh/RCcKu Vze9heShoCkCD7D6p8B5bpA0OAF7N8oPHAc7UkcpaB3PuB4F1tz4Nc2+BDNCcvXG+T/XLnQR93O5n 9zUZQ5auD551w3LEDYaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j8xcC-0006O9-EG; Tue, 03 Mar 2020 02:49:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j8xbm-00063M-LD for linux-nvme@lists.infradead.org; Tue, 03 Mar 2020 02:48:36 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6991124697; Tue, 3 Mar 2020 02:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583203714; bh=ahsmPgX1+chVtukgf9LGDH62Q144UgpGZOEhCJIhJMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1hvrEVnH9UK4sQUoIrDnA0X1Ld/WKyFW6tVDesazADImyG1RZVRZJVFvu7zqi7V70 3+J8G+FK4g84iVavm8yH6Q1t3T/OVFy1PPm8rAB//u2dclUXCgdNk11vzYTr1VlUiJ ViUZTTo5D6uCxTZNlQ02iTec/KnhiXJl+onpJJ2c= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 44/58] nvme: Fix uninitialized-variable warning Date: Mon, 2 Mar 2020 21:47:26 -0500 Message-Id: <20200303024740.9511-44-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200303024740.9511-1-sashal@kernel.org> References: <20200303024740.9511-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200302_184834_715725_F78F5572 X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Busch , Sasha Levin , linux-nvme@lists.infradead.org, Christoph Hellwig , Arnd Bergmann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org From: Keith Busch [ Upstream commit 15755854d53b4bbb0bb37a0fce66f0156cfc8a17 ] gcc may detect a false positive on nvme using an unintialized variable if setting features fails. Since this is not a fast path, explicitly initialize this variable to suppress the warning. Reported-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e703827d27e9c..dd53b006cebb0 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1161,8 +1161,8 @@ static int nvme_identify_ns(struct nvme_ctrl *ctrl, static int nvme_features(struct nvme_ctrl *dev, u8 op, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, u32 *result) { + union nvme_result res = { 0 }; struct nvme_command c; - union nvme_result res; int ret; memset(&c, 0, sizeof(c)); -- 2.20.1 _______________________________________________ linux-nvme mailing list linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A38B0C3F2D2 for ; Tue, 3 Mar 2020 02:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F9CB2166E for ; Tue, 3 Mar 2020 02:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583204214; bh=ahsmPgX1+chVtukgf9LGDH62Q144UgpGZOEhCJIhJMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ixq08T8yfu33blqnMj/jsFTFgQ3PwHy59A1R3+5TdWH00zk30Xk54/sSdxxsTuL/C w6gVO8rDtkesJiBQiTLvwTCnI5A7C1xnIos1GPka8tnoD2cD6BHtqBAMRyrjf8/9B+ wJXSFkFaBGcAVJNdNMOrtUlL25gDqwHGQ4cfEbOo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbgCCC4x (ORCPT ); Mon, 2 Mar 2020 21:56:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:44432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727925AbgCCCse (ORCPT ); Mon, 2 Mar 2020 21:48:34 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6991124697; Tue, 3 Mar 2020 02:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583203714; bh=ahsmPgX1+chVtukgf9LGDH62Q144UgpGZOEhCJIhJMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1hvrEVnH9UK4sQUoIrDnA0X1Ld/WKyFW6tVDesazADImyG1RZVRZJVFvu7zqi7V70 3+J8G+FK4g84iVavm8yH6Q1t3T/OVFy1PPm8rAB//u2dclUXCgdNk11vzYTr1VlUiJ ViUZTTo5D6uCxTZNlQ02iTec/KnhiXJl+onpJJ2c= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Keith Busch , Arnd Bergmann , Christoph Hellwig , Sasha Levin , linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 44/58] nvme: Fix uninitialized-variable warning Date: Mon, 2 Mar 2020 21:47:26 -0500 Message-Id: <20200303024740.9511-44-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200303024740.9511-1-sashal@kernel.org> References: <20200303024740.9511-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Keith Busch [ Upstream commit 15755854d53b4bbb0bb37a0fce66f0156cfc8a17 ] gcc may detect a false positive on nvme using an unintialized variable if setting features fails. Since this is not a fast path, explicitly initialize this variable to suppress the warning. Reported-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e703827d27e9c..dd53b006cebb0 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1161,8 +1161,8 @@ static int nvme_identify_ns(struct nvme_ctrl *ctrl, static int nvme_features(struct nvme_ctrl *dev, u8 op, unsigned int fid, unsigned int dword11, void *buffer, size_t buflen, u32 *result) { + union nvme_result res = { 0 }; struct nvme_command c; - union nvme_result res; int ret; memset(&c, 0, sizeof(c)); -- 2.20.1