Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp34969lqd; Tue, 23 Apr 2024 13:43:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUXI8RpJi0qy9XFQumhZxuQP6oSwmAhZgwE/1GyEC0z1eNKtgS82ISigqP6YgveCJX7UvPui6GITQJ3ztpWq11o2GXfcIhDYm+vtr7tXQ== X-Google-Smtp-Source: AGHT+IGgFRDnYIYC8E+xD9BfFAKxroAbaHosWLxzWqH+WtcY3/4+52DqnZGS5XUigM5FtfefoBB8 X-Received: by 2002:a05:620a:5dcc:b0:78d:5d4d:f209 with SMTP id xy12-20020a05620a5dcc00b0078d5d4df209mr656636qkn.66.1713904999753; Tue, 23 Apr 2024 13:43:19 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g4-20020a05620a218400b0079076da0c7esi4886786qka.38.2024.04.23.13.43.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:43:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=csfrQAf9; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-155859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6ABF31C220C2 for ; Tue, 23 Apr 2024 20:43:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7DC5142E8B; Tue, 23 Apr 2024 20:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="csfrQAf9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A03E433A0; Tue, 23 Apr 2024 20:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713904989; cv=none; b=cemYkn9jJYgLg1XrF5Ib/bHVJNZqHULlS8rSiKThbIsT+AtbePIxudZwCh7/h37+Tz8hBT1e8JFsWc/bnrC1e4mK5JYnPKgyV3w6DEzBfvRyc5pjGPjpd9CCoaLY6/JN4Z91EQyU5/+vNqu84J3cPUBcmDrLevVqqg+PdFsxY/w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713904989; c=relaxed/simple; bh=9d8kgnS+GuFxNleqgThQ2tyzjOU0Gs4O6lFQMRb9NNY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n4mUdNwnvPEUS9/caCyczCkD/ceAADEy1L1dVHrDEtDOD9gQb1Qz/sqdyBvAQg0qkzWyUjGMOxWSHdYBABsSj3lR+Wn+uiqkdtZC81xmxEkJj0i2Bu4C6XoBKK5EkabRZwe8wd7v08V6H9wjkpX8OTIHnQiGIir1xtEU3QaXAOM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=csfrQAf9; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713904988; x=1745440988; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9d8kgnS+GuFxNleqgThQ2tyzjOU0Gs4O6lFQMRb9NNY=; b=csfrQAf9k7OcsTZb8ePuVFfL2HHvtTRGERCTzjAx4tq8gz5XRiKaJ7bz Posg4I1KCNF2cB0U0pfpCnUDGm5t4UFZbL8xEpM1ho+zrwXRDCl4iHCf9 z64v5hUmLRbuRx7zb3q6tjG7QLerE/boAKwDz8q5NtX7jbJcGichQeByD f/+AKLVpRKjzJWwhBvE5xrDTQB5PI/mnon34T3TLUe1D+QMM578rKa0ov tt03BlOSa0rAVNRgFaGgrKgQO1qS9X6saZuamb5Axv2OLtR6Ca9GfEysc lM1JH2/D527zKxirNtzkY+DsFaCUdwsi4/unHDVYJIABJhcGD2mNZ4zx5 g==; X-CSE-ConnectionGUID: 6+iThrn2RoSs5kQ5q02ApA== X-CSE-MsgGUID: bLy5zUWHRae1KzfZTNmDoA== X-IronPort-AV: E=McAfee;i="6600,9927,11053"; a="9340574" X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="9340574" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2024 13:43:08 -0700 X-CSE-ConnectionGUID: spfHzm6QQnCATeoPmfdY5w== X-CSE-MsgGUID: CVcwAEDzS8SdURosSGWeDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,222,1708416000"; d="scan'208";a="24521216" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa007.fm.intel.com with ESMTP; 23 Apr 2024 13:43:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5AFC6192; Tue, 23 Apr 2024 23:43:04 +0300 (EEST) From: Andy Shevchenko To: Leon Romanovsky , Konstantin Taranov , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Long Li , Ajay Sharma , Jason Gunthorpe , Andy Shevchenko Subject: [PATCH v1 1/1] RDMA/mana_ib: Fix compilation error Date: Tue, 23 Apr 2024 23:42:58 +0300 Message-ID: <20240423204258.3669706-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The compilation with CONFIG_WERROR=y is broken: ../hw/mana/device.c:88:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!upper_ndev) { ^~~~~~~~~~~ Fix this by assigning the ret to -ENODEV in respective condition. Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1") Signed-off-by: Andy Shevchenko --- drivers/infiniband/hw/mana/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c index fca4d0d85c64..4c45f8681e7f 100644 --- a/drivers/infiniband/hw/mana/device.c +++ b/drivers/infiniband/hw/mana/device.c @@ -88,6 +88,7 @@ static int mana_ib_probe(struct auxiliary_device *adev, if (!upper_ndev) { rcu_read_unlock(); ibdev_err(&dev->ib_dev, "Failed to get master netdev"); + ret = -ENODEV; goto free_ib_device; } ether_addr_copy(mac_addr, upper_ndev->dev_addr); -- 2.43.0.rc1.1336.g36b5255a03ac