Hi

Am 28.11.20 um 23:41 schrieb Sam Ravnborg:
Fix warnings by deleting unused code. The register reads are
kept as it is unknown if there are any hidden side-effects.

v2:
   - Update subject (Lee)

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Antonino Daplas <[email protected]>
Cc: [email protected]
Cc: Lee Jones <[email protected]>
---
  drivers/video/fbdev/nvidia/nv_setup.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/video/fbdev/nvidia/nv_setup.c 
b/drivers/video/fbdev/nvidia/nv_setup.c
index 2fa68669613a..5404017e6957 100644
--- a/drivers/video/fbdev/nvidia/nv_setup.c
+++ b/drivers/video/fbdev/nvidia/nv_setup.c
@@ -89,9 +89,8 @@ u8 NVReadSeq(struct nvidia_par *par, u8 index)
  }
  void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value)
  {
-       volatile u8 tmp;
- tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a);
+       VGA_RD08(par->PCIO, par->IOBase + 0x0a);

This again looks like it sets up the attribute register. I hope this isn't optimized away now.

Acked-by: Thomas Zimmermann <[email protected]>

        if (par->paletteEnabled)
                index &= ~0x20;
        else
@@ -101,9 +100,7 @@ void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value)
  }
  u8 NVReadAttr(struct nvidia_par *par, u8 index)
  {
-       volatile u8 tmp;
-
-       tmp = VGA_RD08(par->PCIO, par->IOBase + 0x0a);
+       VGA_RD08(par->PCIO, par->IOBase + 0x0a);
        if (par->paletteEnabled)
                index &= ~0x20;
        else


--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to