diff mbox series

[v2,26/42] esp: rename get_cmd_cb() to esp_select()

Message ID 20210209193018.31339-27-mark.cave-ayland@ilande.co.uk
State New
Headers show
Series esp: consolidate PDMA transfer buffers and other fixes | expand

Commit Message

Mark Cave-Ayland Feb. 9, 2021, 7:30 p.m. UTC
This better describes the purpose of the function.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/scsi/esp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Laurent Vivier March 2, 2021, 9:51 p.m. UTC | #1
Le 09/02/2021 à 20:30, Mark Cave-Ayland a écrit :
> This better describes the purpose of the function.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/scsi/esp.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
> index 921f79ae89..6736e7142c 100644
> --- a/hw/scsi/esp.c
> +++ b/hw/scsi/esp.c
> @@ -199,7 +199,7 @@ static void esp_pdma_write(ESPState *s, uint8_t val)
>      esp_set_tc(s, dmalen);
>  }
>  
> -static int get_cmd_cb(ESPState *s)
> +static int esp_select(ESPState *s)
>  {
>      int target;
>  
> @@ -256,7 +256,7 @@ static uint32_t get_cmd(ESPState *s)
>      }
>      trace_esp_get_cmd(dmalen, target);
>  
> -    if (get_cmd_cb(s) < 0) {
> +    if (esp_select(s) < 0) {
>          return 0;
>      }
>      return dmalen;
> @@ -299,7 +299,7 @@ static void do_cmd(ESPState *s)
>  
>  static void satn_pdma_cb(ESPState *s)
>  {
> -    if (get_cmd_cb(s) < 0) {
> +    if (esp_select(s) < 0) {
>          return;
>      }
>      s->do_cmd = 0;
> @@ -325,7 +325,7 @@ static void handle_satn(ESPState *s)
>  
>  static void s_without_satn_pdma_cb(ESPState *s)
>  {
> -    if (get_cmd_cb(s) < 0) {
> +    if (esp_select(s) < 0) {
>          return;
>      }
>      s->do_cmd = 0;
> @@ -351,7 +351,7 @@ static void handle_s_without_atn(ESPState *s)
>  
>  static void satn_stop_pdma_cb(ESPState *s)
>  {
> -    if (get_cmd_cb(s) < 0) {
> +    if (esp_select(s) < 0) {
>          return;
>      }
>      s->do_cmd = 0;
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff mbox series

Patch

diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 921f79ae89..6736e7142c 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -199,7 +199,7 @@  static void esp_pdma_write(ESPState *s, uint8_t val)
     esp_set_tc(s, dmalen);
 }
 
-static int get_cmd_cb(ESPState *s)
+static int esp_select(ESPState *s)
 {
     int target;
 
@@ -256,7 +256,7 @@  static uint32_t get_cmd(ESPState *s)
     }
     trace_esp_get_cmd(dmalen, target);
 
-    if (get_cmd_cb(s) < 0) {
+    if (esp_select(s) < 0) {
         return 0;
     }
     return dmalen;
@@ -299,7 +299,7 @@  static void do_cmd(ESPState *s)
 
 static void satn_pdma_cb(ESPState *s)
 {
-    if (get_cmd_cb(s) < 0) {
+    if (esp_select(s) < 0) {
         return;
     }
     s->do_cmd = 0;
@@ -325,7 +325,7 @@  static void handle_satn(ESPState *s)
 
 static void s_without_satn_pdma_cb(ESPState *s)
 {
-    if (get_cmd_cb(s) < 0) {
+    if (esp_select(s) < 0) {
         return;
     }
     s->do_cmd = 0;
@@ -351,7 +351,7 @@  static void handle_s_without_atn(ESPState *s)
 
 static void satn_stop_pdma_cb(ESPState *s)
 {
-    if (get_cmd_cb(s) < 0) {
+    if (esp_select(s) < 0) {
         return;
     }
     s->do_cmd = 0;