[2/9] block: mark part_in_flight and part_in_flight_rw static
diff mbox series

Message ID 20200325154843.1349040-3-hch@lst.de
State New
Headers show
Series
  • [1/9] block: mark block_depr static
Related show

Commit Message

Christoph Hellwig March 25, 2020, 3:48 p.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/genhd.c         | 7 ++++---
 include/linux/genhd.h | 3 ---
 2 files changed, 4 insertions(+), 6 deletions(-)

Comments

Joe Perches March 26, 2020, 12:17 a.m. UTC | #1
On Wed, 2020-03-25 at 16:48 +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Some people still ask for some commit description,
not just a sign-off line.

I do think that's unnecessary though when, as here,
the patch subject is descriptive and complete.

> diff --git a/block/genhd.c b/block/genhd.c
[]
> @@ -139,7 +139,8 @@ void part_dec_in_flight(struct request_queue *q, struct hd_struct *part, int rw)
>  		part_stat_local_dec(&part_to_disk(part)->part0, in_flight[rw]);
>  }
>  
> -unsigned int part_in_flight(struct request_queue *q, struct hd_struct *part)
> +static unsigned int part_in_flight(struct request_queue *q,
> +		struct hd_struct *part)

genhd.c aligns multi-line arguments to open parenthesis,
it'd be nicer to maintain that style.

>  {
>  	int cpu;
>  	unsigned int inflight;
> @@ -159,8 +160,8 @@ unsigned int part_in_flight(struct request_queue *q, struct hd_struct *part)
>  	return inflight;
>  }
>  
> -void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
> -		       unsigned int inflight[2])
> +static void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
> +		unsigned int inflight[2])

etc.

Patch
diff mbox series

diff --git a/block/genhd.c b/block/genhd.c
index 7dafd7504493..5f9df331822a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -139,7 +139,8 @@  void part_dec_in_flight(struct request_queue *q, struct hd_struct *part, int rw)
 		part_stat_local_dec(&part_to_disk(part)->part0, in_flight[rw]);
 }
 
-unsigned int part_in_flight(struct request_queue *q, struct hd_struct *part)
+static unsigned int part_in_flight(struct request_queue *q,
+		struct hd_struct *part)
 {
 	int cpu;
 	unsigned int inflight;
@@ -159,8 +160,8 @@  unsigned int part_in_flight(struct request_queue *q, struct hd_struct *part)
 	return inflight;
 }
 
-void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
-		       unsigned int inflight[2])
+static void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
+		unsigned int inflight[2])
 {
 	int cpu;
 
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index b322e805a916..c0c5bb51fa56 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -409,9 +409,6 @@  static inline void free_part_stats(struct hd_struct *part)
 #define part_stat_local_read_cpu(gendiskp, field, cpu)			\
 	local_read(&(part_stat_get_cpu(gendiskp, field, cpu)))
 
-unsigned int part_in_flight(struct request_queue *q, struct hd_struct *part);
-void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
-		       unsigned int inflight[2]);
 void part_dec_in_flight(struct request_queue *q, struct hd_struct *part,
 			int rw);
 void part_inc_in_flight(struct request_queue *q, struct hd_struct *part,