Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1178301

Re: [PATCH] megaraid:Remove no longer required variable ret from the function megasas_sync_map_info

From Frans Klaver <fransklaver@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] megaraid:Remove no longer required variable ret from the function megasas_sync_map_info
Date 2015-07-07 12:10 +0200
Message-ID <pJxZ8-4kL-11@gated-at.bofh.it> (permalink)
References <pJwTn-3rP-13@gated-at.bofh.it> <pJwTn-3rP-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

On Tue, Jul 7, 2015 at 10:49 AM, Sumit Saxena
<sumit.saxena@avagotech.com> wrote:
> -----Original Message-----
> From: Nicholas Krause [mailto:xerofoify@gmail.com]
> Sent: Monday, July 06, 2015 9:43 PM
> To: kashyap.desai@avagotech.com
> Cc: sumit.saxena@avagotech.com; uday.lingala@avagotech.com;
> JBottomley@odin.com; megaraidlinux.pdl@avagotech.com;
> linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> 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?


> 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?


> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index 46a0f8f..b5a8c65 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -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;
>  }
>
> Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>

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

Thanks,
Frans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] megaraid:Remove no longer required variable ret from the  function megasas_sync_map_info Frans Klaver <fransklaver@gmail.com> - 2015-07-07 12:10 +0200
  RE: [PATCH] megaraid:Remove no longer required variable ret from the  function megasas_sync_map_info Sumit Saxena <sumit.saxena@avagotech.com> - 2015-07-07 13:10 +0200

csiph-web