All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: unexport internal function symbols
@ 2020-12-27 10:38 Minwoo Im
  2020-12-30  7:10 ` Chaitanya Kulkarni
  0 siblings, 1 reply; 3+ messages in thread
From: Minwoo Im @ 2020-12-27 10:38 UTC (permalink / raw)
  To: linux-nvme
  Cc: Keith Busch, Jens Axboe, Minwoo Im, Christoph Hellwig, Sagi Grimberg

Unexport symbols not taken from other side.  This patch also make those
two functions as static functions:

  nvme_reset_ctrl_sync
  nvme_alloc_request_qid

This patch has no functional changes.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
---
 drivers/nvme/host/core.c | 6 ++----
 drivers/nvme/host/nvme.h | 3 ---
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ce1b61519441..70a63d7c1d02 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -179,7 +179,7 @@ int nvme_reset_ctrl(struct nvme_ctrl *ctrl)
 }
 EXPORT_SYMBOL_GPL(nvme_reset_ctrl);
 
-int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
+static int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
 {
 	int ret;
 
@@ -192,7 +192,6 @@ int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(nvme_reset_ctrl_sync);
 
 static void nvme_do_delete_ctrl(struct nvme_ctrl *ctrl)
 {
@@ -578,7 +577,7 @@ struct request *nvme_alloc_request(struct request_queue *q,
 }
 EXPORT_SYMBOL_GPL(nvme_alloc_request);
 
-struct request *nvme_alloc_request_qid(struct request_queue *q,
+static struct request *nvme_alloc_request_qid(struct request_queue *q,
 		struct nvme_command *cmd, blk_mq_req_flags_t flags, int qid)
 {
 	struct request *req;
@@ -589,7 +588,6 @@ struct request *nvme_alloc_request_qid(struct request_queue *q,
 		nvme_init_request(req, cmd);
 	return req;
 }
-EXPORT_SYMBOL_GPL(nvme_alloc_request_qid);
 
 static int nvme_toggle_streams(struct nvme_ctrl *ctrl, bool enable)
 {
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 7e49f61f81df..9c4fbfe44c00 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -610,8 +610,6 @@ void nvme_start_freeze(struct nvme_ctrl *ctrl);
 #define NVME_QID_ANY -1
 struct request *nvme_alloc_request(struct request_queue *q,
 		struct nvme_command *cmd, blk_mq_req_flags_t flags);
-struct request *nvme_alloc_request_qid(struct request_queue *q,
-		struct nvme_command *cmd, blk_mq_req_flags_t flags, int qid);
 void nvme_cleanup_cmd(struct request *req);
 blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
 		struct nvme_command *cmd);
@@ -630,7 +628,6 @@ int nvme_get_features(struct nvme_ctrl *dev, unsigned int fid,
 int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count);
 void nvme_stop_keep_alive(struct nvme_ctrl *ctrl);
 int nvme_reset_ctrl(struct nvme_ctrl *ctrl);
-int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl);
 int nvme_try_sched_reset(struct nvme_ctrl *ctrl);
 int nvme_delete_ctrl(struct nvme_ctrl *ctrl);
 
-- 
2.17.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH] nvme: unexport internal function symbols
  2020-12-27 10:38 [PATCH] nvme: unexport internal function symbols Minwoo Im
@ 2020-12-30  7:10 ` Chaitanya Kulkarni
  2020-12-30 11:10   ` Minwoo Im
  0 siblings, 1 reply; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-12-30  7:10 UTC (permalink / raw)
  To: Minwoo Im, Linux-nvme
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg

On 12/27/20 2:46 AM, Minwoo Im wrote:
> Unexport symbols not taken from other side.  This patch also make those
> two functions as static functions:
>
>   nvme_reset_ctrl_sync
>   nvme_alloc_request_qid
>
> This patch has no functional changes.
change the commit log to :-


There are no callers for nvme_reset_ctrl_sync() and
nvme_alloc_request_qid()so that we keep the symbols exported.

Unexport those functions, mark them static and update the headerfile
respectively.
>
> Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
> ---
>  drivers/nvme/host/core.c | 6 ++----
>  drivers/nvme/host/nvme.h | 3 ---
>  2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index ce1b61519441..70a63d7c1d02 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -179,7 +179,7 @@ int nvme_reset_ctrl(struct nvme_ctrl *ctrl)
>  }
>  EXPORT_SYMBOL_GPL(nvme_reset_ctrl);
>  
> -int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
> +static int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
>  {
>  	int ret;
>  
> @@ -192,7 +192,6 @@ int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl)
>  
>  	return ret;
>  }
> -EXPORT_SYMBOL_GPL(nvme_reset_ctrl_sync);
>  
>  static void nvme_do_delete_ctrl(struct nvme_ctrl *ctrl)
>  {
> @@ -578,7 +577,7 @@ struct request *nvme_alloc_request(struct request_queue *q,
>  }
>  EXPORT_SYMBOL_GPL(nvme_alloc_request);
>  
> -struct request *nvme_alloc_request_qid(struct request_queue *q,
> +static struct request *nvme_alloc_request_qid(struct request_queue *q,
>  		struct nvme_command *cmd, blk_mq_req_flags_t flags, int qid)
>  {
>  	struct request *req;
> @@ -589,7 +588,6 @@ struct request *nvme_alloc_request_qid(struct request_queue *q,
>  		nvme_init_request(req, cmd);
>  	return req;
>  }
> -EXPORT_SYMBOL_GPL(nvme_alloc_request_qid);
>  
>  static int nvme_toggle_streams(struct nvme_ctrl *ctrl, bool enable)
>  {
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 7e49f61f81df..9c4fbfe44c00 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -610,8 +610,6 @@ void nvme_start_freeze(struct nvme_ctrl *ctrl);
>  #define NVME_QID_ANY -1
>  struct request *nvme_alloc_request(struct request_queue *q,
>  		struct nvme_command *cmd, blk_mq_req_flags_t flags);
> -struct request *nvme_alloc_request_qid(struct request_queue *q,
> -		struct nvme_command *cmd, blk_mq_req_flags_t flags, int qid);
>  void nvme_cleanup_cmd(struct request *req);
>  blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
>  		struct nvme_command *cmd);
> @@ -630,7 +628,6 @@ int nvme_get_features(struct nvme_ctrl *dev, unsigned int fid,
>  int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count);
>  void nvme_stop_keep_alive(struct nvme_ctrl *ctrl);
>  int nvme_reset_ctrl(struct nvme_ctrl *ctrl);
> -int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl);
>  int nvme_try_sched_reset(struct nvme_ctrl *ctrl);
>  int nvme_delete_ctrl(struct nvme_ctrl *ctrl);
>  



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH] nvme: unexport internal function symbols
  2020-12-30  7:10 ` Chaitanya Kulkarni
@ 2020-12-30 11:10   ` Minwoo Im
  0 siblings, 0 replies; 3+ messages in thread
From: Minwoo Im @ 2020-12-30 11:10 UTC (permalink / raw)
  To: Chaitanya Kulkarni
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Linux-nvme, Sagi Grimberg

Hello,

On 20-12-30 07:10:49, Chaitanya Kulkarni wrote:
> On 12/27/20 2:46 AM, Minwoo Im wrote:
> > Unexport symbols not taken from other side.  This patch also make those
> > two functions as static functions:
> >
> >   nvme_reset_ctrl_sync
> >   nvme_alloc_request_qid
> >
> > This patch has no functional changes.
> change the commit log to :-
> 
> 
> There are no callers for nvme_reset_ctrl_sync() and
> nvme_alloc_request_qid()so that we keep the symbols exported.
> 
> Unexport those functions, mark them static and update the headerfile
> respectively.

Thanks for your review!

I think I should have written some of reasons why symbols are removed.
Please let me prepare V2 patch with comment updated.

Thanks,

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2020-12-30 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 10:38 [PATCH] nvme: unexport internal function symbols Minwoo Im
2020-12-30  7:10 ` Chaitanya Kulkarni
2020-12-30 11:10   ` Minwoo Im

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.