Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp612699pxb; Fri, 16 Apr 2021 13:41:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRUTn+J28EYwbOVQr41TAMbGAL3zv7PAzNLJOQDOMV7vqLtc8hrfCRVdPBmtr8wMtolG+/ X-Received: by 2002:a17:906:8a86:: with SMTP id mu6mr10040476ejc.505.1618605696664; Fri, 16 Apr 2021 13:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618605696; cv=none; d=google.com; s=arc-20160816; b=m9oRg5RZOmOQmo91Rd1NxeZgIboBfu3zD9zB39Np7uOvKxhT7uf7/GJFDAfONmlHHV DHZavUz9NgleV0UlSuSzKI5PY38b3ykCaSqZIB/NGhFYzULvFXZIKcuTA81/P4unzi21 3YcWp5RKnmgJazhMUmWxfA879xjqiUXgPjuKfhJUFocHJBvcMHf9QnZ8BgIOxayjCXLr kggPkrEfvcLL0+L5L84uP3BGwj8W43I4+DfaaQJLl70T3XaSrXIQffhbGRvdVkkG0mlV 47kDehZuX/b7/8/D0HmQCQx6+5AkIgbsBU+elkLRmgbgA8jWLaBb/7DUjhPcsSTCgBgE luTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date; bh=C2HqFI+NLdg+t4l/kLZPPmpaC+LPhBSagWzxONi1ZFc=; b=vwhWfh+6leET8zY1D3i9OgclByZp7xTFnAEZbNYyRhzME3XofWfq6TW6Ejcg8AGfCE WwUfBmg2zCyB0K5OauNRGgs2cB91MQpvc4tx1Me6uQrz5101FteNKiqfJ3GA+ZERmz75 yN5LG1rYu6XyUNY8ag0DA6JGa87K9ga+T/3odzC+9Y2qjjcHif670d0bTWcaulP5yKA4 qb48r9PNq0ABeHFVRFFXDvO2d3Em99WJY6qx8rkwHGjEqJHSQyRPjaeOs6sLAB3Y8cZU xdg2z9RME9hTyVj6EFZgp3XuvqimfGWTPEAsiwvWYRXvFEvgREG2/o84EJ4xtygMe8S9 TVfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne7si5454070ejc.604.2021.04.16.13.41.13; Fri, 16 Apr 2021 13:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242924AbhDPRet (ORCPT + 99 others); Fri, 16 Apr 2021 13:34:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:40040 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236140AbhDPRes (ORCPT ); Fri, 16 Apr 2021 13:34:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id F30D2ADFB; Fri, 16 Apr 2021 17:34:20 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id DED80DA790; Fri, 16 Apr 2021 19:32:03 +0200 (CEST) Date: Fri, 16 Apr 2021 19:32:03 +0200 From: David Sterba To: Khaled ROMDHANI Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH-next] fs/btrfs: Fix uninitialized variable Message-ID: <20210416173203.GE7604@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Khaled ROMDHANI , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20210413130604.11487-1-khaledromdhani216@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210413130604.11487-1-khaledromdhani216@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 02:06:04PM +0100, Khaled ROMDHANI wrote: > The variable zone is not initialized. It > may causes a failed assertion. Failed assertion means the 2nd one checking that the result still fits to 32bit type. That would mean that none of the cases were hit, but all callers pass valid values. It would be better to add a default: case to catch that explicitly, though hitting that is considered 'will not happen'.