Re: [PATCH 01/23] block: add a helper to cancel atomic queue limit updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 04, 2024 at 09:53:03AM -0700, Bart Van Assche wrote:
> At least in scsi_add_lun() there are multiple statements between
> queue_limits_start_update(), queue_limits_cancel_update() and
> queue_limits_commit_update(). Has it been considered to use __cleanup()
> to invoke queue_limits_commit_update() when the end of the current scope
> is reached? I think that would make code that uses the
> queue_limits_*_update() functions easier to verify. For an example of
> how to use the __cleanup() macro, see e.g. the __free() and
> no_free_ptr() macros in <linux/cleanup.h>.

It has been considered and rejected as this syntactic sugar might make
teenagers with attention deficit syndrome happy, but otherwise just
horribly obfuscates the code.





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux