From patchwork Wed Dec 11 03:45:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13902918 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04ACD2451C0 for ; Wed, 11 Dec 2024 04:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733889996; cv=none; b=bY6mT2Xu2/vtfSDPfTuTXiAlxO4p7x+wAhaMSMlmWPRVDbUTUQM++sd7jSof44jCLq5/wFQxrIuPPksH6w9jHXwCnCvSviQTmE8XSGkY8cislw+1D7a7h0Cg+FV+CFiyHLUw/E+KCMCBKb/SRshdO1GS4kwyHlEv8NMDJI99u/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733889996; c=relaxed/simple; bh=4YNB6Tlahn9sjmmgCTvGLevJx3lb2+TLQfgp4i1x2Aw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=uYtbZTYW4lIvdPde4HkjwYwiLiHugFk3+gnupbt4qKwGrmJ1oaGRIF91xFunoJiRixR9rvQ7Rz5GOcMERS1YdW36KE//E0VmDaFaKePIoRgCgTd95MxmOwYpb6thhrVHkeVIZLhyWEtpx372iRpoNBl4M1edf6sFQ4mXST0W1Zk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=JqNV+3yj; arc=none smtp.client-ip=209.85.216.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="JqNV+3yj" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2eeb4d643a5so5567368a91.3 for ; Tue, 10 Dec 2024 20:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733889994; x=1734494794; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=wlSTGCSTvz6ISkV3bIGd/ah3bR4DiOy3cN/ix3OO+rI=; b=JqNV+3yjlXCkYirIor5zBfcyiwMKqE4kdgn+nB1l30OblTe3rHQYlL5zJxTHWb5e0R QtD4gxOpoYjLKAcgJXWKh6rqpzse4jKnvc6Jnep2fBffPjKJkedVjGAOzJMr05DPJasv 1cLzKjj+ElKrqWk977zWR/JcIB8lF8haKskiU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733889994; x=1734494794; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wlSTGCSTvz6ISkV3bIGd/ah3bR4DiOy3cN/ix3OO+rI=; b=RHtQkCxD2tV040Y0tqfk9epx8yreLgVrGhrgK5VNejCcsAiuYIt0pUrflMUjYeQNEB QPffP0VQtVrditZxMUEw4Sej+9w/u46TjWj+oyAhaaeOS+Ev2JqtPfaamsNRWCAehyxG bZxxcjaj21E1yB26K/5TWFjn4uQE+eVV6oqg8x4GkIjw3j4hRbaSLWzLrn0sZp4jXquE 8zUSBpbgAHav1QygEBRhy/L3R5/8Ke1GUiLTRNNy4Kj/bpy+wsgzKAdgeCM8jKm+1Bg1 A7jsRh4H0nXHmth8kfPch8W7l9nO1iOoFkEbMEYQi1fnCW/3sd/VZrzXQo/TBUK37yOC IazQ== X-Gm-Message-State: AOJu0YzGrvKgXRRRyAtIVjcdorNA5jZ5xg4o4yGeFFLpVjuqfIeBbyB1 rRdH9So+zmV/jyFc/+KVJcj/klBsMiDFLNhQOOg9tpyJrUWb5NFyT/F1AYna8Pc82zULDteiwrJ mTg== X-Gm-Gg: ASbGncvNW3zr894bVUqWoUaV1IwC3+4+hGKIBgPIwD0jsxMU0/s/TSLfkWwfNMfWgs7 CKZRxYJoAWGR6T6TknRMobnenQFesTAHQ5A1aqNhW1BcA+ixnq6rK3jRO/dFRbvWSMINtVJuZRi mnK2zl8nkb/64vl/Oz9RhkbTyIhGwWsldFOm4TIjbJBjjhq+LUdXYhHNBg/B6+IhZp0yl5oOwht 9l7DAQLbdiqPEh+vMTUvbWzGvPI8kIRdJs6pxw5+zLHkKiJmIUPG+nQwlkIQR4USKAKuGbZteDE 5MZj4k7K23cHYI98LbEIw7ym5Mw+UMaVMQ== X-Google-Smtp-Source: AGHT+IFWyuZYzAHcFwmo8bLevBLDBmqURKPdRQbX55SjkJcTlJFb4fO/BTq1MqUrXAs9I4WRcZBLpA== X-Received: by 2002:a17:90b:520e:b0:2ee:9b2c:3253 with SMTP id 98e67ed59e1d1-2f12802cf56mr2277049a91.30.1733889994425; Tue, 10 Dec 2024 20:06:34 -0800 (PST) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef26ffc948sm12477773a91.3.2024.12.10.20.06.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:06:33 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Selvin Xavier Subject: [PATCH rdma-next 1/5] RDMA/bnxt_re: Remove extra new line in bnxt_re_netdev_event Date: Tue, 10 Dec 2024 19:45:41 -0800 Message-Id: <1733888745-30939-2-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> References: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP This is a purely cosmetic change. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index b7af0d5..735bd78 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2247,7 +2247,6 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier, if (!rdev) return NOTIFY_DONE; - switch (event) { case NETDEV_UP: case NETDEV_DOWN: From patchwork Wed Dec 11 03:45:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13902919 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 215752451C0 for ; Wed, 11 Dec 2024 04:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733889999; cv=none; b=s66/U2G3UiP9hBVDK7EnCbMufir1DikVEOI/4BlWd3ETXD0Xne3jDIlwt+V5oGjzbSSI1jx/2kSnNSETLv6+o4NDVxh1ve2SpAEdLWSgHJem6FfSfjRXPxM/Wtn/HUrCksybvIVi0OQ8lLaqwcsPXobJZeerfCB0joQDY4nHt0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733889999; c=relaxed/simple; bh=qh5s924yOMAa+G3wwc6ruxX/zPfheOg6fq6Y9Osk8Zs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=gTDvBdfy2VpfgD9z5xBsIW6NRDZ8OhNgT27Hc7gkx1P4DJJV7wkIgayWFoeN20K4BG6/I0ueQc/oHBzoQUiIreILiCcfkV8V8Ffrugz+oBqooUPZ3Qb5TXBlLRafpi2TYXfiQOR+NQQIHFcj+L4JD3eV4f/d1KiRstw2GaAdVLU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=OsEHLyCK; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="OsEHLyCK" Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2ee46851b5eso4545372a91.1 for ; Tue, 10 Dec 2024 20:06:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733889997; x=1734494797; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=hlQqCak9Zw14b59krJv7Ecz881JEH8cPanY8wmMpAzg=; b=OsEHLyCKaFkvy1uR049urr3ONez740NRRbuDaaLLjYi+AVvpEHhV++9l0nRWNfuO47 kEM4Rf+ppX9CRquaPNSWbvdS3p8oQsBJVINNIfv7nseB22FPiEgUk43QuvUY1G1I6Uto qzLk+83U4CDPXPemBV9XYYmtYTGCBKDnLtkt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733889997; x=1734494797; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hlQqCak9Zw14b59krJv7Ecz881JEH8cPanY8wmMpAzg=; b=LbK0Iy47JVdr+97dm/fC6tF+a7q0k4I97NGIEMJlbhE3sc1BgVZs7zU0g9ewfy1LgA YijTh7KrcP4Uj8xdIifykABXV+WeTnOc0uYlcqqPAfwEECzj1TTbO68jaM1UEJQs1hl2 CgUnXvfQ9FU78qs1a1Tdhy3+1NDNHGPidTFsFOIWdo1K677S2Nf6IJv7u5P/2JL79KwV KwzDFhbSn65LHhBbOPVcj8tRUI4DEFJG9eFr4ST9WRMWVO40fCjnyFmOxFT+s8gERAK3 ca4aj3XDVrTb0BphtNF20SPJmzcp3sgPfS6EyimRLKwZwqV70YTHhfGsjzsfxqCrWTF2 v2Ug== X-Gm-Message-State: AOJu0YycQjmlQyIVCb3GWKHczbec8r6PeE9K+23C1aPL59P8ahJx995y xPMSzMZXFVO/9cIPw4Xc7bevlrZFQsUlmQ/2zq+J8tDWf+w1Xm677ui1rfCVoQ== X-Gm-Gg: ASbGncs3Im4pGTakOC1F0UIXbekmULq9Jp4VCOlHOsgyQaTS/TuEaBPHbgLTW0/b45w 8Yvve/+gOxOxDWEEoXo5U4JTl3JccA2WGbEco0Zf/q07iIaHoPGuR+em2l2zBzS+r3hWiKIp3XE 95dlvD9vJHXn6XEqrwX0m5C0eQCqiomNzZ6mMRkdpSYCIWHln2LDfVbXDgzaJO4Ck8KBXt2t3pC Fy2nMhLfG0H7Dj+vkKADpfngn83o/NV+ytmBDVn86cqYJ08eUy8qSb8BGB44S+PxTMlZoWQ0rbC Tgvv0/s7GRZw+klGiFKPC249mXlf3jFiMc74 X-Google-Smtp-Source: AGHT+IEsjKc5GhqtEg6PJK9CMnxR+6Bv6BTgoz/8Yc3aiO7xJ5mnQEWQunnbfdg2zbrvIdWKe6WLpA== X-Received: by 2002:a17:90b:1c05:b0:2ee:ba84:5cac with SMTP id 98e67ed59e1d1-2f127f5684fmr2440300a91.7.1733889997355; Tue, 10 Dec 2024 20:06:37 -0800 (PST) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef26ffc948sm12477773a91.3.2024.12.10.20.06.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:06:36 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Selvin Xavier Subject: [PATCH rdma-next 2/5] RDMA/bnxt_re: Remove unnecessary goto in bnxt_re_netdev_event Date: Tue, 10 Dec 2024 19:45:42 -0800 Message-Id: <1733888745-30939-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> References: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP Return directly in case of error without a goto label as there is no cleanup actions performed. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 735bd78..ae5025b 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2241,7 +2241,7 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier, real_dev = netdev; if (real_dev != netdev) - goto exit; + return NOTIFY_DONE; rdev = bnxt_re_from_netdev(real_dev); if (!rdev) @@ -2260,7 +2260,7 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier, break; } ib_device_put(&rdev->ibdev); -exit: + return NOTIFY_DONE; } From patchwork Wed Dec 11 03:45:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13902920 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B7F2451C0 for ; Wed, 11 Dec 2024 04:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890002; cv=none; b=gXbCsvRQ//CYiqsTdh09j/YUyK6+1bBlYYDk5BoXXJCYMY77bC74h4oc6nYFC1vT+hXqiwB7xZsso0kzmiCSKWDXOMKjoTjICixQ19Bwj8o3vRq9iV0obM5jhbTfJ1p5wQ9DJzUDJ1/M43dJ/RvgAF+cCWZQWrQGxLQUJ60sbEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890002; c=relaxed/simple; bh=lYmDpRjmfQu3nKlHQIjiW5WMyWgzH58IPaKAr/gdlNU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=dlcgrhy6bZf9n9+esAfj7IQfBxmCfLlnXD+dREri9Gzai5RaHa6g73tvsD1BYcv+MkdbrfMNV/Nn0ZQA/L847iKyPmGJOutZN4rAOrJlJHVYLpe2PL8UmXYbu3faXIM9/ArhpeiW8V1Z0mOWi1RSIQfrcRxsIpUMcRqaa6o9oYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=IVlx6jP8; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="IVlx6jP8" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2ee6c2d6db0so5575490a91.1 for ; Tue, 10 Dec 2024 20:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733890000; x=1734494800; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=5142/wiswFvimWP1U91SJaxlF4pV9ZCEuTfK85ioSDE=; b=IVlx6jP8GanTszN8KNNZu8tmD9zyrx38w6FZk4uJXcs9JeP1dQxY5YDzZOn1mke6JT pKG4tL3VxFilgLuV826Y6rO+14RFJxIGreayxH2aONIdOg2E+Uw21liu8p/EamJHmF2K ZQ+HywMOpy/pjh2Wfae8Oqj37+nHaVCUErYqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733890000; x=1734494800; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5142/wiswFvimWP1U91SJaxlF4pV9ZCEuTfK85ioSDE=; b=YN4gYl/7cBL9a9Vwy0D0D+HdyQYEg6S8suQIJBs45ayXR4kIYRO6PifJO8wcYWhXBA yI6HaFQJcM3IJt4+wLvpUT3DgawGH2QUTbzYMqtdDWLsv8LrSB3sU5l5KRF+J140QDn9 72ds6Y2HkT0YT754OQjIlk/aFq+adI6jcVsi5FItLoIEM6f3qB+eUmQ9KU02V88TTkk9 V4QCpL0gXyJckBpJpnaFGx/qrf3dHVzGSxgmsjfH1U/AHzGwHXQRZ5tVjl8eGJb4qArR 14VUwaSOl9Yg83OiPtWbFoT9SPOdaNaSFr82nDhHKHwbFzIe3c5dBiovPgEBcB8QvWEa cKPw== X-Gm-Message-State: AOJu0YzNXryx3mYQZegHVK+WcboxttQr7c7HEsoMwqDmshhvh1g27zvq +4tuB0WpiJODVs0SW19ibGUrIGFSwNh1FxYU0zceG+crC9rMpDpJOnTl+C+cUDbQjk46k73mAhT IzA== X-Gm-Gg: ASbGnct4cMe0l6H1KnzbJAhf2jaCfETQqeH93rh/iz4ExhmFxhD0fijN4Jcz/Zb96VS nJNhNSY2xNbMFlJsfSEAN5JLnwnKzTe7C9wwimVNKYIc9o7pEi2FHR5bHJ8fcSQzgU0ToCjV1Ys 4A81UMcKXvgm5+OVJtgWV6CGBYX1BGywIHLwtkUw+qsSMk/380dfbhqwXq1bX7FCrjvndU8KwFr 5xYC3Q7sSCl3f64S7W9Q9+kDSqqKt8qM84bHcD7fG77SnAotB6TH1SIqp/eFloaYJRlvXReUBox 1ZfPuhoyULBB0gLQuG18r5jjDsoaST8sdg== X-Google-Smtp-Source: AGHT+IF1NRMCKOF3AGRnp4A+SmgOC9UVfndAdfELchfyx31gona/Cd84f3AkPbyg5N3xuxtbPuQdCw== X-Received: by 2002:a17:90a:d450:b0:2ee:fdf3:390d with SMTP id 98e67ed59e1d1-2f128048123mr2060618a91.31.1733890000252; Tue, 10 Dec 2024 20:06:40 -0800 (PST) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef26ffc948sm12477773a91.3.2024.12.10.20.06.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:06:39 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Selvin Xavier Subject: [PATCH rdma-next 3/5] RDMA/bnxt_re: Optimize error handling in bnxt_re_probe Date: Tue, 10 Dec 2024 19:45:43 -0800 Message-Id: <1733888745-30939-4-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> References: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP Optimize error handling path in bnxt_re_probe by removing some duplicate code. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index ae5025b..75e1611 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -2321,13 +2321,9 @@ static int bnxt_re_probe(struct auxiliary_device *adev, rc = bnxt_re_add_device(adev, BNXT_RE_COMPLETE_INIT); if (rc) - goto err; - mutex_unlock(&bnxt_re_mutex); - return 0; + kfree(en_info); -err: mutex_unlock(&bnxt_re_mutex); - kfree(en_info); return rc; } From patchwork Wed Dec 11 03:45:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13902921 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D10712451C0 for ; Wed, 11 Dec 2024 04:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890005; cv=none; b=lHMF4z5TsRyDwwtYdWeA+aBZZW7J1UKBq5I2txg0OKV1KdLsWAJYXeTAy+WQxpv0lsCMVLSfS6OQj6ULTbzCsIfyFt/Gu5Nv3pt2fxf4HMR28SHWFblq2fc4SHNeFzfMzVyHc/8TpAEh6I5MPv0Ds3Qj6NqwZQZqpN/6DWEP9Vk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890005; c=relaxed/simple; bh=fO8EeUXrc2/TBt3vLeD81sdSxeYxP70yTRZeRTjeYMM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=ItkkC2QN84rOrX+eFZVINvdM6Sy2njuvqm61lztYOzzKS6CU2S9t4Xali6T9v6G8DAvUwnOP2sszhxQgUKHSAw+JyTIrxY4n5kd05ywiKvz9DemrbW2TF1LFG7ATE71Dv/a7fYDuo3cANspB+glywCVX599THDIK11Djb7rGKnY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=DRJFP0fi; arc=none smtp.client-ip=209.85.216.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="DRJFP0fi" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2efb17478adso2349568a91.1 for ; Tue, 10 Dec 2024 20:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733890003; x=1734494803; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=uTNRZXKqk1Z8hQ0CaF0SoqYPfI6bk4nicfkzpP6gq3M=; b=DRJFP0fikRBtkQ4GiHg9sQLqejRlbskY+q7fLAQcJ8GJaYaiG/hfplsF/cCrga6Lws IyyK6iQx4CZAGabkveVYRTIx/2YbyLlxH2r6QXWdqDVYZPMfNktYwdL3eYC1HB3Z1xEy Qewn0X7ohd7N8ebK3Y/p5egH/z+DlncKtzSiU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733890003; x=1734494803; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uTNRZXKqk1Z8hQ0CaF0SoqYPfI6bk4nicfkzpP6gq3M=; b=vohVJDkIB/B99j6vyCXXXyBdxdT/Z/1wUgnh3WnQt4jZr+WwroGazq5ipssAcEe9mc ZkScGJuwBqBVjBSym9Eo072LiRnBl6do2FvaiBwAERG1YDyeqd2rPWYf45EPRphff0Yr XlvMr6TMDExOOdv92YlmSBhs9ZVIGDAHIlG8NgfOvKQZbmWOFv8mP+ut4kfJoNouSV64 Y78eqaM61yPrU1GOKzhjKrIXfw0blYpCO3g0i2XviKmeFHx6BpNzKtOy2OFkFPx7MYs6 Q7/+VecM87s9WNtiBAkKEVuwJeUdJXdG3MGjU6pTF6kdV7CSvW+sAzuBP4/tDoLeOcdC hUdQ== X-Gm-Message-State: AOJu0YycuJPgpGe2neqjhwUPoL7prnZsgEp6DJVBpFSkRzHz3TbUxxbw TBkwKZkNLAlUG/UUbAliAL5LKxEP164ai1sgydMXIR42m94Z+YsjNTrjAKRFIw== X-Gm-Gg: ASbGncsO+h8CyHNruss0OMVLUlEXVsnMio6PxNQWIhjZTl9RvE4Thj+mlhzE9OFrhKC k9GXlQJFuvDf7RdHtva3Kyd8iOCTSr1RKxLkgoG8aTkeqgeknqVTh/PqCY5+2+XG/1LaCTaUOut HeMaLnLgUD1iG4Ix8FylqZ5GLvsc13apWoOQwWoBWxDV5x9aTNUqq9YKMpkhZsE5QjDhFIEmeXU cOaglGFYfyHUBYgC4SLUq1/Ur3CsxBdZmSJm0jBjmRxyWLmkAbLPQQxc+aNOiIqM4LStPJGbykI mv5cGFn4OdkGRJB+/pmW/WC9/Y6OewvA/5eN X-Google-Smtp-Source: AGHT+IFFdyD/Kkkst0eR6fZVHJEoIhV/KAfUII4ohzU7J9DEoJFr5MTC+bsMcxPeVe3NfZ35kc4g8w== X-Received: by 2002:a17:90b:4a41:b0:2ee:c9b6:c266 with SMTP id 98e67ed59e1d1-2f127fa5e74mr2374315a91.13.1733890003077; Tue, 10 Dec 2024 20:06:43 -0800 (PST) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef26ffc948sm12477773a91.3.2024.12.10.20.06.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:06:42 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Selvin Xavier Subject: [PATCH rdma-next 4/5] RDMA/bnxt_re: Eliminate need for some forward declarations Date: Tue, 10 Dec 2024 19:45:44 -0800 Message-Id: <1733888745-30939-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> References: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP Move the function definition of bnxt_re_shutdown() to avoid forward declarartion of bnxt_re_dev_uninit(). Move the function definition of bnxt_re_setup_cc() before bnxt_re_add_device() to avoid it's forward declarations. Also, forward declarartions of bnxt_re_stop_irq() and bnxt_re_dev_stop() are unnecessary. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 73 +++++++++++++++++------------------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 75e1611..5e10b54 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -79,17 +79,12 @@ MODULE_LICENSE("Dual BSD/GPL"); /* globals */ static DEFINE_MUTEX(bnxt_re_mutex); -static void bnxt_re_stop_irq(void *handle); -static void bnxt_re_dev_stop(struct bnxt_re_dev *rdev); static int bnxt_re_netdev_event(struct notifier_block *notifier, unsigned long event, void *ptr); -static struct bnxt_re_dev *bnxt_re_from_netdev(struct net_device *netdev); -static void bnxt_re_dev_uninit(struct bnxt_re_dev *rdev, u8 op_type); static int bnxt_re_hwrm_qcaps(struct bnxt_re_dev *rdev); static int bnxt_re_hwrm_qcfg(struct bnxt_re_dev *rdev, u32 *db_len, u32 *offset); -static void bnxt_re_setup_cc(struct bnxt_re_dev *rdev, bool enable); static void bnxt_re_set_db_offset(struct bnxt_re_dev *rdev) { struct bnxt_qplib_chip_ctx *cctx; @@ -302,16 +297,6 @@ static void bnxt_re_vf_res_config(struct bnxt_re_dev *rdev) &rdev->qplib_ctx); } -static void bnxt_re_shutdown(struct auxiliary_device *adev) -{ - struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev); - struct bnxt_re_dev *rdev; - - rdev = en_info->rdev; - ib_unregister_device(&rdev->ibdev); - bnxt_re_dev_uninit(rdev, BNXT_RE_COMPLETE_REMOVE); -} - static void bnxt_re_stop_irq(void *handle) { struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(handle); @@ -2123,6 +2108,30 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 op_type) return rc; } +static void bnxt_re_setup_cc(struct bnxt_re_dev *rdev, bool enable) +{ + struct bnxt_qplib_cc_param cc_param = {}; + + /* Do not enable congestion control on VFs */ + if (rdev->is_virtfn) + return; + + /* Currently enabling only for GenP5 adapters */ + if (!bnxt_qplib_is_chip_gen_p5_p7(rdev->chip_ctx)) + return; + + if (enable) { + cc_param.enable = 1; + cc_param.tos_ecn = 1; + } + + cc_param.mask = (CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ENABLE_CC | + CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_ECN); + + if (bnxt_qplib_modify_cc(&rdev->qplib_res, &cc_param)) + ibdev_err(&rdev->ibdev, "Failed to setup CC enable = %d\n", enable); +} + static void bnxt_re_update_en_info_rdev(struct bnxt_re_dev *rdev, struct bnxt_re_en_dev_info *en_info, struct auxiliary_device *adev) @@ -2192,30 +2201,6 @@ static int bnxt_re_add_device(struct auxiliary_device *adev, u8 op_type) return rc; } -static void bnxt_re_setup_cc(struct bnxt_re_dev *rdev, bool enable) -{ - struct bnxt_qplib_cc_param cc_param = {}; - - /* Do not enable congestion control on VFs */ - if (rdev->is_virtfn) - return; - - /* Currently enabling only for GenP5 adapters */ - if (!bnxt_qplib_is_chip_gen_p5_p7(rdev->chip_ctx)) - return; - - if (enable) { - cc_param.enable = 1; - cc_param.tos_ecn = 1; - } - - cc_param.mask = (CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ENABLE_CC | - CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_ECN); - - if (bnxt_qplib_modify_cc(&rdev->qplib_res, &cc_param)) - ibdev_err(&rdev->ibdev, "Failed to setup CC enable = %d\n", enable); -} - /* * "Notifier chain callback can be invoked for the same chain from * different CPUs at the same time". @@ -2376,6 +2361,16 @@ static int bnxt_re_resume(struct auxiliary_device *adev) return 0; } +static void bnxt_re_shutdown(struct auxiliary_device *adev) +{ + struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev); + struct bnxt_re_dev *rdev; + + rdev = en_info->rdev; + ib_unregister_device(&rdev->ibdev); + bnxt_re_dev_uninit(rdev, BNXT_RE_COMPLETE_REMOVE); +} + static const struct auxiliary_device_id bnxt_re_id_table[] = { { .name = BNXT_ADEV_NAME ".rdma", }, {}, From patchwork Wed Dec 11 03:45:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13902922 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 547C82451C0 for ; Wed, 11 Dec 2024 04:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890007; cv=none; b=COFsqwMS9GRxFXDItY5Iv1VVcfvcul1owj0TCxykO8ghO3RRG0cLYQmuHx9cvVNc4RWh7La0VjN/2s9+/1VTEnHnQev8hnz85YXucvWdmfA17v2I1BP/y6Ij8XntJb30Jd6SRJdHEC+ch7PgoVHVDAJpNpuIxG5QGB/++S6IvI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733890007; c=relaxed/simple; bh=/AbQhHAGXip2gWIvELB44f0eovrmLpNX4tbXGQvqq8U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=ooA9ZvNsmWbCyItvEV+hs7ussWTK/dsnsyGohrB2LL9HzUyZSv9UA2P9Ecq1wRVFHwnWVyUp6PuO7VlpboZSBYSLQsEUMViboERni8c//v1kvah6LBvp+DgV8kPWRQPsSS3KE0en/hmP/bFcWdc7/JIsR8Ik2mqrOdsoIIbMNT8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=UEueqjAZ; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="UEueqjAZ" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2ee46851b5eso4545436a91.1 for ; Tue, 10 Dec 2024 20:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1733890006; x=1734494806; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=pHO8WIMPG+IkKbx5GL/jKU/mNV7T0FGxXoSv7ZHnF1I=; b=UEueqjAZc1F2lXcbDvxzPQknTrMibRaVLMF1+MuZBN0jsAhxIwgOCFb+IUstuNeVW/ WmYiq6JxCFyz6dZMPXWhkgiQ2l0BC3hPLqgWl3TLaQ4XxXF7enx7z1PLcJ5LCJ7CZUgs NdMFjCg7g7/5gWpFWL+9lqf1+eY417ggSAQgs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733890006; x=1734494806; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pHO8WIMPG+IkKbx5GL/jKU/mNV7T0FGxXoSv7ZHnF1I=; b=AslNXmUG/yplxorRMf9dEle9ZqhEJIAcVl4RURSo7KgMmsLgILA6V+CBXUxDdDJaAH 1hVpnx6AIQyxpCjjWbVWcra2eTgz6eAixl9c4kDrET2OYumG76uCZZyuNednWejqxMoV 1LLs08Qp3sOY+hQo+HppGeAn+Q7vJUjNyRXqRc8TE+zgzutfexOXZh5f250bH4XMTKIV CwtUocomlU6Mmb8xpOUxToY3IDcop5SVVzGlRji9aU5fG7RzM/nLIl2iEW/WUWkpEc0H dcWZmNThlq6tXtBS0/X9H4wmRJTYgId573FMFKm56K+/+FoWPiH+bjd/SGHVhliQbTI2 GyAg== X-Gm-Message-State: AOJu0YxpnZs8CFLA/TwP3aLDUPwWGQOAZJAkWDBkrrHtkxg/JTHnA/l4 K4UZt4dA9mJ0e1wctdUj2rCK6sAHvD+YKEZ8f4FJjhgrRF9TX4xCwsxUcmGK+BWUbJJKj17PTJX zNg== X-Gm-Gg: ASbGncur/t5wIJA/vQQekzdbPhJdImHC2Qmb3ICelhLgo1udIXyI2UcQUdQNFcym3GD QPT20Qbl2mDAxftipZC3E7lIPXGOVn9Os472TLQLfwCHL8hiq0zyIxkkC4f5RQDdWAdj8JRVcdd F2wPzXjNgArp7ERIqS04DCJl74IywShl1XGvUtlzb8YCr6NINKSgWNzyI8QzzBnflRVtr0PO/Ze ukSnG0WMC4rBChPEq2q/fV3E2P/fY4/5ZVNTEBZ+Hwtj8tHfedPGF80Oasg1/jPkMtfBdVucND5 r8dqCg28nxNbHa4LRYtg3HeEZn7eONF2yg== X-Google-Smtp-Source: AGHT+IGzmkoDc4bKDf7QSZDpa+zmlAgFSJh4jOWaZm5yieRoyO+8exmSD4fPaO73JDFK6WwYZTj1Kw== X-Received: by 2002:a17:90b:4d11:b0:2ee:d824:b559 with SMTP id 98e67ed59e1d1-2f128035362mr1963951a91.28.1733890005869; Tue, 10 Dec 2024 20:06:45 -0800 (PST) Received: from sxavier-dev.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef26ffc948sm12477773a91.3.2024.12.10.20.06.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Dec 2024 20:06:45 -0800 (PST) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, kalesh-anakkur.purayil@broadcom.com, Selvin Xavier Subject: [PATCH rdma-next 5/5] RDMA/bnxt_re: Remove unnecessary header file inclusion Date: Tue, 10 Dec 2024 19:45:45 -0800 Message-Id: <1733888745-30939-6-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> References: <1733888745-30939-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Kalesh AP There is no need to include bnxt_ulp.h in ib_verbs.c. Remove it. Also, fixed hw_counters.c to remove unwanted header file inclusions. Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/hw_counters.c | 9 --------- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/hw_counters.c b/drivers/infiniband/hw/bnxt_re/hw_counters.c index 1e63f80..77ec2ed 100644 --- a/drivers/infiniband/hw/bnxt_re/hw_counters.c +++ b/drivers/infiniband/hw/bnxt_re/hw_counters.c @@ -37,18 +37,9 @@ * */ -#include #include -#include -#include -#include #include -#include -#include -#include - -#include "bnxt_ulp.h" #include "roce_hsi.h" #include "qplib_res.h" #include "qplib_sp.h" diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 8202339..129178b 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -52,8 +52,6 @@ #include #include -#include "bnxt_ulp.h" - #include "roce_hsi.h" #include "qplib_res.h" #include "qplib_sp.h"