Skip to contentSkip to conversation

hwrng: amd - use PMBASE_OFFSET consistently

PATCH In review Thorsten Blum 2 participants 2 messages Oct 8 – Oct 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwrng: amd - use PMBASE_OFFSET consistently

Use PMBASE_OFFSET instead of the hard-coded 0xF0 and add the missing space to the ioport_map() error message.

---
 drivers/char/hw_random/amd-rng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/hw_random/amd-rng.c +2 -2
index fb5422612182..ef177c99515d 100644
@@ -158,14 +158,14 @@ static int __init amd_rng_mod_init(void)
 
 	if (!request_region(pmbase + PMBASE_OFFSET, PMBASE_SIZE, DRV_NAME)) {
 		dev_err(&pdev->dev, DRV_NAME " region 0x%x already in use!\n",
-			pmbase + 0xF0);
+			pmbase + PMBASE_OFFSET);
 		err = -EBUSY;
 		goto out;
 	}
 
 	priv->iobase = ioport_map(pmbase + PMBASE_OFFSET, PMBASE_SIZE);
 	if (!priv->iobase) {
-		pr_err(DRV_NAME "Cannot map ioport\n");
+		pr_err(DRV_NAME " cannot map ioport\n");
 		err = -EINVAL;
 		goto err;
 	}

base-commit: 666d66df25253070cb297cb920b0bcfcfe5eb871

maintainer
#1 lore raw
Quoted 7 lines · Thorsten Blum

Use PMBASE_OFFSET instead of the hard-coded 0xF0 and add the missing space to the ioport_map() error message.

---
 drivers/char/hw_random/amd-rng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt