[PATCH] staging: kpc2000: replace bogus variable name in core.c

Simon Sandström simon at nikanor.nu
Wed May 29 19:42:22 UTC 2019


"struct kp2000_regs temp" has nothing to do with temperatures, so
replace it with the more proper name "regs".

Signed-off-by: Simon Sandström <simon at nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/core.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 4110032d0cbb..11ac57e31d45 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -314,24 +314,24 @@ static long kp2000_cdev_ioctl(struct file *filp, unsigned int ioctl_num,
 	case KP2000_IOCTL_GET_PCIE_ERROR_REG:       return readq(pcard->sysinfo_regs_base + REG_PCIE_ERROR_COUNT);
 
 	case KP2000_IOCTL_GET_EVERYTHING: {
-		struct kp2000_regs temp;
+		struct kp2000_regs regs;
 		int ret;
 
-		memset(&temp, 0, sizeof(temp));
-		temp.card_id = pcard->card_id;
-		temp.build_version = pcard->build_version;
-		temp.build_datestamp = pcard->build_datestamp;
-		temp.build_timestamp = pcard->build_timestamp;
-		temp.hw_rev = pcard->hardware_revision;
-		temp.ssid = pcard->ssid;
-		temp.ddna = pcard->ddna;
-		temp.cpld_reg = readq(pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
-
-		ret = copy_to_user((void*)ioctl_param, (void*)&temp, sizeof(temp));
+		memset(&regs, 0, sizeof(regs));
+		regs.card_id = pcard->card_id;
+		regs.build_version = pcard->build_version;
+		regs.build_datestamp = pcard->build_datestamp;
+		regs.build_timestamp = pcard->build_timestamp;
+		regs.hw_rev = pcard->hardware_revision;
+		regs.ssid = pcard->ssid;
+		regs.ddna = pcard->ddna;
+		regs.cpld_reg = readq(pcard->sysinfo_regs_base + REG_CPLD_CONFIG);
+
+		ret = copy_to_user((void*)ioctl_param, (void*)&regs, sizeof(regs));
 		if (ret)
 			return -EFAULT;
 
-		return sizeof(temp);
+		return sizeof(regs);
 		}
 
 	default:
-- 
2.20.1



More information about the devel mailing list