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


Groups > linux.kernel > #1289503 > unrolled thread

Source code review around jump label usage

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2015-12-11 13:10 +0100
Last post2016-01-01 22:50 +0100
Articles 20 on this page of 184 — 21 participants

Back to article view | Back to linux.kernel


Contents

  Source code review around jump label usage SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-11 13:10 +0100
    Re: Source code review around jump label usage Julia Lawall <julia.lawall@lip6.fr> - 2015-12-11 13:20 +0100
    Re: Source code review around jump label usage Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-11 13:50 +0100
    Re: Source code review around jump label usage Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2015-12-11 19:10 +0100
    [PATCH 0/2] block: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-11 19:20 +0100
      [PATCH 2/2] z2ram: Delete a jump label in z2_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-11 19:30 +0100
        Re: [PATCH 2/2] z2ram: Delete a jump label in z2_init() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-12-14 01:40 +0100
          Re: [PATCH 2/2] z2ram: Delete a jump label in z2_init() Geert Uytterhoeven <geert@linux-m68k.org> - 2015-12-14 10:20 +0100
      [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-11 19:30 +0100
        Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-12-14 01:30 +0100
          Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 08:00 +0100
            Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection Julia Lawall <julia.lawall@lip6.fr> - 2015-12-14 08:20 +0100
            Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-12-14 11:10 +0100
              Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error  detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 15:10 +0100
    [PATCH] uinput: Rename a jump label in uinput_ioctl_handler() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 10:20 +0100
      Re: [PATCH] uinput: Rename a jump label in uinput_ioctl_handler() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-12-12 23:30 +0100
    [PATCH 0/7] iSCSI-target: Fine-tuning for three function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:40 +0100
      [PATCH 1/7] iscsi-target: Use a variable initialisation in  iscsi_set_default_param() directly SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:40 +0100
        Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in  iscsi_set_default_param() directly Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-12 21:00 +0100
          Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in  iscsi_set_default_param() directly SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 22:30 +0100
          Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in  iscsi_set_default_param() directly Johannes Thumshirn <jthumshirn@suse.de> - 2015-12-14 09:50 +0100
            Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in  iscsi_set_default_param() directly SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 12:40 +0100
      [PATCH 2/7] iscsi-target: Less checks in iscsi_set_default_param()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:40 +0100
      [PATCH 3/7] iscsi-target: Delete an unnecessary variable  initialisation in iscsi_create_default_params() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:50 +0100
      Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit  more obvious in iscsi_create_default_params() Julia Lawall <julia.lawall@lip6.fr> - 2015-12-12 15:50 +0100
        Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit  more obvious in iscsi_create_default_params() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 16:10 +0100
      [PATCH 6/7] iscsi-target: Delete unnecessary variable initialisations  in iscsi_check_valuelist_for_support() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:50 +0100
      [PATCH 7/7] iscsi-target: Make two variable initialisations a bit  more obvious in iscsi_check_valuelist_for_support() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:50 +0100
        Re: [PATCH 7/7] iscsi-target: Make two variable initialisations a  bit more obvious in iscsi_check_valuelist_for_support() walter harms <wharms@bfs.de> - 2015-12-12 18:20 +0100
      [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more  obvious in iscsi_create_default_params() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:50 +0100
      [PATCH 5/7] iscsi-target: Rename a jump label in  iscsi_create_default_params() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-12 15:50 +0100
    [PATCH 0/7] staging-Lustre: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 14:50 +0100
      [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
        Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 08:00 +0100
          Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 10:10 +0100
            Re: [PATCH 2/7] staging: lustre: Rename a jump label for  ptlrpc_req_finished() calls Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 10:40 +0100
              Re: staging: lustre: Rename a jump label for ptlrpc_req_finished()  calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 11:10 +0100
      [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in  six functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
        Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 15:30 +0100
          Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 15:50 +0100
            Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 16:10 +0100
              Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 18:50 +0100
                Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements  in six functions Joe Perches <joe@perches.com> - 2015-12-15 19:20 +0100
                  Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 19:30 +0100
                    Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 19:40 +0100
                      Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 20:00 +0100
                        Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 20:00 +0100
              Re: staging: lustre: Delete unnecessary goto statements in six  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 19:10 +0100
                Re: staging: lustre: Delete unnecessary goto statements in six  functions Joe Perches <joe@perches.com> - 2015-12-15 19:30 +0100
      [PATCH 3/7] staging: lustre: Rename a jump label for a kfree(key)  call SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
      [PATCH 6/7] staging: lustre: A few checks less in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
      [PATCH 5/7] staging: lustre: Less checks in mgc_process_recover_log()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
        Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 12:10 +0100
          Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 13:10 +0100
            Re: [PATCH 5/7] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 13:40 +0100
              Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 13:50 +0100
                Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-14 15:00 +0100
                  Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 18:50 +0100
                    Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-15 12:50 +0100
                      Re: staging: lustre: Less checks in mgc_process_recover_log() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-15 16:10 +0100
      [PATCH 4/7] staging: lustre: Delete an unnecessary variable  initialisation in mgc_process_recover_log() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:00 +0100
      [PATCH 7/7] staging: lustre: Rename a jump label for module_put()  calls SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-13 15:10 +0100
      [PATCH v2 0/4] staging-Lustre: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:10 +0100
        [PATCH v2 1/4] staging: lustre: Delete unnecessary goto statements in  six functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:10 +0100
        [PATCH v2 4/4] staging: lustre: Fix a jump label position in  osc_get_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100
        [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100
          Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-22 00:50 +0100
            Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-22 08:20 +0100
            Re: [PATCH v2 3/4] staging: lustre: Less checks in  mgc_process_recover_log() after error detection Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-22 09:10 +0100
        [PATCH v2 2/4] staging: lustre: Delete an unnecessary variable  initialisation in mgc_process_recover_log() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-21 20:20 +0100
    [POWERPC] bootwrapper: One check less in fsl_get_immr() after error  detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-14 23:20 +0100
      Re: [POWERPC] bootwrapper: One check less in fsl_get_immr() after  error detection Scott Wood <scottwood@freescale.com> - 2015-12-14 23:40 +0100
    [PATCH] block-LDM: One function call less in ldm_validate_tocblocks()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 10:50 +0100
      Re: [PATCH] block-LDM: One function call less in ldm_validate_tocblocks()  after error detection Julia Lawall <julia.lawall@lip6.fr> - 2015-12-23 11:50 +0100
        [PATCH 0/5] block-LDM: Improvements for exception handling SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:10 +0100
          [PATCH 1/5] block-LDM: One function call less in  ldm_validate_tocblocks() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:10 +0100
          [PATCH 2/5] block-LDM: Delete extra log messages for memory  allocation failures SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:10 +0100
          [PATCH 3/5] block-LDM: One function call less in ldm_partition()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:20 +0100
          [PATCH 5/5] block-LDM: Fine-tuning for the source code formatting SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:20 +0100
          [PATCH 4/5] block-LDM: Less function calls in  ldm_validate_privheads() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-23 19:20 +0100
    [PATCH 0/3] Documentation-getdelays: Fine-tuning for two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 13:40 +0100
      [PATCH 2/3] Documentation-getdelays: Apply a recommendation from  "checkpatch.pl" in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 13:40 +0100
        Re: [PATCH 2/3] Documentation-getdelays: Apply a recommendation  from "checkpatch.pl" in main() Jonathan Corbet <corbet@lwn.net> - 2015-12-24 15:30 +0100
      [PATCH 1/3] Documentation-getdelays: Fix a check for container file  usage in main() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 13:40 +0100
        Re: [PATCH 1/3] Documentation-getdelays: Fix a check for container  file usage in main() Jonathan Corbet <corbet@lwn.net> - 2015-12-24 15:30 +0100
          Re: Documentation-getdelays: Fix a check for container file usage in  main() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 19:00 +0100
      [PATCH 3/3] Documentation-getdelays: Less function calls in usage() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 13:40 +0100
        Re: [PATCH 3/3] Documentation-getdelays: Less function calls in  usage() Jonathan Corbet <corbet@lwn.net> - 2015-12-24 15:30 +0100
          Re: Documentation-getdelays: Less function calls in usage() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-24 20:50 +0100
    ACPI-fan: Another source code review around null pointer handling? SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-25 11:40 +0100
    sata_mv: Another source code review around exception handling? SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-25 17:10 +0100
      Re: sata_mv: Another source code review around exception handling? Tejun Heo <tj@kernel.org> - 2015-12-28 17:20 +0100
    [PATCH] gpio-ucb1400: Delete an unnecessary variable initialisation  in ucb1400_gpio_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-25 20:00 +0100
    [PATCH] i2c-core: One function call less in acpi_i2c_space_handler()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 07:40 +0100
      Re: [PATCH] i2c-core: One function call less in  acpi_i2c_space_handler() after error detection kbuild test robot <lkp@intel.com> - 2015-12-26 07:50 +0100
        [PATCH v2] i2c-core: One function call less in  acpi_i2c_space_handler() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 08:10 +0100
          Re: [PATCH v2] i2c-core: One function call less in  acpi_i2c_space_handler() after error detection Wolfram Sang <wsa@the-dreams.de> - 2015-12-26 08:50 +0100
            Re: i2c-core: One function call less in acpi_i2c_space_handler()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 10:00 +0100
              Re: i2c-core: One function call less in acpi_i2c_space_handler()  after error detection Wolfram Sang <wsa@the-dreams.de> - 2015-12-26 19:50 +0100
                Re: i2c-core: One function call less in acpi_i2c_space_handler()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 20:40 +0100
    [PATCH 0/3] IDE-ACPI: Fine-tuning for a function SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 11:20 +0100
      [PATCH 2/3] IDE-ACPI: Delete unnecessary null pointer checks in  ide_get_dev_handle() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 11:20 +0100
      [PATCH 1/3] IDE-ACPI: One function call less in ide_get_dev_handle()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 11:20 +0100
      [PATCH 3/3] IDE-ACPI: Move an assignment for one variable in  ide_get_dev_handle() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 11:30 +0100
      Re: [PATCH 0/3] IDE-ACPI: Fine-tuning for a function David Miller <davem@davemloft.net> - 2015-12-26 19:20 +0100
        Re: [PATCH 0/3] IDE-ACPI: Fine-tuning for a function Joe Perches <joe@perches.com> - 2015-12-27 00:50 +0100
          Re: [PATCH 0/3] IDE-ACPI: Fine-tuning for a function Julia Lawall <julia.lawall@lip6.fr> - 2015-12-27 07:10 +0100
    [PATCH] iio: qcom-spmi-vadc: One check less in  vadc_measure_ref_points() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 14:10 +0100
    [PATCH 0/6] InfiniBand-ocrdma: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 19:40 +0100
      [PATCH 2/6] InfiniBand-ocrdma: Delete unnecessary variable  initialisations in 11 functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 19:50 +0100
      [PATCH 4/6] InfiniBand-ocrdma: Return a value from a function call in  _ocrdma_modify_qp() directly SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 19:50 +0100
      [PATCH 1/6] InfiniBand-ocrdma: One variable and jump label less in  ocrdma_alloc_ucontext_pd() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 19:50 +0100
        Re: [PATCH 1/6] InfiniBand-ocrdma: One variable and jump label less  in ocrdma_alloc_ucontext_pd() kbuild test robot <lkp@intel.com> - 2015-12-26 20:50 +0100
          [PATCH v2 1/6] InfiniBand-ocrdma: One jump label less in  ocrdma_alloc_ucontext_pd() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 22:30 +0100
      [PATCH 3/6] InfiniBand-ocrdma: Returning only value constants in  ocrdma_qp_state_change() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 19:50 +0100
      [PATCH 5/6] InfiniBand-ocrdma: Returning only value constants in  ocrdma_resize_cq() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 20:00 +0100
      [PATCH 6/6] InfiniBand-ocrdma: Delete an unnecessary variable in  ocrdma_dealloc_pd() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-26 20:00 +0100
    [PATCH 0/2] InfiniBand-iSER: Refactoring for two function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-27 13:40 +0100
      [PATCH 1/2] InfiniBand-iSER: One jump label less in iser_reg_sig_mr() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-27 13:50 +0100
      [PATCH 2/2] InfiniBand-iSER-target: One jump label less in  isert_reg_sig_mr() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-27 13:50 +0100
      Re: [PATCH 0/2] InfiniBand-iSER: Refactoring for two function  implementations Leon Romanovsky <leon@leon.nu> - 2015-12-27 13:50 +0100
      Re: [PATCH 0/2] InfiniBand-iSER: Refactoring for two function  implementations Leon Romanovsky <leon@leon.nu> - 2015-12-27 14:00 +0100
      Re: [PATCH 0/2] InfiniBand-iSER: Refactoring for two function  implementations Sagi Grimberg <sagig@dev.mellanox.co.il> - 2015-12-27 16:30 +0100
    [PATCH] [media] si2165: Refactoring for si2165_writereg_mask8() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 03:50 +0100
    [PATCH] [media] bttv: Returning only value constants in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 03:50 +0100
    [PATCH] [media] tuners: One check less in  m88rs6000t_get_rf_strength() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 10:20 +0100
      Re: [PATCH] [media] tuners: One check less in m88rs6000t_get_rf_strength()  after error detection Julia Lawall <julia.lawall@lip6.fr> - 2015-12-28 10:30 +0100
        Re: [media] tuners: One check less in m88rs6000t_get_rf_strength()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 11:40 +0100
          Re: [media] tuners: One check less in m88rs6000t_get_rf_strength()  after error detection Julia Lawall <julia.lawall@lip6.fr> - 2015-12-28 11:40 +0100
            [PATCH 0/2] [media] m88rs6000t: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 15:40 +0100
              [PATCH 1/2] [media] m88rs6000t: Better exception handling in five  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 15:40 +0100
                Re: [PATCH 1/2] [media] m88rs6000t: Better exception handling in  five functions Julia Lawall <julia.lawall@lip6.fr> - 2015-12-28 15:50 +0100
                  Re: [media] m88rs6000t: Better exception handling in five functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 16:10 +0100
                    Re: [media] m88rs6000t: Better exception handling in five  functions Julia Lawall <julia.lawall@lip6.fr> - 2015-12-28 16:20 +0100
              [PATCH 2/2] [media] tuners: Refactoring for m88rs6000t_sleep() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 15:50 +0100
    [PATCH 0/2] [media] r820t: Fine-tuning for generic_set_freq() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 17:30 +0100
      [PATCH 1/2] [media] r820t: Delete an unnecessary variable  initialisation in generic_set_freq() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 17:40 +0100
      [PATCH 2/2] [media] r820t: Better exception handling in  generic_set_freq() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 17:40 +0100
    [PATCH] [media] xc5000: Faster result reporting in  xc_load_fw_and_init_tuner() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 20:30 +0100
    [PATCH] [media] airspy: Better exception handling in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 22:20 +0100
    [PATCH] [media] au0828: Refactoring for start_urb_transfer() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-28 23:00 +0100
    [PATCH] [media] hdpvr: Refactoring for hdpvr_read() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 11:20 +0100
    [PATCH] [media] msi2500: Delete an unnecessary check in  msi2500_set_usb_adc() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 12:40 +0100
    [PATCH] mfd-dm355evm_msp: One function call less in add_child() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 14:10 +0100
    [PATCH 2/2] mfd: smsc-ece1099: Refactoring for smsc_i2c_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 15:20 +0100
    [PATCH 1/2] mfd: smsc-ece1099: Delete an unnecessary variable  initialisation in smsc_i2c_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 15:20 +0100
    [PATCH 0/2] mfd: smsc-ece1099: Fine-tuning for smsc_i2c_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 15:20 +0100
    [PATCH] mfd: twl-core: One function call less in add_numbered_child()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 19:40 +0100
    [PATCH] mmc-core: One check less in mmc_select_hs200() after error  detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 21:00 +0100
    [PATCH 0/2] mmc-host: Fine-tuning for one function SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 22:00 +0100
      [PATCH 1/2] mmc-sdricoh_cs: Delete unnecessary variable  initialisations in sdricoh_init_mmc() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 22:10 +0100
      [PATCH 2/2] mmc-sdricoh_cs: Less checks in sdricoh_init_mmc() after,  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-29 22:10 +0100
    [PATCH 3/3] mtd-rfd_ftl: Refactoring for erase_block() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-31 21:30 +0100
    [PATCH 1/3] mtd-rfd_ftl: Replace a variable initialisation by  assignments in move_block_contents() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-31 21:30 +0100
    [PATCH 2/3] mtd-rfd_ftl: Refactoring for move_block_contents() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-31 21:30 +0100
    [PATCH 0/3] mtd-rfd_ftl: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-31 21:30 +0100
    [PATCH] net-thunder: One check less in nicvf_register_interrupts()  after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-31 22:50 +0100
    [PATCH] be2net: Delete an unnecessary check in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 00:30 +0100
    [PATCH 0/3] net-gianfar: Fine-tuning for  gfar_ethflow_to_filer_table() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 13:20 +0100
      [PATCH 2/3] net-gianfar: Delete unnecessary variable initialisations  in gfar_ethflow_to_filer_table() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 13:30 +0100
      [PATCH 3/3] net-gianfar: Extend an initialisation clause of a for  loop in gfar_ethflow_to_filer_table() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 13:30 +0100
      [PATCH 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 13:30 +0100
        Re: [PATCH 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection Julia Lawall <julia.lawall@lip6.fr> - 2016-01-01 13:40 +0100
          Re: [PATCH 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 14:00 +0100
            Re: [PATCH 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection Julia Lawall <julia.lawall@lip6.fr> - 2016-01-01 14:10 +0100
              Re: [PATCH 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection Francois Romieu <romieu@fr.zoreil.com> - 2016-01-01 15:50 +0100
          [PATCH v2 1/3] net-gianfar: Less function calls in  gfar_ethflow_to_filer_table() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 14:10 +0100
    [PATCH] net-i40e: Replace variable initialisations by assignments in  i40e_vc_get_vf_resources_msg() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 15:40 +0100
    [PATCH] net-huawei_cdc_ncm: Delete an unnecessary variable  initialisation in huawei_cdc_ncm_bind() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 17:00 +0100
    [PATCH 0/2] net-qmi_wwan: Fine-tuning for two function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 18:00 +0100
      [PATCH 1/2] net-qmi_wwan: Refactoring for qmi_wwan_bind() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 18:00 +0100
      [PATCH 2/2] net-qmi_wwan: Delete an unnecessary variable  initialisation in qmi_wwan_register_subdriver() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 18:00 +0100
    [PATCH 0/2] net-ath9k_htc: Fine-tuning for two function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
      [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an  assignment in ath9k_htc_set_channel() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
        Re: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by  an assignment in ath9k_htc_set_channel() Oleksij Rempel <linux@rempel-privat.de> - 2016-01-01 20:20 +0100
      [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable  initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
        Re: [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable  initialisation in ath9k_hif_usb_rx_stream() Oleksij Rempel <linux@rempel-privat.de> - 2016-01-01 20:20 +0100
    [PATCH] net-brcmfmac: Delete an unnecessary variable initialisation  in brcmf_sdio_download_firmware() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 20:30 +0100
    [PATCH 0/3] net-iwlegacy: Fine-tuning for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:30 +0100
      [PATCH 2/3] net-iwlegacy: One check less in il_eeprom_init() after  error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
      [PATCH 1/3] net-iwlegacy: Refactoring for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
      [PATCH 3/3] net-iwlegacy: Another refactoring for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
    [PATCH] net-libertas: Better exception handling in  if_spi_host_to_card_worker() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 22:40 +0100
      Re: [PATCH] net-libertas: Better exception handling in  if_spi_host_to_card_worker() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-01 22:50 +0100

Page 2 of 10 — ← Prev page 1 [2] 3 4 … 10  Next page →


#1290980 — Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2015-12-14 09:50 +0100
SubjectRe: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly
Message-ID<qFwZs-3HK-29@gated-at.bofh.it>
In reply to#1290310
On Sat, Dec 12, 2015 at 10:49:40PM +0300, Dan Carpenter wrote:
> On Sat, Dec 12, 2015 at 03:34:50PM +0100, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sat, 12 Dec 2015 11:36:02 +0100
> > 
> > Omit the unnecessary setting to a null pointer for the variable "param"
> > at the beginning of the function "iscsi_set_default_param"
> > because it can be directly initialized with the return value
> > from the function "kzalloc".
> > 
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > ---
> >  drivers/target/iscsi/iscsi_target_parameters.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
> > index 3a1f9a7..0a8bd3f 100644
> > --- a/drivers/target/iscsi/iscsi_target_parameters.c
> > +++ b/drivers/target/iscsi/iscsi_target_parameters.c
> > @@ -127,9 +127,8 @@ static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *para
> >  		char *name, char *value, u8 phase, u8 scope, u8 sender,
> >  		u16 type_range, u8 use)
> >  {
> > -	struct iscsi_param *param = NULL;
> > +	struct iscsi_param *param = kzalloc(sizeof(*param), GFP_KERNEL);
> >  
> > -	param = kzalloc(sizeof(struct iscsi_param), GFP_KERNEL);
> >  	if (!param) {
> >  		pr_err("Unable to allocate memory for parameter.\n");
> >  		goto out;
> 
> It's better to just get rid of the initialization but leave the
> kzalloc() as-is for two reasons.
> 
> 1)  Initializer code normally contains more bugs per line than other
>     code.  I am thinking about dereferencing pointers before checking
>     for NULL or not checking the allocation for failure.
> 
> 2)  It puts a blank line between the allocation and the check for
>     failure.  It's like a new paragraph.  The allocation and the check
>     should be next to each other.

I agree with Dan here. Please don't do it.

@@ -127,9 +127,8 @@ static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *para
 		char *name, char *value, u8 phase, u8 scope, u8 sender,
 		u16 type_range, u8 use)
 {
-	struct iscsi_param *param = NULL;
+	struct iscsi_param *param;
 
	param = kzalloc(sizeof(struct iscsi_param), GFP_KERNEL);
 	if (!param) {
 		pr_err("Unable to allocate memory for parameter.\n");


This way it would be _far_ more readable. IMHO one should have a 1 action per
line of code style and only assign values in at declaration time if really 
necessary.

But what is the benefit from this? Is it fixing a (hypothetical) bug? I somehow
fail to see it.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
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/

[toc] | [prev] | [next] | [standalone]


#1291128 — Re: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-14 12:40 +0100
SubjectRe: [PATCH 1/7] iscsi-target: Use a variable initialisation in iscsi_set_default_param() directly
Message-ID<qFzDY-5yq-27@gated-at.bofh.it>
In reply to#1290980
> @@ -127,9 +127,8 @@ static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *para
>  		char *name, char *value, u8 phase, u8 scope, u8 sender,
>  		u16 type_range, u8 use)
>  {
> -	struct iscsi_param *param = NULL;
> +	struct iscsi_param *param;
>  
> 	param = kzalloc(sizeof(struct iscsi_param), GFP_KERNEL);
>  	if (!param) {
>  		pr_err("Unable to allocate memory for parameter.\n");
> 
> 
> This way it would be _far_ more readable.

I guess that there are some opinions available for this implementation detail.


> IMHO one should have a 1 action per line of code style

How often do you care for such style issues?


> and only assign values in at declaration time if really necessary.

Which is or might become the official Linux coding style recommendation
for this aspect?


> But what is the benefit from this? Is it fixing a (hypothetical) bug?

I find the shown null pointer initialisation just needless.

Regards,
Markus

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

[toc] | [prev] | [next] | [standalone]


#1290198 — [PATCH 2/7] iscsi-target: Less checks in iscsi_set_default_param() after error detection

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:40 +0100
Subject[PATCH 2/7] iscsi-target: Less checks in iscsi_set_default_param() after error detection
Message-ID<qETv4-3kN-13@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 12:50:10 +0100

This issue was detected by using the Coccinelle software.

A sanity check would be performed by the iscsi_set_default_param() function
even if it is known already that the passed variable contained
a null pointer.

* This implementation detail could be improved by adjustments
  for jump targets according to the Linux coding style convention.

* Let us return directly if a call of the function "kzalloc" failed.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 0a8bd3f..15b2618 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -131,20 +131,20 @@ static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *para
 
 	if (!param) {
 		pr_err("Unable to allocate memory for parameter.\n");
-		goto out;
+		return NULL;
 	}
 	INIT_LIST_HEAD(&param->p_list);
 
 	param->name = kstrdup(name, GFP_KERNEL);
 	if (!param->name) {
 		pr_err("Unable to allocate memory for parameter name.\n");
-		goto out;
+		goto free_param;
 	}
 
 	param->value = kstrdup(value, GFP_KERNEL);
 	if (!param->value) {
 		pr_err("Unable to allocate memory for parameter value.\n");
-		goto out;
+		goto free_name;
 	}
 
 	param->phase		= phase;
@@ -182,18 +182,17 @@ static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *para
 	default:
 		pr_err("Unknown type_range 0x%02x\n",
 				param->type_range);
-		goto out;
+		goto free_value;
 	}
 	list_add_tail(&param->p_list, &param_list->param_list);
 
 	return param;
-out:
-	if (param) {
-		kfree(param->value);
-		kfree(param->name);
-		kfree(param);
-	}
-
+free_value:
+	kfree(param->value);
+free_name:
+	kfree(param->name);
+free_param:
+	kfree(param);
 	return NULL;
 }
 
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290199 — [PATCH 3/7] iscsi-target: Delete an unnecessary variable initialisation in iscsi_create_default_params()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:50 +0100
Subject[PATCH 3/7] iscsi-target: Delete an unnecessary variable initialisation in iscsi_create_default_params()
Message-ID<qETEJ-3og-1@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 13:20:08 +0100

The variable "param" will eventually be set to an appropriate pointer
from a call of the iscsi_set_default_param() function.
Thus let us omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 15b2618..e0b173d 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -199,7 +199,7 @@ free_param:
 /* #warning Add extension keys */
 int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
 {
-	struct iscsi_param *param = NULL;
+	struct iscsi_param *param;
 	struct iscsi_param_list *pl;
 
 	pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290200 — Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

FromJulia Lawall <julia.lawall@lip6.fr>
Date2015-12-12 15:50 +0100
SubjectRe: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()
Message-ID<qETEJ-3og-5@gated-at.bofh.it>
In reply to#1290194

On Sat, 12 Dec 2015, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 12 Dec 2015 13:44:06 +0100
>
> The variable "pl" was declared and immediately assigned a return value
> from a function call in a separate statement.
>
> * Let us express the desired variable initialisation directly.
>
> * Avoid the repetition of the data type specification for the
>   involved memory allocation according to the Linux coding
>   style convention.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/target/iscsi/iscsi_target_parameters.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
> index e0b173d..3f3842f 100644
> --- a/drivers/target/iscsi/iscsi_target_parameters.c
> +++ b/drivers/target/iscsi/iscsi_target_parameters.c
> @@ -200,9 +200,8 @@ free_param:
>  int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
>  {
>  	struct iscsi_param *param;
> -	struct iscsi_param_list *pl;
> +	struct iscsi_param_list *pl = kzalloc(sizeof(*pl), GFP_KERNEL);
>
> -	pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);

I don't see the benefit of this change, and the pattern assignment ->
failure test becomes more obscure.

julia

>  	if (!pl) {
>  		pr_err("Unable to allocate memory for"
>  				" struct iscsi_param_list.\n");
> --
> 2.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
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/

[toc] | [prev] | [next] | [standalone]


#1290210 — Re: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 16:10 +0100
SubjectRe: [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()
Message-ID<qETY6-3K6-7@gated-at.bofh.it>
In reply to#1290200
>> @@ -200,9 +200,8 @@ free_param:
>>  int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
>>  {
>>  	struct iscsi_param *param;
>> -	struct iscsi_param_list *pl;
>> +	struct iscsi_param_list *pl = kzalloc(sizeof(*pl), GFP_KERNEL);
>>
>> -	pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
> 
> I don't see the benefit of this change, and the pattern assignment ->
> failure test becomes more obscure.

Are there any more software developers who prefer to specify
such a variable initialisation on a single line?

Does the proposed small source code reduction matter for you?

Regards,
Markus
--
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/

[toc] | [prev] | [next] | [standalone]


#1290201 — [PATCH 6/7] iscsi-target: Delete unnecessary variable initialisations in iscsi_check_valuelist_for_support()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:50 +0100
Subject[PATCH 6/7] iscsi-target: Delete unnecessary variable initialisations in iscsi_check_valuelist_for_support()
Message-ID<qETEJ-3og-9@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 14:34:26 +0100

The variables "tmp1" and "tmp2" will eventually be set to appropriate
pointers from a call of the strchr() function.
Thus let us omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 29ecf29..53e3345 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -920,7 +920,7 @@ static char *iscsi_check_valuelist_for_support(
 	struct iscsi_param *param,
 	char *value)
 {
-	char *tmp1 = NULL, *tmp2 = NULL;
+	char *tmp1, *tmp2;
 	char *acceptor_values = NULL, *proposer_values = NULL;
 
 	acceptor_values = param->value;
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290202 — [PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:50 +0100
Subject[PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()
Message-ID<qETEJ-3og-11@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 15:04:57 +0100

The variable "acceptor_values" and "proposer_values" were initialized
by null pointers and immediately assigned values from input parameters
by separate statements.
Let us express the desired variable initialisations directly.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 53e3345..fb6fd34 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -921,10 +921,7 @@ static char *iscsi_check_valuelist_for_support(
 	char *value)
 {
 	char *tmp1, *tmp2;
-	char *acceptor_values = NULL, *proposer_values = NULL;
-
-	acceptor_values = param->value;
-	proposer_values = value;
+	char *acceptor_values = param->value, *proposer_values = value;
 
 	do {
 		if (!proposer_values)
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290242 — Re: [PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()

Fromwalter harms <wharms@bfs.de>
Date2015-12-12 18:20 +0100
SubjectRe: [PATCH 7/7] iscsi-target: Make two variable initialisations a bit more obvious in iscsi_check_valuelist_for_support()
Message-ID<qEVZU-50C-23@gated-at.bofh.it>
In reply to#1290202

Am 12.12.2015 15:45, schrieb SF Markus Elfring:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 12 Dec 2015 15:04:57 +0100
> 
> The variable "acceptor_values" and "proposer_values" were initialized
> by null pointers and immediately assigned values from input parameters
> by separate statements.
> Let us express the desired variable initialisations directly.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/target/iscsi/iscsi_target_parameters.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
> index 53e3345..fb6fd34 100644
> --- a/drivers/target/iscsi/iscsi_target_parameters.c
> +++ b/drivers/target/iscsi/iscsi_target_parameters.c
> @@ -921,10 +921,7 @@ static char *iscsi_check_valuelist_for_support(
>  	char *value)
>  {
>  	char *tmp1, *tmp2;
> -	char *acceptor_values = NULL, *proposer_values = NULL;
> -
> -	acceptor_values = param->value;
> -	proposer_values = value;
> +	char *acceptor_values = param->value, *proposer_values = value;
>  

I do not thing that this is a good idea,
i find the first version more readable
but you are right the NULL can be removed.

just my 2 cents,

re,
 wh



>  	do {
>  		if (!proposer_values)
--
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/

[toc] | [prev] | [next] | [standalone]


#1290205 — [PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:50 +0100
Subject[PATCH 4/7] iscsi-target: Make a variable initialisation a bit more obvious in iscsi_create_default_params()
Message-ID<qETEJ-3og-7@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 13:44:06 +0100

The variable "pl" was declared and immediately assigned a return value
from a function call in a separate statement.

* Let us express the desired variable initialisation directly.

* Avoid the repetition of the data type specification for the
  involved memory allocation according to the Linux coding
  style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index e0b173d..3f3842f 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -200,9 +200,8 @@ free_param:
 int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
 {
 	struct iscsi_param *param;
-	struct iscsi_param_list *pl;
+	struct iscsi_param_list *pl = kzalloc(sizeof(*pl), GFP_KERNEL);
 
-	pl = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
 	if (!pl) {
 		pr_err("Unable to allocate memory for"
 				" struct iscsi_param_list.\n");
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290206 — [PATCH 5/7] iscsi-target: Rename a jump label in iscsi_create_default_params()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-12 15:50 +0100
Subject[PATCH 5/7] iscsi-target: Rename a jump label in iscsi_create_default_params()
Message-ID<qETEK-3og-15@gated-at.bofh.it>
In reply to#1290194
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 12 Dec 2015 14:12:50 +0100

This issue was detected by using the Coccinelle software.

Choose a jump label according to the current Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/target/iscsi/iscsi_target_parameters.c | 64 +++++++++++++-------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 3f3842f..29ecf29 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -225,185 +225,185 @@ int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
 			PHASE_SECURITY, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_AUTH, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, HEADERDIGEST, INITIAL_HEADERDIGEST,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_DIGEST, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, DATADIGEST, INITIAL_DATADIGEST,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_DIGEST, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, MAXCONNECTIONS,
 			INITIAL_MAXCONNECTIONS, PHASE_OPERATIONAL,
 			SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_1_TO_65535, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, SENDTARGETS, INITIAL_SENDTARGETS,
 			PHASE_FFP0, SCOPE_SESSION_WIDE, SENDER_INITIATOR,
 			TYPERANGE_UTF8, 0);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, TARGETNAME, INITIAL_TARGETNAME,
 			PHASE_DECLARATIVE, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_ISCSINAME, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, INITIATORNAME,
 			INITIAL_INITIATORNAME, PHASE_DECLARATIVE,
 			SCOPE_SESSION_WIDE, SENDER_INITIATOR,
 			TYPERANGE_ISCSINAME, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, TARGETALIAS, INITIAL_TARGETALIAS,
 			PHASE_DECLARATIVE, SCOPE_SESSION_WIDE, SENDER_TARGET,
 			TYPERANGE_UTF8, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, INITIATORALIAS,
 			INITIAL_INITIATORALIAS, PHASE_DECLARATIVE,
 			SCOPE_SESSION_WIDE, SENDER_INITIATOR, TYPERANGE_UTF8,
 			USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, TARGETADDRESS,
 			INITIAL_TARGETADDRESS, PHASE_DECLARATIVE,
 			SCOPE_SESSION_WIDE, SENDER_TARGET,
 			TYPERANGE_TARGETADDRESS, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, TARGETPORTALGROUPTAG,
 			INITIAL_TARGETPORTALGROUPTAG,
 			PHASE_DECLARATIVE, SCOPE_SESSION_WIDE, SENDER_TARGET,
 			TYPERANGE_0_TO_65535, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, INITIALR2T, INITIAL_INITIALR2T,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_BOOL_OR, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, IMMEDIATEDATA,
 			INITIAL_IMMEDIATEDATA, PHASE_OPERATIONAL,
 			SCOPE_SESSION_WIDE, SENDER_BOTH, TYPERANGE_BOOL_AND,
 			USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, MAXXMITDATASEGMENTLENGTH,
 			INITIAL_MAXXMITDATASEGMENTLENGTH,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, MAXRECVDATASEGMENTLENGTH,
 			INITIAL_MAXRECVDATASEGMENTLENGTH,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, MAXBURSTLENGTH,
 			INITIAL_MAXBURSTLENGTH, PHASE_OPERATIONAL,
 			SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, FIRSTBURSTLENGTH,
 			INITIAL_FIRSTBURSTLENGTH,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, DEFAULTTIME2WAIT,
 			INITIAL_DEFAULTTIME2WAIT,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_0_TO_3600, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, DEFAULTTIME2RETAIN,
 			INITIAL_DEFAULTTIME2RETAIN,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_0_TO_3600, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, MAXOUTSTANDINGR2T,
 			INITIAL_MAXOUTSTANDINGR2T,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_1_TO_65535, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, DATAPDUINORDER,
 			INITIAL_DATAPDUINORDER, PHASE_OPERATIONAL,
 			SCOPE_SESSION_WIDE, SENDER_BOTH, TYPERANGE_BOOL_OR,
 			USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, DATASEQUENCEINORDER,
 			INITIAL_DATASEQUENCEINORDER,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_BOOL_OR, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, ERRORRECOVERYLEVEL,
 			INITIAL_ERRORRECOVERYLEVEL,
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_0_TO_2, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, SESSIONTYPE, INITIAL_SESSIONTYPE,
 			PHASE_DECLARATIVE, SCOPE_SESSION_WIDE, SENDER_INITIATOR,
 			TYPERANGE_SESSIONTYPE, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, IFMARKER, INITIAL_IFMARKER,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_BOOL_AND, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, OFMARKER, INITIAL_OFMARKER,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_BOOL_AND, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, IFMARKINT, INITIAL_IFMARKINT,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_UTF8, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, OFMARKINT, INITIAL_OFMARKINT,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_UTF8, USE_INITIAL_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	/*
 	 * Extra parameters for ISER from RFC-5046
@@ -412,25 +412,25 @@ int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
 			PHASE_OPERATIONAL, SCOPE_SESSION_WIDE, SENDER_BOTH,
 			TYPERANGE_BOOL_AND, USE_LEADING_ONLY);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, INITIATORRECVDATASEGMENTLENGTH,
 			INITIAL_INITIATORRECVDATASEGMENTLENGTH,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	param = iscsi_set_default_param(pl, TARGETRECVDATASEGMENTLENGTH,
 			INITIAL_TARGETRECVDATASEGMENTLENGTH,
 			PHASE_OPERATIONAL, SCOPE_CONNECTION_ONLY, SENDER_BOTH,
 			TYPERANGE_512_TO_16777215, USE_ALL);
 	if (!param)
-		goto out;
+		goto release_list;
 
 	*param_list_ptr = pl;
 	return 0;
-out:
+release_list:
 	iscsi_release_param_list(pl);
 	return -1;
 }
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290616 — [PATCH 0/7] staging-Lustre: Fine-tuning for some function implementations

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-13 14:50 +0100
Subject[PATCH 0/7] staging-Lustre: Fine-tuning for some function implementations
Message-ID<qFfce-yf-5@gated-at.bofh.it>
In reply to#1289503
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 13 Dec 2015 14:40:14 +0100

Several update suggestions were taken into account
from static source code analysis.

Markus Elfring (7):
  Delete unnecessary goto statements in six functions
  Rename a jump label for ptlrpc_req_finished() calls
  Rename a jump label for a kfree(key) call
  Delete an unnecessary variable initialisation in mgc_process_recover_log()
  Less checks in mgc_process_recover_log() after error detection
  A few checks less in mgc_process_recover_log() after error detection
  Rename a jump label for module_put() calls

 drivers/staging/lustre/lustre/llite/file.c         |  26 ++---
 drivers/staging/lustre/lustre/llite/lloop.c        |   8 +-
 drivers/staging/lustre/lustre/llite/namei.c        |  13 +--
 drivers/staging/lustre/lustre/llite/xattr.c        |  20 ++--
 drivers/staging/lustre/lustre/mdc/mdc_request.c    | 124 ++++++++++-----------
 drivers/staging/lustre/lustre/mgc/mgc_request.c    |  53 ++++-----
 drivers/staging/lustre/lustre/osc/osc_request.c    |  52 ++++-----
 drivers/staging/lustre/lustre/ptlrpc/llog_client.c |  22 ++--
 8 files changed, 152 insertions(+), 166 deletions(-)

-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290617 — [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-13 15:00 +0100
Subject[PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls
Message-ID<qFflU-CN-1@gated-at.bofh.it>
In reply to#1290616
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 13 Dec 2015 10:33:38 +0100

This issue was detected by using the Coccinelle software.

Choose a jump label according to the current Linux coding style convention.
I suggest to improve this implementation detail by the reuse of a script
like the following for the semantic patch language.

@rename_jump_label exists@
identifier work;
type return_type;
@@
 return_type work(...)
 {
 ... when any
 goto
-out
+finish_request
 ;
 ... when any
-out
+finish_request
 :
 ptlrpc_req_finished(...);
 ... when any
 }

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/staging/lustre/lustre/llite/file.c         | 26 +++++------
 drivers/staging/lustre/lustre/llite/namei.c        | 12 ++---
 drivers/staging/lustre/lustre/llite/xattr.c        | 20 ++++----
 drivers/staging/lustre/lustre/mdc/mdc_request.c    | 54 +++++++++++-----------
 drivers/staging/lustre/lustre/osc/osc_request.c    | 28 +++++------
 drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 22 ++++-----
 6 files changed, 81 insertions(+), 81 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 31cd6b3..b94df54 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -427,27 +427,27 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm,
 		*/
 		if (!it_disposition(itp, DISP_OPEN_OPEN) ||
 		     it_open_error(DISP_OPEN_OPEN, itp))
-			goto out;
+			goto finish_request;
 		ll_release_openhandle(inode, itp);
-		goto out;
+		goto finish_request;
 	}
 
 	if (it_disposition(itp, DISP_LOOKUP_NEG)) {
 		rc = -ENOENT;
-		goto out;
+		goto finish_request;
 	}
 
 	if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
 		rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp);
 		CDEBUG(D_VFSTRACE, "lock enqueue: err: %d\n", rc);
-		goto out;
+		goto finish_request;
 	}
 
 	rc = ll_prep_inode(&inode, req, NULL, itp);
 	if (!rc && itp->d.lustre.it_lock_mode)
 		ll_set_lock_data(sbi->ll_md_exp, inode, itp, NULL);
 
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	ll_intent_drop_lock(itp);
 
@@ -2900,13 +2900,13 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
 		oit.it_create_mode &= ~M_CHECK_STALE;
 		if (rc < 0) {
 			rc = ll_inode_revalidate_fini(inode, rc);
-			goto out;
+			goto finish_request;
 		}
 
 		rc = ll_revalidate_it_finish(req, &oit, inode);
 		if (rc != 0) {
 			ll_intent_release(&oit);
-			goto out;
+			goto finish_request;
 		}
 
 		/* Unlinked? Unhash dentry, so it is not picked up later by
@@ -2946,7 +2946,7 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
 
 		rc = ll_prep_inode(&inode, req, NULL, NULL);
 	}
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -3315,25 +3315,25 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock)
 	body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
 	if (body == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	lmmsize = body->eadatasize;
 	if (lmmsize == 0) /* empty layout */ {
 		rc = 0;
-		goto out;
+		goto finish_request;
 	}
 
 	lmm = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA, lmmsize);
 	if (lmm == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	lvbdata = libcfs_kvzalloc(lmmsize, GFP_NOFS);
 	if (lvbdata == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 
 	memcpy(lvbdata, lmm, lmmsize);
@@ -3345,7 +3345,7 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock)
 	lock->l_lvb_len = lmmsize;
 	unlock_res_and_lock(lock);
 
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 2113dd4..7501f70 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -686,7 +686,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
 	rc = ll_prep_inode(&inode, request, dir->i_sb, it);
 	if (rc) {
 		inode = ERR_PTR(rc);
-		goto out;
+		goto finish_request;
 	}
 
 	LASSERT(hlist_empty(&inode->i_dentry));
@@ -697,7 +697,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
 	CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n",
 	       inode, inode->i_ino, inode->i_generation);
 	ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
- out:
+ finish_request:
 	ptlrpc_req_finished(request);
 	return inode;
 }
@@ -960,13 +960,13 @@ static int ll_unlink(struct inode *dir, struct dentry *dentry)
 	rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
 	ll_finish_md_op_data(op_data);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	ll_update_times(request, dir);
 	ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_UNLINK, 1);
 
 	rc = ll_objects_destroy(request, dir);
- out:
+ finish_request:
 	ptlrpc_req_finished(request);
 	return rc;
 }
@@ -1059,11 +1059,11 @@ static int ll_link(struct dentry *old_dentry, struct inode *dir,
 	err = md_link(sbi->ll_md_exp, op_data, &request);
 	ll_finish_md_op_data(op_data);
 	if (err)
-		goto out;
+		goto finish_request;
 
 	ll_update_times(request, dir);
 	ll_stats_ops_tally(sbi, LPROC_LL_LINK, 1);
-out:
+finish_request:
 	ptlrpc_req_finished(request);
 	return err;
 }
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index 660b8ac..8d3287c 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -390,19 +390,19 @@ getxattr_nocache:
 		/* only detect the xattr size */
 		if (size == 0) {
 			rc = body->eadatasize;
-			goto out;
+			goto finish_request;
 		}
 
 		if (size < body->eadatasize) {
 			CERROR("server bug: replied size %u > %u\n",
 				body->eadatasize, (int)size);
 			rc = -ERANGE;
-			goto out;
+			goto finish_request;
 		}
 
 		if (body->eadatasize == 0) {
 			rc = -ENODATA;
-			goto out;
+			goto finish_request;
 		}
 
 		/* do not need swab xattr data */
@@ -410,7 +410,7 @@ getxattr_nocache:
 							body->eadatasize);
 		if (!xdata) {
 			rc = -EFAULT;
-			goto out;
+			goto finish_request;
 		}
 
 		memcpy(buffer, xdata, body->eadatasize);
@@ -425,14 +425,14 @@ getxattr_nocache:
 					(posix_acl_xattr_header *)buffer, rc);
 		if (IS_ERR(acl)) {
 			rc = PTR_ERR(acl);
-			goto out;
+			goto finish_request;
 		}
 
 		rc = ee_add(&sbi->ll_et, current_pid(), ll_inode2fid(inode),
 			    xattr_type, acl);
 		if (unlikely(rc < 0)) {
 			lustre_ext_acl_xattr_free(acl);
-			goto out;
+			goto finish_request;
 		}
 	}
 #endif
@@ -444,7 +444,7 @@ out_xattr:
 			ll_get_fsname(inode->i_sb, NULL, 0), rc);
 		sbi->ll_flags &= ~LL_SBI_USER_XATTR;
 	}
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -555,7 +555,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
 
 	rc = ll_getxattr_common(inode, NULL, buffer, size, OBD_MD_FLXATTRLS);
 	if (rc < 0)
-		goto out;
+		goto finish_request;
 
 	if (buffer != NULL) {
 		struct ll_sb_info *sbi = ll_i2sbi(inode);
@@ -589,7 +589,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
 
 	if (rc2 < 0) {
 		rc2 = 0;
-		goto out;
+		goto finish_request;
 	} else if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) {
 		const int prefix_len = sizeof(XATTR_LUSTRE_PREFIX) - 1;
 		const size_t name_len   = sizeof("lov") - 1;
@@ -608,7 +608,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
 		}
 		rc2 = total_len;
 	}
-out:
+finish_request:
 	ptlrpc_req_finished(request);
 	rc = rc + rc2;
 
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 920b1e9..2a76685 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -92,12 +92,12 @@ static int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid)
 
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
 	if (body == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*rootfid = body->fid1;
@@ -105,7 +105,7 @@ static int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid)
 	       "root fid="DFID", last_committed=%llu\n",
 	       PFID(rootfid),
 	       lustre_msg_get_last_committed(req->rq_repmsg));
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1084,17 +1084,17 @@ static int mdc_statfs(const struct lu_env *env,
 		/* check connection error first */
 		if (imp->imp_connect_error)
 			rc = imp->imp_connect_error;
-		goto out;
+		goto finish_request;
 	}
 
 	msfs = req_capsule_server_get(&req->rq_pill, &RMF_OBD_STATFS);
 	if (msfs == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*osfs = *msfs;
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 output:
 	class_import_put(imp);
@@ -1163,7 +1163,7 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
 					LUSTRE_MDS_VERSION, MDS_HSM_PROGRESS);
 	if (req == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 
 	mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, 0, 0);
@@ -1172,7 +1172,7 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
 	req_hpk = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_PROGRESS);
 	if (req_hpk == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*req_hpk = *hpk;
@@ -1181,7 +1181,7 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1197,7 +1197,7 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives)
 					MDS_HSM_CT_REGISTER);
 	if (req == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 
 	mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, 0, 0);
@@ -1207,7 +1207,7 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives)
 					      &RMF_MDS_HSM_ARCHIVE);
 	if (archive_mask == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*archive_mask = archives;
@@ -1215,7 +1215,7 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives)
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1246,18 +1246,18 @@ static int mdc_ioc_hsm_current_action(struct obd_export *exp,
 
 	rc = mdc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	req_hca = req_capsule_server_get(&req->rq_pill,
 					 &RMF_MDS_HSM_CURRENT_ACTION);
 	if (req_hca == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*hca = *req_hca;
 
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1272,7 +1272,7 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp)
 					MDS_HSM_CT_UNREGISTER);
 	if (req == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 
 	mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, 0, 0);
@@ -1280,7 +1280,7 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp)
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1311,17 +1311,17 @@ static int mdc_ioc_hsm_state_get(struct obd_export *exp,
 
 	rc = mdc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	req_hus = req_capsule_server_get(&req->rq_pill, &RMF_HSM_USER_STATE);
 	if (req_hus == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*hus = *req_hus;
 
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1352,14 +1352,14 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp,
 	req_hss = req_capsule_client_get(&req->rq_pill, &RMF_HSM_STATE_SET);
 	if (req_hss == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 	*req_hss = *hss;
 
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1377,7 +1377,7 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
 	req = ptlrpc_request_alloc(imp, &RQF_MDS_HSM_REQUEST);
 	if (req == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 
 	req_capsule_set_size(&req->rq_pill, &RMF_MDS_HSM_USER_ITEM, RCL_CLIENT,
@@ -1398,7 +1398,7 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
 	req_hr = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_REQUEST);
 	if (req_hr == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 	*req_hr = hur->hur_request;
 
@@ -1406,7 +1406,7 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
 	req_hui = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_USER_ITEM);
 	if (req_hui == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 	memcpy(req_hui, hur->hur_user_item,
 	       hur->hur_request.hr_itemcount * sizeof(struct hsm_user_item));
@@ -1415,14 +1415,14 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
 	req_opaque = req_capsule_client_get(&req->rq_pill, &RMF_GENERIC_DATA);
 	if (req_opaque == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 	memcpy(req_opaque, hur_data(hur), hur->hur_request.hr_data_len);
 
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index d6c1447..3a56fb7 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -291,12 +291,12 @@ static int osc_getattr(const struct lu_env *env, struct obd_export *exp,
 
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	body = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
 	if (body == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	CDEBUG(D_INODE, "mode: %o\n", body->oa.o_mode);
@@ -306,7 +306,7 @@ static int osc_getattr(const struct lu_env *env, struct obd_export *exp,
 	oinfo->oi_oa->o_blksize = cli_brw_size(exp->exp_obd);
 	oinfo->oi_oa->o_valid |= OBD_MD_FLBLKSZ;
 
- out:
+ finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -336,18 +336,18 @@ static int osc_setattr(const struct lu_env *env, struct obd_export *exp,
 
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	body = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
 	if (body == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	lustre_get_wire_obdo(&req->rq_import->imp_connect_data, oinfo->oi_oa,
 			     &body->oa);
 
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1276,7 +1276,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 
 	if (desc == NULL) {
 		rc = -ENOMEM;
-		goto out;
+		goto finish_request;
 	}
 	/* NB request now owns desc and will free it when it gets freed */
 
@@ -1407,7 +1407,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 	*reqp = req;
 	return 0;
 
- out:
+ finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -2513,17 +2513,17 @@ static int osc_statfs(const struct lu_env *env, struct obd_export *exp,
 
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	msfs = req_capsule_server_get(&req->rq_pill, &RMF_OBD_STATFS);
 	if (msfs == NULL) {
 		rc = -EPROTO;
-		goto out;
+		goto finish_request;
 	}
 
 	*osfs = *msfs;
 
- out:
+ finish_request:
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -2718,16 +2718,16 @@ static int osc_get_info(const struct lu_env *env, struct obd_export *exp,
 		ptlrpc_request_set_replen(req);
 		rc = ptlrpc_queue_wait(req);
 		if (rc)
-			goto out;
+			goto finish_request;
 
 		reply = req_capsule_server_get(&req->rq_pill, &RMF_OBD_ID);
 		if (reply == NULL) {
 			rc = -EPROTO;
-			goto out;
+			goto finish_request;
 		}
 
 		*((u64 *)val) = *reply;
-	out:
+	finish_request:
 		ptlrpc_req_finished(req);
 		return rc;
 	} else if (KEY_IS(KEY_FIEMAP)) {
diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c
index 5122205..150d2ec 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c
@@ -176,26 +176,26 @@ static int llog_client_next_block(const struct lu_env *env,
 	ptlrpc_request_set_replen(req);
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY);
 	if (body == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	/* The log records are swabbed as they are processed */
 	ptr = req_capsule_server_get(&req->rq_pill, &RMF_EADATA);
 	if (ptr == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	*cur_idx = body->lgd_saved_index;
 	*cur_offset = body->lgd_cur_offset;
 
 	memcpy(buf, ptr, len);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 err_exit:
 	LLOG_CLIENT_EXIT(loghandle->lgh_ctxt, imp);
@@ -233,22 +233,22 @@ static int llog_client_prev_block(const struct lu_env *env,
 
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY);
 	if (body == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	ptr = req_capsule_server_get(&req->rq_pill, &RMF_EADATA);
 	if (ptr == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	memcpy(buf, ptr, len);
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 err_exit:
 	LLOG_CLIENT_EXIT(loghandle->lgh_ctxt, imp);
@@ -282,12 +282,12 @@ static int llog_client_read_header(const struct lu_env *env,
 	ptlrpc_request_set_replen(req);
 	rc = ptlrpc_queue_wait(req);
 	if (rc)
-		goto out;
+		goto finish_request;
 
 	hdr = req_capsule_server_get(&req->rq_pill, &RMF_LLOG_LOG_HDR);
 	if (hdr == NULL) {
 		rc = -EFAULT;
-		goto out;
+		goto finish_request;
 	}
 
 	memcpy(handle->lgh_hdr, hdr, sizeof(*hdr));
@@ -305,7 +305,7 @@ static int llog_client_read_header(const struct lu_env *env,
 		CERROR("you may need to re-run lconf --write_conf.\n");
 		rc = -EIO;
 	}
-out:
+finish_request:
 	ptlrpc_req_finished(req);
 err_exit:
 	LLOG_CLIENT_EXIT(handle->lgh_ctxt, imp);
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1290890 — Re: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-12-14 08:00 +0100
SubjectRe: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls
Message-ID<qFvh0-2xT-11@gated-at.bofh.it>
In reply to#1290617
Markus, please stop sending these things to rename out labels unless
there is a bug.  CodingStyle allows out labels.

regards,
dan carpenter

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

[toc] | [prev] | [next] | [standalone]


#1290989 — Re: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-14 10:10 +0100
SubjectRe: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls
Message-ID<qFxiN-43P-7@gated-at.bofh.it>
In reply to#1290890
> Markus, please stop sending these things to rename out labels unless
> there is a bug.  CodingStyle allows out labels.

How does this feedback fit to information like the following?

"…
Chapter 7: …
…
Choose label names which say what the goto does or why the goto exists.
… Avoid using GW-BASIC names …
…"

Regards,
Markus
--
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/

[toc] | [prev] | [next] | [standalone]


#1291008 — Re: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-12-14 10:40 +0100
SubjectRe: [PATCH 2/7] staging: lustre: Rename a jump label for ptlrpc_req_finished() calls
Message-ID<qFxLQ-4dP-23@gated-at.bofh.it>
In reply to#1290989
On Mon, Dec 14, 2015 at 10:08:03AM +0100, SF Markus Elfring wrote:
> > Markus, please stop sending these things to rename out labels unless
> > there is a bug.  CodingStyle allows out labels.
> 
> How does this feedback fit to information like the following?
> 
> "…
> Chapter 7: …
> …
> Choose label names which say what the goto does or why the goto exists.

A lot of people think "out" says what the goto does and why it exists.
I personally don't agree with them but if you look at when I complain
about it, it's almost always when it causes a bug.

> … Avoid using GW-BASIC names …

Those when people just use numbers for their label names instead of
words like out1, out2, out4, out5.  It's a different thing.

regards,
dan carpenter

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

[toc] | [prev] | [next] | [standalone]


#1291036 — Re: staging: lustre: Rename a jump label for ptlrpc_req_finished() calls

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-14 11:10 +0100
SubjectRe: staging: lustre: Rename a jump label for ptlrpc_req_finished() calls
Message-ID<qFyeU-4Fp-29@gated-at.bofh.it>
In reply to#1291008
>>> Markus, please stop sending these things to rename out labels unless
>>> there is a bug.  CodingStyle allows out labels.
>>
>> How does this feedback fit to information like the following?
>>
>> "…
>> Chapter 7: …
>> …
>> Choose label names which say what the goto does or why the goto exists.
> 
> A lot of people think "out" says what the goto does and why it exists.

I have got the impression that this short identifier is only partly appropriate.


> I personally don't agree with them

I guess that my opinion goes into a similar direction here.


> but if you look at when I complain about it, it's almost always
> when it causes a bug.

I agree that the combination with bug fixing is more appealing
than an attempt to improve coding style applications.


>> … Avoid using GW-BASIC names …
> 
> Those when people just use numbers for their label names instead of
> words like out1, out2, out4, out5.  It's a different thing.

The difference is not so clear for me as it appears to you.
How many software developers can still remember habits around
the selection of such identifiers from GW-BASIC times?

Regards,
Markus
--
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/

[toc] | [prev] | [next] | [standalone]


#1290618 — [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2015-12-13 15:00 +0100
Subject[PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions
Message-ID<qFflU-CN-5@gated-at.bofh.it>
In reply to#1290616
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 13 Dec 2015 09:30:47 +0100

Six goto statements referred to a source code position directly behind them.
Thus omit such unnecessary jumps.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/staging/lustre/lustre/llite/namei.c     | 1 -
 drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 -------
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 64db5e8..2113dd4 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -554,7 +554,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
 		retval = NULL;
 	else
 		retval = dentry;
-	goto out;
  out:
 	if (req)
 		ptlrpc_req_finished(req);
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 294c050..920b1e9 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1181,7 +1181,6 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp,
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-	goto out;
 out:
 	ptlrpc_req_finished(req);
 	return rc;
@@ -1216,7 +1215,6 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives)
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-	goto out;
 out:
 	ptlrpc_req_finished(req);
 	return rc;
@@ -1282,7 +1280,6 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp)
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-	goto out;
 out:
 	ptlrpc_req_finished(req);
 	return rc;
@@ -1362,8 +1359,6 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp,
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-	goto out;
-
 out:
 	ptlrpc_req_finished(req);
 	return rc;
@@ -1427,8 +1422,6 @@ static int mdc_ioc_hsm_request(struct obd_export *exp,
 	ptlrpc_request_set_replen(req);
 
 	rc = mdc_queue_wait(req);
-	goto out;
-
 out:
 	ptlrpc_req_finished(req);
 	return rc;
-- 
2.6.3

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

[toc] | [prev] | [next] | [standalone]


#1292219 — Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions

FromJoe Perches <joe@perches.com>
Date2015-12-15 15:30 +0100
SubjectRe: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions
Message-ID<qFYM2-5hd-23@gated-at.bofh.it>
In reply to#1290618
On Sun, 2015-12-13 at 14:52 +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 13 Dec 2015 09:30:47 +0100
> 
> Six goto statements referred to a source code position directly behind them.
> Thus omit such unnecessary jumps.

I suggest you leave a blank line instead
of deleting the goto.

> diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
[]
> @@ -554,7 +554,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
>  		retval = NULL;
>  	else
>  		retval = dentry;
> -	goto out;
>   out:
>  	if (req)
>  		ptlrpc_req_finished(req);

etc.,,
--
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/

[toc] | [prev] | [next] | [standalone]


#1292230 — Re: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-12-15 15:50 +0100
SubjectRe: [PATCH 1/7] staging: lustre: Delete unnecessary goto statements in six functions
Message-ID<qFZ5o-5o7-13@gated-at.bofh.it>
In reply to#1292219
On Tue, Dec 15, 2015 at 06:27:56AM -0800, Joe Perches wrote:
> On Sun, 2015-12-13 at 14:52 +0100, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sun, 13 Dec 2015 09:30:47 +0100
> > 
> > Six goto statements referred to a source code position directly behind them.
> > Thus omit such unnecessary jumps.
> 
> I suggest you leave a blank line instead
> of deleting the goto.
> 

What is the point of the little bunny hop?

regards,
dan carpenter

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

[toc] | [prev] | [next] | [standalone]


Page 2 of 10 — ← Prev page 1 [2] 3 4 … 10  Next page →

Back to top | Article view | linux.kernel


csiph-web