Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp854209img; Fri, 22 Mar 2019 09:58:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLRE1smjMixoa719S4NiCSTxl3ZggF3M20b6eiOyutXQB7cZDhcjmN7heZdWnpWurPCf7p X-Received: by 2002:a17:902:2e03:: with SMTP id q3mr10398689plb.166.1553273907839; Fri, 22 Mar 2019 09:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553273907; cv=none; d=google.com; s=arc-20160816; b=g5s/G/QDhheSWCRnDBCiOaDuz4aghm7SokmM6YUg4CBALrYyf8vxuYtmI5bhtmoKRh dwgDZk9vtdsng70by59Qs+OgJUZAkOUfT0/X/LP2Pp/E2L90pSZFdH3QylnazahgMzCD l9LQ0GAC1AMuxvJUOB5Eu840rgdhSe+a750tnAWAFPFrRpkTV1+G7fj3NhlTibg9Sdje /8gYQByky0556euHhPf3LXOqnzb3WnCEAAiBIYmXzK3hc9uVIqKWcFjrmZrRBlS/2437 4vDy+fuxm9B8Dye4h9MA8uXlV5ITnqJhx/WPaTot3A8+lsa/b6r577ffb69x0fw8pxHl vckQ== 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; bh=9tD5n0asYDCO8USwL0aVBFkOPvKyu6yg8H1zkOYw+VU=; b=0Y/J2NKGZiVx9QAsxv3ZRSN1behEsp0t1FF97pgxj/Jn5wwE4dEZJne0H9XWJvlO4W EzmGyhSl1eSN8CWaPteDpAD5TryA0xd9qro3w8PsJVO29GzRTRU+YITjj4EtA25Auyor 2PXhm1nUGSdpts5v03TRZJkv6Mc6N1r3Zx3auoXuCXJEUaDX8BI8JM4yjp/A0yOxtHCG rDfiVo+Tcrn/ko9Sx+Gj/0bJWfTPAwZwd0laVh+A7ptvllii4AlQUhXDPRvGDJFuYuTk bqp3rpdB+6j6s2JpRCSDTn62Hq6xsdu0z9bOZ1YgmCYm5bTuCgSO8PgPFoIhhgsJFsOd ceOg== ARC-Authentication-Results: i=1; mx.google.com; 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 a21si6995647pgg.330.2019.03.22.09.58.09; Fri, 22 Mar 2019 09:58:27 -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; 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 S1728338AbfCVQzb (ORCPT + 99 others); Fri, 22 Mar 2019 12:55:31 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44834 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728175AbfCVQz3 (ORCPT ); Fri, 22 Mar 2019 12:55:29 -0400 Received: by mail-qk1-f195.google.com with SMTP id y5so1600765qkc.11; Fri, 22 Mar 2019 09:55:28 -0700 (PDT) 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=9tD5n0asYDCO8USwL0aVBFkOPvKyu6yg8H1zkOYw+VU=; b=L5HhXIxrNitDaYAe+4bc+ADBXfP1SH1yUEk/HqIQcHq+HWQKWQ7NHJIho4DgINYJoF OcCdFhMUZKqQ8+2xLN+qJW8NzWY9rAgbbcTWyhcPTGAVN4SU1EWGsU0yKaiZcG+SXtWr YpTeU2TZLGNdRSSDxuZFZc6mn1HxZA1P1A3MfarPDC+WtmrWQ0961icxkWpibyYB752V i/81qecbTZGeOmXiF7jgy+5TAINgKAioaRHbiLFc51eZuOR9/8RLntY2uVGpy9D6YAtk 9/qo1xrew1KUVwvTg3yU4Lkh/EknRWsnEZPiU7IeuKZDn5gKfYOk2WkKlOB43tl0/kxu W7Vg== X-Gm-Message-State: APjAAAXy+UZ25KDQMCpJlQyMuSkXK6b4Kt2kANv7VXAifjQi688c1q3t wOmuDlzRiSSgRX9+cQchQTpBfuHFQmkhU96SDf8= X-Received: by 2002:a37:b386:: with SMTP id c128mr8060721qkf.330.1553273727904; Fri, 22 Mar 2019 09:55:27 -0700 (PDT) MIME-Version: 1.0 References: <20190322143643.1317312-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Fri, 22 Mar 2019 17:55:11 +0100 Message-ID: Subject: Re: [PATCH] rbd: avoid clang -Wuninitialized warning To: Ilya Dryomov 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: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. Arnd