Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3119789img; Mon, 25 Mar 2019 04:16:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRei2ZQ3z6BcGDAFabpPgtLxbTbl40WjQ74shzksJnV31oMo9fok9XFfTDUnuZf6RImXrF X-Received: by 2002:aa7:9090:: with SMTP id i16mr22711520pfa.85.1553512615926; Mon, 25 Mar 2019 04:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553512615; cv=none; d=google.com; s=arc-20160816; b=XMMbOiy4nujPMLoyxhgIWNCDBVDUaSH4jKhqlXdNjf1A5ZI9Io9QVuTdT07vEPprMx L3b4ebSPpKxCsf5+mOQV6zKx4hre7KY8nkqQG1xBK1HBwnaZiANsPAGfc6OsZlCpadmz WXJ2J65d7LbZV9PU9WYIYXyTpYk3CBPloSkwePItyP9/ljgewc04UsoFoQsN8ybIbYos IhB3APIT/5uit6woZwAwda+2yU/N4PRQqN/AIzCcn12n5efzGpqwxfeLEsbRBlz+mmQJ /K602q2CID1triAvqkdcDkHznqBD/jQngEXtZoN1EGo+TMwndem7MFHvDsEoa6n+FXoV wQBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oAueFEIqCD9AhXmVlTTPGBWAf4NW1uC3bpMLU2svQXw=; b=LwmY64Ergs1k1p4Fl+gdDgm37BrjqwLYPEmOcVZEm9TaZRAojlDeY0KzoSYvLLJ8O3 3ZCnVLARulXNJ82tvTfyJ3LcRzmluwzIkKjA3HvKtWWwWcNq1jSFPOGUzzhnq+XJ+h4l RQyzi+NLJuL3A+FUNyi5J/BbJTyvE3DPs8w+qIXvAR6MMln1vb0rFgStAz2k/2LUkuzP sBWOj9GyflswXWbJAnepZQN5aSiTv/i9sic9NMG6V8dI/q+IQvrPxwqagidrOH8PaQNS /ZdU6qjY2zIRp9fKyBXI13/0kys22MXGICmEaFVZSw6VkzUUay/DqShSe3zwI+T+Pjxu uNsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qrS34rOi; 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 x4si12851806pgp.370.2019.03.25.04.16.40; Mon, 25 Mar 2019 04:16:55 -0700 (PDT) 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=qrS34rOi; 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 S1730799AbfCYLKR (ORCPT + 99 others); Mon, 25 Mar 2019 07:10:17 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:40662 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729727AbfCYLKQ (ORCPT ); Mon, 25 Mar 2019 07:10:16 -0400 Received: by mail-io1-f67.google.com with SMTP id d201so7229614iof.7; Mon, 25 Mar 2019 04:10:16 -0700 (PDT) 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; bh=oAueFEIqCD9AhXmVlTTPGBWAf4NW1uC3bpMLU2svQXw=; b=qrS34rOikrfVr5ZViCsef8iowfUfG+rwWJqB+oI7kwL5X79mlZVc5jlKzjEP4YcqaS rjJvLkVmXgUlsBdAzdWNuRkn8pzmLCkqWhm6PSKADeuYIbpCTuxgl9HX/Id/J/SG2pR3 fFsUFq0NICyrEQHiyRBRHVwBBW3W0TWTvota064CEBNApAxbLIsKKfmd7X2VmwZpWnPm Zr+Zsx7GdxAVP9jLNKpYS9lmL2fwyXvZ8mBgtztO2Ft384tVvzT16rf3694Fqf8rIlsD q0SMJ+3e3J10MVtKrHjzP+Fn/1Gb5dbRMun5NUD8CXQrqMx/h5rkYapNLzOLCB1N62B4 2YiA== 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; bh=oAueFEIqCD9AhXmVlTTPGBWAf4NW1uC3bpMLU2svQXw=; b=eUGagWnaRp+YXxi4k/rdckc3nf2mh59yeQ5s0YVVSpdRzxTftpd6yrtyvAgbxVYjA5 g5LlHn0NdWQUmPUSYYTeXm36QGAGD3DMTs4dL1IxNICFOs+wqjmjdgAG0p4/46c/0R/5 AoGf71vOpTE2j/5uXOJcmqoTR+7p2pPegac3ewE2Rzt3n/M6JOG7mOYhCyFkws+liSn1 c8pTGjgJsp1dUnQdpna2yqm/V5k6gIKUHlik4VT0jw8I/nwDYCf9dykxY0aDqy+2nqw4 jUO/i+901h1/66ruoauBpq0gs7E+6Kh1nuvu2O1bB0l0Y2YoYnB73bD/PwalCVGmWh7G LpGQ== X-Gm-Message-State: APjAAAUikaV5Xs/bmnIGRDvjqbmU/o2EJkANu8vSGThgptSkhu1TPg9u kWKOpmuEUHezcaxU/+OjOxtxnOY4OvZHIJ9SoE2JIZDV X-Received: by 2002:a5d:984a:: with SMTP id p10mr16351129ios.217.1553512216107; Mon, 25 Mar 2019 04:10:16 -0700 (PDT) MIME-Version: 1.0 References: <20190322143643.1317312-1-arnd@arndb.de> In-Reply-To: From: Ilya Dryomov Date: Mon, 25 Mar 2019 12:11:34 +0100 Message-ID: Subject: Re: [PATCH] rbd: avoid clang -Wuninitialized warning To: Arnd Bergmann Cc: Sage Weil , Alex Elder , Jens Axboe , clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Jason Dillaman , Ceph Development , linux-block , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 5:55 PM Arnd Bergmann wrote: > > On Fri, Mar 22, 2019 at 5:33 PM Ilya Dryomov wrote: > > > > On Fri, Mar 22, 2019 at 3:36 PM Arnd Bergmann wrote: > > > > > > diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c > > > index 4ba967d65cf9..cbcc3baf3807 100644 > > > --- a/drivers/block/rbd.c > > > +++ b/drivers/block/rbd.c > > > @@ -2399,7 +2399,7 @@ static int rbd_obj_read_from_parent(struct rbd_obj_request *obj_req) > > > &obj_req->bvec_pos); > > > break; > > > default: > > > - rbd_assert(0); > > > + BUG(); > > > } > > > } else { > > > ret = rbd_img_fill_from_bvecs(child_img_req, > > > > Hi Arnd, > > > > You did a couple of these last year in commit c6244b3b2377 ("rbd: avoid > > Wreturn-type warnings"). > > Ah, I had completely forgotten about that. Different bug and different > compiler, but same solution ;-) > > > Let's change all of those default cases to BUG > > in one go. Do you want to do that or should I? > > I've prepared another patch now and sent it out, please > apply it on top. I'd like this one-line patch to stay separate though > since it captures the warning message and may need to > be backported to stable kernels later. Applied. Thanks, Ilya