public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Arthur Kiyanovski <akiyano@amazon•com>
To: David Miller <davem@davemloft•net>,
	Jakub Kicinski <kuba@kernel•org>, <netdev@vger•kernel.org>
Cc: Arthur Kiyanovski <akiyano@amazon•com>,
	"Woodhouse, David" <dwmw@amazon•com>,
	"Machulsky, Zorik" <zorik@amazon•com>,
	"Matushevsky, Alexander" <matua@amazon•com>,
	Saeed Bshara <saeedb@amazon•com>, "Wilson, Matt" <msw@amazon•com>,
	"Liguori, Anthony" <aliguori@amazon•com>,
	"Bshara, Nafea" <nafea@amazon•com>,
	"Belgazal, Netanel" <netanel@amazon•com>,
	"Saidi, Ali" <alisaidi@amazon•com>,
	"Herrenschmidt, Benjamin" <benh@amazon•com>,
	"Dagan, Noam" <ndagan@amazon•com>,
	"Agroskin, Shay" <shayagr@amazon•com>,
	"Arinzon, David" <darinzon@amazon•com>
Subject: [PATCH V1 net-next 01/10] net: ena: Change return value of ena_calc_io_queue_size() to void
Date: Thu, 6 Jan 2022 19:29:06 +0000	[thread overview]
Message-ID: <20220106192915.22616-2-akiyano@amazon.com> (raw)
In-Reply-To: <20220106192915.22616-1-akiyano@amazon.com>

ena_calc_io_queue_size() always returns 0, therefore make it a
void function and update the calling function to stop checking
the return value.

Signed-off-by: Shay Agroskin <shayagr@amazon•com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon•com>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 05cadc4e66e0..78770984ec95 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -4146,7 +4146,7 @@ static void ena_release_bars(struct ena_com_dev *ena_dev, struct pci_dev *pdev)
 }
 
 
-static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx)
+static void ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx)
 {
 	struct ena_admin_feature_llq_desc *llq = &ctx->get_feat_ctx->llq;
 	struct ena_com_dev *ena_dev = ctx->ena_dev;
@@ -4208,8 +4208,6 @@ static int ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx)
 	ctx->max_rx_queue_size = max_rx_queue_size;
 	ctx->tx_queue_size = tx_queue_size;
 	ctx->rx_queue_size = rx_queue_size;
-
-	return 0;
 }
 
 /* ena_probe - Device Initialization Routine
@@ -4320,8 +4318,8 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	ena_dev->intr_moder_rx_interval = ENA_INTR_INITIAL_RX_INTERVAL_USECS;
 	ena_dev->intr_delay_resolution = ENA_DEFAULT_INTR_DELAY_RESOLUTION;
 	max_num_io_queues = ena_calc_max_io_queue_num(pdev, ena_dev, &get_feat_ctx);
-	rc = ena_calc_io_queue_size(&calc_queue_ctx);
-	if (rc || !max_num_io_queues) {
+	ena_calc_io_queue_size(&calc_queue_ctx);
+	if (unlikely(!max_num_io_queues)) {
 		rc = -EFAULT;
 		goto err_device_destroy;
 	}
-- 
2.32.0


  reply	other threads:[~2022-01-06 19:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 19:29 [PATCH V1 net-next 00/10] ENA: capabilities field and cosmetic Arthur Kiyanovski
2022-01-06 19:29 ` Arthur Kiyanovski [this message]
2022-01-06 19:29 ` [PATCH V1 net-next 02/10] net: ena: Add capabilities field with support for ENI stats capability Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 03/10] net: ena: Change ENI stats support check to use capabilities field Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 04/10] net: ena: Update LLQ header length in ena documentation Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 05/10] net: ena: Remove redundant return code check Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 06/10] net: ena: Move reset completion print to the reset function Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 07/10] net: ena: Remove ena_calc_queue_size_ctx struct Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 08/10] net: ena: Add debug prints for invalid req_id resets Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 09/10] net: ena: Change the name of bad_csum variable Arthur Kiyanovski
2022-01-06 19:29 ` [PATCH V1 net-next 10/10] net: ena: Extract recurring driver reset code into a function Arthur Kiyanovski
2022-01-07  3:00   ` Jakub Kicinski
2022-01-07 20:12     ` Kiyanovski, Arthur
2022-01-07 20:21       ` Jakub Kicinski
2022-01-08 10:33   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220106192915.22616-2-akiyano@amazon.com \
    --to=akiyano@amazon$(echo .)com \
    --cc=aliguori@amazon$(echo .)com \
    --cc=alisaidi@amazon$(echo .)com \
    --cc=benh@amazon$(echo .)com \
    --cc=darinzon@amazon$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dwmw@amazon$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=matua@amazon$(echo .)com \
    --cc=msw@amazon$(echo .)com \
    --cc=nafea@amazon$(echo .)com \
    --cc=ndagan@amazon$(echo .)com \
    --cc=netanel@amazon$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=saeedb@amazon$(echo .)com \
    --cc=shayagr@amazon$(echo .)com \
    --cc=zorik@amazon$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox