linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xiong Weimin <xiongweimin@kylinos.cn>
Cc: "Zhu Lingshan" <lingshan.zhu@kernel.org>,
	"Jason Wang" <jasowangio@gmail.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vdpa: ifcvf: Put device on unsupported feature error
Date: Tue, 4 Aug 2026 17:18:33 -0400	[thread overview]
Message-ID: <20260804171710-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260804092626.1344371-1-xiongweimin@kylinos.cn>

On Tue, Aug 04, 2026 at 05:26:26PM +0800, Xiong Weimin wrote:
> Route unsupported provisioned features through the common error path after
> vdpa_alloc_device() so the allocated device and adapter pointer are
> released consistently.
> 
> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>


I have no idea what this means. This is not how a commit log should
look. An example template:

Currently .... This is a problem because ... We can not do .... because
... To address .... And then ....



> ---
>  drivers/vdpa/ifcvf/ifcvf_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
> index ab6d6ab3b..3cd2c35db 100644
> --- a/drivers/vdpa/ifcvf/ifcvf_main.c
> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c
> @@ -724,7 +724,8 @@ static int ifcvf_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
>  		if (config->device_features & ~device_features) {
>  			IFCVF_ERR(pdev, "The provisioned features 0x%llx are not supported by this device with features 0x%llx\n",
>  				  config->device_features, device_features);
> -			return -EINVAL;
> +			ret = -EINVAL;
> +			goto err;
>  		}
>  		device_features &= config->device_features;
>  	}
> @@ -748,6 +749,7 @@ static int ifcvf_vdpa_dev_add(struct vdpa_mgmt_dev *mdev, const char *name,
>  	return 0;
>  
>  err:
> +	ifcvf_mgmt_dev->adapter = NULL;
>  	put_device(&adapter->vdpa.dev);
>  	return ret;
>  }
> -- 
> 2.43.0


      parent reply	other threads:[~2026-08-04 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  9:26 [PATCH] vdpa: ifcvf: Put device on unsupported feature error Xiong Weimin
2026-08-04 16:32 ` Markus Elfring
2026-08-05  1:39   ` Xiong Weimin
2026-08-04 21:18 ` Michael S. Tsirkin [this message]

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=20260804171710-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=jasowangio@gmail.com \
    --cc=lingshan.zhu@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=xiongweimin@kylinos.cn \
    --cc=xuanzhuo@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).