Skip to contentSkip to conversation

megaraid:Remove no longer required variable ret from the function megasas_sync_map_info

PATCH Sumit Saxena 2 participants 3 messages Jul 7, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Sumit Saxena

author Acked-by
#1 lore raw

-----Original Message-----
From: Nicholas Krause [mailto:[email protected]]
Sent: Monday, July 06, 2015 9:43 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] megaraid:Remove no longer required variable ret from the function megasas_sync_map_info

This removes the no longer required variable ret due to this variable only ever being used at the end of the function megasas_sync_map_info without changing it's value from the orginal setting of its value to zero due to this just remove the variable ret and just return the value of zero directly here in order to indicate to the caller the call to this function has run successfully without any non recoverable issues.

---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 46a0f8f..b5a8c65 100644

drivers/scsi/megaraid/megaraid_sas_fusion.c +0 -0
@@ -836,7 +836,7 @@ megasas_get_map_info(struct megasas_instance

*instance) int megasas_sync_map_info(struct megasas_instance *instance) {
- int ret = 0, i;
+ int i;
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
u32 size_sync_info, num_lds;
@@ -906,7 +906,7 @@ megasas_sync_map_info(struct megasas_instance *instance)

instance->instancet->issue_dcmd(instance, cmd);

- return ret;
+ return 0;
}

/*
--
2.1.4

#2 lore raw

Can't seem to find the original, so here's a reply to the ack mail.

Quoted 9 lines · Sumit Saxena

-----Original Message-----
From: Nicholas Krause [mailto:[email protected]]
Sent: Monday, July 06, 2015 9:43 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] megaraid:Remove no longer required variable ret from the function megasas_sync_map_info

Isn't something shorter like

[PATCH] megaraid: remove pointless variable

much more readable?

Quoted 6 lines

This removes the no longer required variable ret due to this variable only ever being used at the end of the function megasas_sync_map_info without changing it's value from the orginal setting of its value to zero due to this just remove the variable ret and just return the value of zero directly here in order to indicate to the caller the call to this function has run successfully without any non recoverable issues.

No interpunction?

Quoted 27 lines
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +2 -2
index 46a0f8f..b5a8c65 100644
@@ -836,7 +836,7 @@ megasas_get_map_info(struct megasas_instance
 *instance)  int  megasas_sync_map_info(struct megasas_instance *instance)
 {
-       int ret = 0, i;
+       int i;
        struct megasas_cmd *cmd;
        struct megasas_dcmd_frame *dcmd;
        u32 size_sync_info, num_lds;
@@ -906,7 +906,7 @@ megasas_sync_map_info(struct megasas_instance
 *instance)
 
        instance->instancet->issue_dcmd(instance, cmd);
 
-       return ret;
+       return 0;
 }
 
Quoted 1 line

This ack in an outlook-style response confused the hell out of me ;).

Thanks,
Frans

#3 lore raw
Quoted 66 lines

-----Original Message-----
From: Frans Klaver [mailto:[email protected]]
Sent: Tuesday, July 07, 2015 3:37 PM
To: Sumit Saxena
Cc: Nicholas Krause; Kashyap Desai; Uday Lingala; [email protected]; PDL,MEGARAIDLINUX; [email protected]; [email protected]
Subject: Re: [PATCH] megaraid:Remove no longer required variable ret from the
function megasas_sync_map_info

Can't seem to find the original, so here's a reply to the ack mail.

Quoted 9 lines · Sumit Saxena

-----Original Message-----
From: Nicholas Krause [mailto:[email protected]]
Sent: Monday, July 06, 2015 9:43 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] megaraid:Remove no longer required variable ret from the function megasas_sync_map_info

Isn't something shorter like

[PATCH] megaraid: remove pointless variable

much more readable?

Quoted 7 lines

This removes the no longer required variable ret due to this variable only ever being used at the end of the function megasas_sync_map_info without changing it's value from the orginal setting of its value to zero due to this just remove the variable ret and just return the value of zero directly here in order to indicate to the caller the call to this function has run successfully without any non recoverable issues.

No interpunction?

Quoted 23 lines
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -1
index 46a0f8f..b5a8c65 100644
@@ -836,7 +836,7 @@ megasas_get_map_info(struct megasas_instance
 *instance)  int  megasas_sync_map_info(struct megasas_instance
 *instance) {
-       int ret = 0, i;
+       int i;
        struct megasas_cmd *cmd;
        struct megasas_dcmd_frame *dcmd;
        u32 size_sync_info, num_lds;
@@ -906,7 +906,7 @@ megasas_sync_map_info(struct megasas_instance
 *instance)
 
        instance->instancet->issue_dcmd(instance, cmd);
 
Quoted 7 lines
Quoted 5 lines
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -1
-       return ret;
+       return 0;
 }
 

This ack in an outlook-style response confused the hell out of me ;).

Sorry for confusion. I just got new laptop with default outlook settings so last message sent was in outlook-style, configured it now.

Thanks,
Sumit

Quoted 3 lines

Thanks,
Frans