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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21F10C77B7C for ; Tue, 9 May 2023 06:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235129AbjEIG6Q (ORCPT ); Tue, 9 May 2023 02:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235173AbjEIG6F (ORCPT ); Tue, 9 May 2023 02:58:05 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1B10D071; Mon, 8 May 2023 23:57:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 47CD6804D; Tue, 9 May 2023 06:57:59 +0000 (UTC) Date: Tue, 9 May 2023 09:57:58 +0300 From: Tony Lindgren To: kernel test robot Cc: Greg Kroah-Hartman , Jiri Slaby , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andy Shevchenko , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v10 1/1] serial: core: Start managing serial controllers to enable runtime PM Message-ID: <20230509065758.GZ14287@atomide.com> References: <20230508110339.38699-1-tony@atomide.com> <202305090752.w4XZxmsN-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305090752.w4XZxmsN-lkp@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org * kernel test robot [230508 23:13]: > >> drivers/tty/serial/serial_base_bus.c:97:13: warning: variable 'id' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > } else if (type == &serial_port_type) { > ^~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/tty/serial/serial_base_bus.c:102:77: note: uninitialized use occurs here > err = dev_set_name(&sbd->dev, "%s.%s.%d", type->name, dev_name(port->dev), id); > ^~ > drivers/tty/serial/serial_base_bus.c:97:9: note: remove the 'if' if its condition is always true > } else if (type == &serial_port_type) { > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/tty/serial/serial_base_bus.c:83:13: note: initialize the variable 'id' to silence this warning > int err, id; > ^ > = 0 > 1 warning generated. Thanks I'll just add else goto err_free_dev for unknown types. Regards, Tony