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 2/4] scsi: esas2r: Remove procfs support
Date: Fri, 12 Aug 2022 13:45:51 -0700	[thread overview]
Message-ID: <20220812204553.2202539-3-bvanassche@acm.org> (raw)
In-Reply-To: <20220812204553.2202539-1-bvanassche@acm.org>

Prepare for removing procfs support from the SCSI core by removing
procfs support from the esas2r driver. I think it is safe to remove
/proc/scsi/esas2r/ATTOnode because I have not found any public source
code that uses this endpoint and also because the most recent change
from @attotech.com for the esas2r driver happened nine years ago
(October 2013).

Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/esas2r/esas2r_main.c | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
index ed6b66594ee6..e347b843a6a2 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -609,20 +609,12 @@ static int __init esas2r_init(void)
 	return pci_register_driver(&esas2r_pci_driver);
 }
 
-/* Handle ioctl calls to "/proc/scsi/esas2r/ATTOnode" */
+/* Handle ioctl calls to "/dev/esas2r" */
 static const struct file_operations esas2r_fops = {
 	.compat_ioctl	= compat_ptr_ioctl,
 	.unlocked_ioctl = esas2r_host_ioctl,
 };
 
-static const struct proc_ops esas2r_proc_ops = {
-	.proc_lseek		= default_llseek,
-	.proc_ioctl		= esas2r_host_ioctl,
-#ifdef CONFIG_COMPAT
-	.proc_compat_ioctl	= compat_ptr_ioctl,
-#endif
-};
-
 static struct Scsi_Host *esas2r_scsi_host;
 static int esas2r_proc_major;
 
@@ -639,8 +631,6 @@ static void __exit esas2r_exit(void)
 	if (esas2r_proc_major > 0) {
 		esas2r_log(ESAS2R_LOG_INFO, "unregister proc");
 
-		remove_proc_entry(ATTONODE_NAME,
-				  esas2r_scsi_host->hostt->proc_dir);
 		unregister_chrdev(esas2r_proc_major, ESAS2R_DRVR_NAME);
 
 		esas2r_proc_major = 0;
@@ -728,21 +718,6 @@ const char *esas2r_info(struct Scsi_Host *sh)
 		esas2r_log_dev(ESAS2R_LOG_DEBG, &(sh->shost_gendev),
 			       "register_chrdev (major %d)",
 			       esas2r_proc_major);
-
-		if (esas2r_proc_major > 0) {
-			struct proc_dir_entry *pde;
-
-			pde = proc_create(ATTONODE_NAME, 0,
-					  sh->hostt->proc_dir,
-					  &esas2r_proc_ops);
-
-			if (!pde) {
-				esas2r_log_dev(ESAS2R_LOG_WARN,
-					       &(sh->shost_gendev),
-					       "failed to create_proc_entry");
-				esas2r_proc_major = -1;
-			}
-		}
 	}
 
 	sprintf(esas2r_info_str,

  parent 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 ` [PATCH 1/4] scsi: esas2r: Rename two functions and two variables Bart Van Assche
2022-08-12 20:45 ` Bart Van Assche [this message]
2022-08-12 20:45 ` [PATCH 3/4] scsi: core: Remove procfs support 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-3-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