Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1724497ybc; Wed, 13 Nov 2019 03:23:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwWadmhM49jyeTkTKVKjejIjIdmAkNYZczrjU38TGjL+rXijqfhLs6q/RMflRigZWok1G6q X-Received: by 2002:a50:d80c:: with SMTP id o12mr2850608edj.251.1573644236779; Wed, 13 Nov 2019 03:23:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573644236; cv=none; d=google.com; s=arc-20160816; b=PYO7YPn9rQXMTedy6Pb/SChaFjxT+CgJFNrn4/nc0gje5RMxC5oDwiA13t5IZUtubA YhL3WUIVnEWotvt7HAf69YMozMsMYWWjH2PaKKxSBAl90k7sPmKvKFKdVAt7XPk7A2XT RI/btyHnfEr4Os/O/tEFLPkQxrOG1kZa+Y8R7lCpXyPb1jaDXEAhxtgOtz2dVKuzhhGF ujQBun8DV+6yMSoxq0UHAot+Xbd9yv9Fu3YlfUDQ7OKOgF8U4WkM33XRxRvdrLhKN7Aq REKqvCcmkz46ruO2GUMoryPfMfams4jhS71+kMHSjUy6VR9IqRwSfKCmgx34zTlPTbhD BdsQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=E4UUTk/t8uEes636KBwiMf4uCLpW7SUwTukCuJGV2gQ=; b=JJOF2sencw9WdcEOODSMCKJRhZRDUn7q3P9yR8jkKyg+djoptBAFg3siVOcBGxg4G/ VXunON+dvG+S4Ei7uY8UsgQPak5CIX/VOLgznFKptHzHTnjp9zqgL/mwNdtBcXqrtffr CwmtPbUCfyAX9GkpDwlg21Qo3rdLWqUSXTwfoInNniKFueFYtGQMNr3/fvt5IaOa+szT KN77XoEGnDc8gORNa4cTpufcN2ZXxmQXt7IqKd961GEiEKzs3sOSwvtiABXD/uA9/GQ5 zxZXUBuEC1p2etVz3X2qXmc9b6UJjGeM/zl6yBMSlJPldi6GOHE8yK8if38CNK2L//rH SkDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NIUP6HJ7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si938132eju.135.2019.11.13.03.23.32; Wed, 13 Nov 2019 03:23:56 -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=@gmail.com header.s=20161025 header.b=NIUP6HJ7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727811AbfKMLUo (ORCPT + 99 others); Wed, 13 Nov 2019 06:20:44 -0500 Received: from mail-io1-f51.google.com ([209.85.166.51]:44118 "EHLO mail-io1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbfKMLUo (ORCPT ); Wed, 13 Nov 2019 06:20:44 -0500 Received: by mail-io1-f51.google.com with SMTP id j20so2067697ioo.11; Wed, 13 Nov 2019 03:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=E4UUTk/t8uEes636KBwiMf4uCLpW7SUwTukCuJGV2gQ=; b=NIUP6HJ7cZn6VNtTHqEup48z6htdvYdviXFeI9rrFeZQUOA8atO2mZ87YJBOhpOJ1O Lt5nD8Tab2jacC6s/bVARkIzfu8E68Yk0h3H3Hpe7WfLyh0DnSGtGuto11j6TnwPU8/X ngLvnF1gbtZ1C1DSFoRcIpSqEEtAgtScXVtB5SSwuHVnRCaOpXMSIjBnRzpGAimp3PqC Z3IMCedoAHGVYhBrADI4yqdUPoXGFPV+bTXJAUHpqT29qi7YIxGNxqpwP+vqiNenNzv8 KgtG/JyDoleXuoGEbg3e5sWF9+PADJm6WrVGZW1nDp5tZG9zL6SZYzHo5JjUX0z2146d jtmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=E4UUTk/t8uEes636KBwiMf4uCLpW7SUwTukCuJGV2gQ=; b=ESiGRWzDhRZYBARpLLB3h9zSc7hvU1EUZN219gWJ7YKjUpjGEWDtjm37/OW4X1i5t5 JlrzLbPm2djWtmuUoHg8OUbsYAuiFlsmLkHspvuUFHeT213iUhdkZ6yc1xjaPOWWrVG6 IXxNYdtANEfuDYLxgTz46/nE8gqM7rhOkhWVDj2Zb7NpJ9moYX4iRVCCyGbsIQfpX1+s BplmjWiLLwilmcs0TBOhF2XfORTrwk3YAyE3h2GiiYPwIg3yaUcADob03t+Il/QomE8S CHfXQ8s23t6X5q/GsbAast2DxM09hRX1TYI3YqysvzdsRO8+EL383z/Yji24Ua1LSOGp KsxQ== X-Gm-Message-State: APjAAAV25/7mO/+HBX8Ta8lHAIcnRD82qzVjqcxpzJcV3TuRv1/NCPqy auUQeaOwarhuyeT7HAjZY68zcKW5pqyq2XYvPWd72X+u X-Received: by 2002:a02:9f95:: with SMTP id a21mr2464235jam.16.1573644043378; Wed, 13 Nov 2019 03:20:43 -0800 (PST) MIME-Version: 1.0 References: <20191113013529.GA64000@TonyMac-Alibaba> In-Reply-To: <20191113013529.GA64000@TonyMac-Alibaba> From: Ilya Dryomov Date: Wed, 13 Nov 2019 12:21:10 +0100 Message-ID: Subject: Re: 'current_state' is uninitialized in rbd_object_map_update_finish() To: Tony Lu Cc: linux-block , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 2:35 AM Tony Lu wrote: > > Hello, > > There is a warning during compiling driver rbd for uninitialized > 'current state' in rbd_object_map_update_finish(): > > drivers/block/rbd.c: In function 'rbd_object_map_callback': > drivers/block/rbd.c:2122:21: warning: =E2=80=98current_state=E2=80=99 may= be used uninitialized in this function [-Wmaybe-uninitialized] > (current_state =3D=3D OBJECT_EXISTS && state =3D=3D OBJECT_EXISTS_C= LEAN)) > > drivers/block/rbd.c:2090:23: note: =E2=80=98current_state=E2=80=99 was de= clared here > u8 state, new_state, current_state; > ^~~~~~~~~~~~~ Hi Tony, It looks like this warning was also reported by kbuild, on gcc 6.3 and 7.4. It's bogus, I'll send a patch to silence it. Thanks, Ilya