Skip to contentSkip to conversation

staging: gpib: Avoid unused variable warning

PATCH In review Dave Penkler 2 participants 2 messages Apr 27, 2025 – Apr 28, 2025 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 3/3 staging: gpib: Avoid unused variable warning

This addresses a warning produced by make W=1 with the configuration parameter CONFIG_GPIB_PCMCIA=y

ines/ines_gpib.c:1115:28: warning: variable 'dev' set but not used [-Wunused-but-set-variable]

Remove the declaration and assignment of the unused variable.

---
V1 -> V2
Remove the setting of the unused variable and say so in the commit message

 drivers/staging/gpib/ines/ines_gpib.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/gpib/ines/ines_gpib.c +0 -3
index a16219c0f7c8..c851fd014f48 100644
@@ -1112,12 +1112,9 @@ static int ines_gpib_config_iteration(struct pcmcia_device *link, void *priv_dat
  */
 static int ines_gpib_config(struct pcmcia_device *link)
 {
-	struct local_info *dev;
 	int retval;
 	void __iomem *virt;
 
-	dev = link->priv;
-
 	retval = pcmcia_loop_config(link, &ines_gpib_config_iteration, NULL);
 	if (retval) {
 		dev_warn(&link->dev, "no configuration found\n");
Signature · 1 line
2.49.0
#1 lore raw
Quoted 5 lines · Dave Penkler

This addresses a warning produced by make W=1 with the configuration parameter CONFIG_GPIB_PCMCIA=y

ines/ines_gpib.c:1115:28: warning: variable 'dev' set but not used [-Wunused-but-set-variable]

Quoted 7 lines

Remove the declaration and assignment of the unused variable.

---
V1 -> V2
Remove the setting of the unused variable and say so in the commit message

You'll need to resend the whole patchset.

regards,
dan carpenter