public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: gregkh@linuxfoundation.org
Cc: ckulkarnilinux@gmail.com, hch@lst.de, mgurtovoy@nvidia.com,
	stefanha@redhat.com, stable-commits@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: Patch "virtio-blk: remove unneeded "likely" statements" has been added to the 5.14-stable tree
Date: Mon, 18 Oct 2021 06:22:08 -0400	[thread overview]
Message-ID: <20211018062109-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <163455135025212@kroah.com>

On Mon, Oct 18, 2021 at 12:02:30PM +0200, gregkh@linuxfoundation.org wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     virtio-blk: remove unneeded "likely" statements
> 
> to the 5.14-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      virtio-blk-remove-unneeded-likely-statements.patch
> and it can be found in the queue-5.14 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
> 
> 
> >From 6105d1fe6f4c24ce8c13e2e6568b16b76e04983d Mon Sep 17 00:00:00 2001
> From: Max Gurtovoy <mgurtovoy@nvidia.com>
> Date: Sun, 5 Sep 2021 11:57:17 +0300
> Subject: virtio-blk: remove unneeded "likely" statements
> 
> From: Max Gurtovoy <mgurtovoy@nvidia.com>
> 
> commit 6105d1fe6f4c24ce8c13e2e6568b16b76e04983d upstream.
> 
> Usually we use "likely/unlikely" to optimize the fast path. Remove
> redundant "likely/unlikely" statements in the control path to simplify
> the code and make it easier to read.
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
> Link: https://lore.kernel.org/r/20210905085717.7427-1-mgurtovoy@nvidia.com
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

It's harmless but doesn't seem appropriate for stable.

> ---
>  drivers/block/virtio_blk.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -765,7 +765,7 @@ static int virtblk_probe(struct virtio_d
>  		goto out_free_vblk;
>  
>  	/* Default queue sizing is to fill the ring. */
> -	if (likely(!virtblk_queue_depth)) {
> +	if (!virtblk_queue_depth) {
>  		queue_depth = vblk->vqs[0].vq->num_free;
>  		/* ... but without indirect descs, we use 2 descs per req */
>  		if (!virtio_has_feature(vdev, VIRTIO_RING_F_INDIRECT_DESC))
> @@ -839,7 +839,7 @@ static int virtblk_probe(struct virtio_d
>  	else
>  		blk_size = queue_logical_block_size(q);
>  
> -	if (unlikely(blk_size < SECTOR_SIZE || blk_size > PAGE_SIZE)) {
> +	if (blk_size < SECTOR_SIZE || blk_size > PAGE_SIZE) {
>  		dev_err(&vdev->dev,
>  			"block size is changed unexpectedly, now is %u\n",
>  			blk_size);
> 
> 
> Patches currently in stable-queue which might be from mgurtovoy@nvidia.com are
> 
> queue-5.14/virtio-blk-remove-unneeded-likely-statements.patch


       reply	other threads:[~2021-10-18 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <163455135025212@kroah.com>
2021-10-18 10:22 ` Michael S. Tsirkin [this message]
2021-10-18 10:23   ` Patch "virtio-blk: remove unneeded "likely" statements" has been added to the 5.14-stable tree Michael S. Tsirkin
2021-10-18 10:27     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018062109-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ckulkarnilinux@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=mgurtovoy@nvidia.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox