LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: kpc2000: replace bogus variable name in core.c
@ 2019-05-29 19:42 Simon Sandström
  2019-05-31 11:50 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Sandström @ 2019-05-29 19:42 UTC (permalink / raw)
  To: gregkh; +Cc: jeremy, simon, dan.carpenter, devel, linux-kernel

"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@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: kpc2000: replace bogus variable name in core.c
  2019-05-29 19:42 [PATCH] staging: kpc2000: replace bogus variable name in core.c Simon Sandström
@ 2019-05-31 11:50 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-05-31 11:50 UTC (permalink / raw)
  To: Simon Sandström; +Cc: gregkh, devel, linux-kernel

On Wed, May 29, 2019 at 09:42:22PM +0200, Simon Sandström wrote:
> "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@nikanor.nu>
> ---

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-31 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 19:42 [PATCH] staging: kpc2000: replace bogus variable name in core.c Simon Sandström
2019-05-31 11:50 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).