From: Simon Sandström Date: Wed, 29 May 2019 19:42:22 +0000 (+0200) Subject: staging: kpc2000: replace bogus variable name in core.c X-Git-Tag: v5.4-rc1~602^2~372 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5a4c0188cbbb4219acb7bf14d7c81a4fb0656d4;p=platform%2Fkernel%2Flinux-rpi.git staging: kpc2000: replace bogus variable name in core.c "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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 0b17243..a84cf82 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -313,24 +313,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(®s, 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*)®s, sizeof(regs)); if (ret) return -EFAULT; - return sizeof(temp); + return sizeof(regs); } default: