[PATCH 5/5] ata: sata_dwc_460ex: drop redundant struct copy of port_info

From: Rosen Penev

Date: Tue Jun 30 2026 - 16:27:13 EST


sata_dwc_port_info[0] was copied to a local auto variable before being
referenced via a pointer array. The local copy is never modified, so
drop it and point ppi directly at the static data. This saves ~104
bytes of stack and makes the const qualification consistent.

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
drivers/ata/sata_dwc_460ex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index fb6042b9ac27..af00acf155d4 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1133,8 +1133,8 @@ static int sata_dwc_probe(struct platform_device *ofdev)
int err = 0;
int irq;
struct ata_host *host;
- struct ata_port_info pi = sata_dwc_port_info[0];
- const struct ata_port_info *ppi[] = { &pi, NULL };
+ const struct ata_port_info *pi = &sata_dwc_port_info[0];
+ const struct ata_port_info *ppi[] = { pi, NULL };
struct resource *res;

/* Allocate DWC SATA device */
--
2.55.0