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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 03CCFC35642 for ; Fri, 21 Feb 2020 08:00:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C319F24656 for ; Fri, 21 Feb 2020 08:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272015; bh=RWrPWhIW4nq0JRUzQClNsebzVS2WeaoqVeS3VclYGbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dk+e43p/8ncLmBe31zLiKzZgfJMkXAq6Sm1mib3CBrcQQAjTkoCLPQsMQjIJFqFj1 jPGuoJiPYwAAEDuI+8f6tDTtOFRwhp4dPJ3df6AlrnE6tOWj07jggPnW7KCPdkvuT6 wcRJ8cz+EWJrLbvqQLYknFiHGwJ1cI8EbYveKkyw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731029AbgBUIAO (ORCPT ); Fri, 21 Feb 2020 03:00:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:60578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729111AbgBUIAN (ORCPT ); Fri, 21 Feb 2020 03:00:13 -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 6053524650; Fri, 21 Feb 2020 08:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272012; bh=RWrPWhIW4nq0JRUzQClNsebzVS2WeaoqVeS3VclYGbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gVrtKfBMqrL2dEqKTfxStdz9ur4UeOb221Yp3L1DN7Adc5ZhViWdsO4cTQqNmltdp 4LJNc3mu+vWpR5LlKrtQfLiHPD2o4ZMPAdoq+WlU80tB8J7btJDAf7kGw54pxnFhP2 eIlhqQrSe5aX9Hr8y+boBYAhSZjWFwb+vfNNGOCU= 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 5.5 356/399] rbd: work around -Wuninitialized warning Date: Fri, 21 Feb 2020 08:41:21 +0100 Message-Id: <20200221072435.456302295@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072402.315346745@linuxfoundation.org> References: <20200221072402.315346745@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 2b184563cd32e..38dcb39051a7f 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2662,7 +2662,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