From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Elfring Date: Thu, 09 Jul 2020 20:55:46 +0000 Subject: Re: [PATCH] scsi: virtio_scsi: Remove unnecessary condition checks Message-Id: <072edd61-9b00-4c63-804f-e98bf271b683@web.de> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paolo Bonzini , Xianting Tian , linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "James E. J. Bottomley" , Jason Wang , "Martin K. Petersen" , "Michael S. Tsirkin" , Stefan Hajnoczi >>> + mempool_destroy(virtscsi_cmd_pool); >>> + virtscsi_cmd_pool = NULL; >>> + kmem_cache_destroy(virtscsi_cmd_cache); >>> + virtscsi_cmd_cache = NULL; >>> return ret; >>> } >> >> How do you think about to add a jump target so that the execution >> of a few statements can be avoided according to a previous >> null pointer check? > > The point of the patch is precisely to simplify the code, I propose another bit of fine-tuning there. > executing a couple more instruction is not an issue. Can an additional label help here besides a possible identifier renaming? Regards, Markus