public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, Ming Lei <ming.lei@redhat.com>,
	Hannes Reinecke <hare@suse.de>,
	John Garry <john.garry@huawei.com>,
	Mike Christie <michael.christie@oracle.com>,
	linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Bradley Grove <linuxdrivers@attotech.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: [PATCH 1/4] scsi: esas2r: Rename two functions and two variables
Date: Fri, 12 Aug 2022 13:45:50 -0700	[thread overview]
Message-ID: <20220812204553.2202539-2-bvanassche@acm.org> (raw)
In-Reply-To: <20220812204553.2202539-1-bvanassche@acm.org>

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 --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)",

  reply	other threads:[~2022-08-12 20:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 20:45 [PATCH 0/4] Remove procfs support Bart Van Assche
2022-08-12 20:45 ` Bart Van Assche [this message]
2022-08-12 20:45 ` [PATCH 2/4] scsi: esas2r: " Bart Van Assche
2022-08-12 20:45 ` [PATCH 3/4] scsi: core: " Bart Van Assche
2022-08-12 21:17   ` Douglas Gilbert
2022-08-12 21:46     ` Bart Van Assche
2022-08-12 20:45 ` [PATCH 4/4] scsi: core: Update a source code comment Bart Van Assche
2022-08-14 12:54 ` [PATCH 0/4] Remove procfs support Avri Altman
2022-08-14 14:27   ` Bart Van Assche
2022-08-14 21:07     ` Douglas Gilbert
2022-08-15 13:38       ` Bart Van Assche
2022-08-15 16:21         ` Douglas Gilbert
2022-08-16 14:36         ` Avri Altman
2022-08-15  5:55     ` Hannes Reinecke
2022-08-15 15:26 ` Ewan Milne
2022-08-15 16:25   ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220812204553.2202539-2-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=john.garry@huawei.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxdrivers@attotech.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=ming.lei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox