From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 00912301000; Tue, 14 Oct 2025 15:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760455553; cv=none; b=JoYhddvhY0nDfDan9NQzRMP6VsevnVT4OGqjJKNu+ByOSHY+YY90MHqGxAck1/ZeJ5hGIWKfEWZFFTkn8zhJ/7lz2x/ptWAVcK85AxvMQe+g/dRQYrLUTOwGpDp2wuBIk9oKhttCPS3Q+R14X4s2bTFZb6cBYAy3aw83bTlhoqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760455553; c=relaxed/simple; bh=wNa3DuvAMhvPEjR2gCMGl0nFFBwN+pt81lUdYbdjvA0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l754pzbh4ZTG/UTzx37A+Xwcpggx2HSG/D+YdtqQL/QXNocn4isyNm5TXBuksgWOOUUi55ZqUd+noZlHrMY2LLGQYEdE3FUdcehExlOSJ2sNVOFqyX+MUWY06RggiQupk4qAL7hljM0IVN6Vdjs4Eoaa4T1Pm8R45hzGA8CUf2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=AX0X6Lzv; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="AX0X6Lzv" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 4A248C09F98; Tue, 14 Oct 2025 15:25:31 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 543E1606EC; Tue, 14 Oct 2025 15:25:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 744C7102F22B0; Tue, 14 Oct 2025 17:25:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1760455549; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=L8xSHmDqJqypWN0BQtijSoqyQPcRedqk94nr6mZnyuk=; b=AX0X6Lzv5aXzbg9C7x7kW0oI2A69pahCmRCe8s3K7MmSVJDi9dHyXFWBIOhc2oYGFDR0Te 5YrZJ9zl3n5KgVMB1BdJuQWyt1QLfLtun4cM2Gpxm8Y20PA7Xk+PwtT0eBvNcdfFQJmFZO /cVo2ytrdpuyp+ZZPJUcximFgFBErcyfak5tpyc3aa9GqlV9gqeEoeMFVjASYTG5jRu07S zOUVK4bs9p1ooITh3nuXIRFI0IJDlqzlTdWrPaOdYg7bL/1mLtHEryY8kI90dhQDT7KCrh 35ugoWkdUF/VKiTiMwggiP+XfbP0aeIZPRx2/oxa1fU3MyAIvaww0/0deJv14A== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Tue, 14 Oct 2025 17:25:06 +0200 Subject: [PATCH net-next 05/15] net: macb: drop macb_config NULL checking Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20251014-macb-cleanup-v1-5-31cd266e22cd@bootlin.com> References: <20251014-macb-cleanup-v1-0-31cd266e22cd@bootlin.com> In-Reply-To: <20251014-macb-cleanup-v1-0-31cd266e22cd@bootlin.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Claudiu Beznea , Richard Cochran , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Thomas Petazzoni , =?utf-8?q?Gr=C3=A9gory_Clement?= , =?utf-8?q?Beno=C3=AEt_Monin?= , Maxime Chevallier , =?utf-8?q?Th=C3=A9o_Lebrun?= , Sean Anderson X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Remove NULL checks on macb_config as it is always valid: - either it is its default value &default_gem_config, - or it got overridden using match data. Reviewed-by: Sean Anderson Signed-off-by: Théo Lebrun --- drivers/net/ethernet/cadence/macb_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index dad1188ef9d87fc3846590032995223174177e89..33e99aab1dcb360a699d0e80762ef421001d19a1 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -5485,15 +5485,13 @@ static int macb_probe(struct platform_device *pdev) } bp->num_queues = num_queues; bp->queue_mask = queue_mask; - if (macb_config) - bp->dma_burst_length = macb_config->dma_burst_length; + bp->dma_burst_length = macb_config->dma_burst_length; bp->pclk = pclk; bp->hclk = hclk; bp->tx_clk = tx_clk; bp->rx_clk = rx_clk; bp->tsu_clk = tsu_clk; - if (macb_config) - bp->jumbo_max_len = macb_config->jumbo_max_len; + bp->jumbo_max_len = macb_config->jumbo_max_len; if (!hw_is_gem(bp->regs, bp->native_io)) bp->max_tx_length = MACB_MAX_TX_LEN; -- 2.51.0