diff mbox series

[1/4] scsi: esas2r: Rename two functions and two variables

Message ID 20220812204553.2202539-2-bvanassche@acm.org
State New
Headers show
Series Remove procfs support | expand

Commit Message

Bart Van Assche Aug. 12, 2022, 8:45 p.m. UTC
Perform the following renames to make the names better reflect the purpose
of these functions and variables:
* esas2r_ioctl() -> esas2r_sdev_ioctl().
* esas2r_proc_ioctl() -> esas2r_host_ioctl().
* esas2r_proc_fops -> esas2r_fops.
* esas2r_proc_host -> esas2r_scsi_host.

This patch does not change any functionality.

Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/esas2r/esas2r.h       |  4 ++--
 drivers/scsi/esas2r/esas2r_ioctl.c |  2 +-
 drivers/scsi/esas2r/esas2r_main.c  | 20 ++++++++++----------
 3 files changed, 13 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h
index ed63f7a9ea54..890e8cd60069 100644
--- a/drivers/scsi/esas2r/esas2r.h
+++ b/drivers/scsi/esas2r/esas2r.h
@@ -966,12 +966,12 @@  const char *esas2r_info(struct Scsi_Host *);
 int esas2r_write_params(struct esas2r_adapter *a, struct esas2r_request *rq,
 			struct esas2r_sas_nvram *data);
 int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg);
-int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
+int esas2r_sdev_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
 u8 handle_hba_ioctl(struct esas2r_adapter *a,
 		    struct atto_ioctl *ioctl_hba);
 int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
 int esas2r_show_info(struct seq_file *m, struct Scsi_Host *sh);
-long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);
+long esas2r_host_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);
 
 /* SCSI error handler (eh) functions */
 int esas2r_eh_abort(struct scsi_cmnd *cmd);
diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
index 08f4e43c7d9e..5a76fc1ae038 100644
--- a/drivers/scsi/esas2r/esas2r_ioctl.c
+++ b/drivers/scsi/esas2r/esas2r_ioctl.c
@@ -1525,7 +1525,7 @@  int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg)
 	return 0;
 }
 
-int esas2r_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
+int esas2r_sdev_ioctl(struct scsi_device *sd, unsigned int cmd, void __user *arg)
 {
 	return esas2r_ioctl_handler(sd->host->hostdata, cmd, arg);
 }
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
index 7a4eadad23d7..ed6b66594ee6 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -236,7 +236,7 @@  static struct scsi_host_template driver_template = {
 	.show_info			= esas2r_show_info,
 	.name				= ESAS2R_LONGNAME,
 	.info				= esas2r_info,
-	.ioctl				= esas2r_ioctl,
+	.ioctl				= esas2r_sdev_ioctl,
 	.queuecommand			= esas2r_queuecommand,
 	.eh_abort_handler		= esas2r_eh_abort,
 	.eh_device_reset_handler	= esas2r_device_reset,
@@ -610,25 +610,25 @@  static int __init esas2r_init(void)
 }
 
 /* Handle ioctl calls to "/proc/scsi/esas2r/ATTOnode" */
-static const struct file_operations esas2r_proc_fops = {
+static const struct file_operations esas2r_fops = {
 	.compat_ioctl	= compat_ptr_ioctl,
-	.unlocked_ioctl = esas2r_proc_ioctl,
+	.unlocked_ioctl = esas2r_host_ioctl,
 };
 
 static const struct proc_ops esas2r_proc_ops = {
 	.proc_lseek		= default_llseek,
-	.proc_ioctl		= esas2r_proc_ioctl,
+	.proc_ioctl		= esas2r_host_ioctl,
 #ifdef CONFIG_COMPAT
 	.proc_compat_ioctl	= compat_ptr_ioctl,
 #endif
 };
 
-static struct Scsi_Host *esas2r_proc_host;
+static struct Scsi_Host *esas2r_scsi_host;
 static int esas2r_proc_major;
 
-long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
+long esas2r_host_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
 {
-	return esas2r_ioctl_handler(esas2r_proc_host->hostdata,
+	return esas2r_ioctl_handler(esas2r_scsi_host->hostdata,
 				    cmd, (void __user *)arg);
 }
 
@@ -640,7 +640,7 @@  static void __exit esas2r_exit(void)
 		esas2r_log(ESAS2R_LOG_INFO, "unregister proc");
 
 		remove_proc_entry(ATTONODE_NAME,
-				  esas2r_proc_host->hostt->proc_dir);
+				  esas2r_scsi_host->hostt->proc_dir);
 		unregister_chrdev(esas2r_proc_major, ESAS2R_DRVR_NAME);
 
 		esas2r_proc_major = 0;
@@ -720,10 +720,10 @@  const char *esas2r_info(struct Scsi_Host *sh)
 	 */
 
 	if (esas2r_proc_major <= 0) {
-		esas2r_proc_host = sh;
+		esas2r_scsi_host = sh;
 
 		esas2r_proc_major = register_chrdev(0, ESAS2R_DRVR_NAME,
-						    &esas2r_proc_fops);
+						    &esas2r_fops);
 
 		esas2r_log_dev(ESAS2R_LOG_DEBG, &(sh->shost_gendev),
 			       "register_chrdev (major %d)",