Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1620945ybv; Fri, 21 Feb 2020 00:26:36 -0800 (PST) X-Google-Smtp-Source: APXvYqww7qnGHnxh+pQwG6qb3+ghK1k44bGNiLbAK9TzyKLydog5MfDjUXqXz8n91ISshjIqzyJ+ X-Received: by 2002:a9d:6446:: with SMTP id m6mr26083662otl.122.1582273595979; Fri, 21 Feb 2020 00:26:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273595; cv=none; d=google.com; s=arc-20160816; b=VqOyyYR//oll5RQ+c1eqRK1NTds905G6ueoSV5CXfeS2eBJqprFtFH3KU0DhQ3AxlQ LcJvXug0O0HdbZkzUTeoqAUuN7a5Pc8F6B0K+ERRuofXVc2KoW6KNtMNEou6PzvI5QCy Sn+VltQC+GkTuFvSDE2ZDn/Yq+1BJXX8zUvyrKoefqlolFAToc4DDN+hWMLy0FPDssHA SD+EmlqCt5WYZYprz2n2c7EEit2ys/Qur7qhwR1DVnsqx4cD/9KpHV0hJ8/rgU65o5bj jPAn5gKDSyrbFUFhyznNvms9cpBwgHHlPRF+2FvZVIYLRRWnFr78lmzG10FJA7/UVVPa 74yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3NStfsa4mshKK3K1j/sIi7K7HxaOBWejGH52Oc5UoxQ=; b=E2+qEtllikyVJ1y69X0qB+u6W09/VU2D2PD3IJK/tbTycIccTZxBDdACrLZMn8QJTe 1K9FqD8A4D5E8pmeqUPBnilJJ6IfwuLthtKFWl6QI/Cz+y/fqXGC9OZL5HyXLFrqZ3K5 fNtyqSMNnZgHw5QGh/cjbrNdTJ72XIJca2Hc9UYjnYNbHfwgiBQV2cGuPdPnzjxzxosE 1n44zhIr5n/0Vr9fN4K0H7iphmzquFcXb55omYNapt2UfkmakjLe5/a84IiR9DPp06tU lhIqJQxBRS/t+6owSGLYyLI6ADlESwNBQ44EGljVJ9H+OBvdKGeHZ42ecRp8emF/N9Bd ge7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kpWXBq9Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si1072516otp.11.2020.02.21.00.26.23; Fri, 21 Feb 2020 00:26:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kpWXBq9Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388779AbgBUIZo (ORCPT + 99 others); Fri, 21 Feb 2020 03:25:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:37692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388736AbgBUIZA (ORCPT ); Fri, 21 Feb 2020 03:25:00 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CBA3E2467D; Fri, 21 Feb 2020 08:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273500; bh=alg3hx0ZsAVDxehLFVHesumGzR/P6vdWyx9Oo5Cvnrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kpWXBq9ZvjAWj6yu9eBnAnmJ90Dl41GHnu1FRZWCelQv/YNXopck5JtHQ8Ii2ASAR ROMJHN7FHXNVXp1tY/j+q4nnb01FUzesvKlKSsbg3rXPQiFOWnzoikmiqNQXwbazI6 oEsjrIiwyHfPTp5jY4Mh0I1piZLEllVxh1vdFq2M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ilya Dryomov , Sasha Levin Subject: [PATCH 4.19 170/191] rbd: work around -Wuninitialized warning Date: Fri, 21 Feb 2020 08:42:23 +0100 Message-Id: <20200221072311.089769997@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit a55e601b2f02df5db7070e9a37bd655c9c576a52 ] gcc -O3 warns about a dummy variable that is passed down into rbd_img_fill_nodata without being initialized: drivers/block/rbd.c: In function 'rbd_img_fill_nodata': drivers/block/rbd.c:2573:13: error: 'dummy' is used uninitialized in this function [-Werror=uninitialized] fctx->iter = *fctx->pos; Since this is a dummy, I assume the warning is harmless, but it's better to initialize it anyway and avoid the warning. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index b942f4c8cea8c..d3ad1b8c133e6 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2097,7 +2097,7 @@ static int rbd_img_fill_nodata(struct rbd_img_request *img_req, u64 off, u64 len) { struct ceph_file_extent ex = { off, len }; - union rbd_img_fill_iter dummy; + union rbd_img_fill_iter dummy = {}; struct rbd_img_fill_ctx fctx = { .pos_type = OBJ_REQUEST_NODATA, .pos = &dummy, -- 2.20.1