[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] xen/blkback: move blkif_get_x86_*_req() into blkback.c
- To: Juergen Gross <jgross@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 14 Mar 2023 15:00:36 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WbCHVnQ0XxE5MXuAsdLBTeyMjDeZs7OnnSEDyipCExM=; b=EP+qMiF0l3RuzhAI9QlZK/d1MiugvscAtnupPqOR4je2FPrQpZTnQbisWLaQznm0suzu+pBaWs6KkrTuYv2etUaKY3czpnqYeuI0lnR1tDSCOJHtZi9Z51UsXHwsVs3PR+jzVbark3gabwpBj9moSPBpzfCYSD4OA1V1miHmL8qEo5rq0X5oe3+jjvm1a7ou+z/QZ5lMbvKPgn8Ou749zq6f/HKJVJugurHVrwC4ZuJqin19iniyU57LbllyVy8aoJPIJs/s9r9SJrYGRE0bMpYXHysU08Oq9UQZB+OKs11u1lG9z4oh522+CPjo4eqf/kDQ64y8pVqXgBH2/EpiBg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e/ogo2OGLRxvjVVAse68R+8VYZ7gxAby8hnkxQbhqdyw0dCcJWr6DbFERZWUTm0+wHpVTtMuWVYN16B7F6WIu7lGThnej+1lX2aUAXlplOY+vxLD+fmFM2O3s3YhkDFQP2OQW+6IClusELbk5hed6HzB0YPdIAovD+uwonhiRkV3aiXtgzU9SPfpLMKkJuWxnEMdZCr32s+hSx94cbgdYFB48kmJELQrqnpuk1DzjJHCVL/nmanSxbfopP/aHlAGzENbrEIXW4uenNScUdgtYR2eaJBBhyCoAue/jiBUy77ycL0yCgg5oIUIs13XgwOEjOCRXin1WamHW5S5+EmX6A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, Jens Axboe <axboe@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 14 Mar 2023 14:00:58 +0000
- Ironport-data: A9a23:8MesvqqoT5PRsj0S3s/3kwN7Z65eBmL8ZBIvgKrLsJaIsI4StFCzt garIBmBb/fZMWHxeYwja9jipE4H65aEm99hTQFkqCs8EXwX8puZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weFziVNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXACIyZxvapOiZ/JimF8JmmME/APSxFqpK7xmMzRmBZRonabbqZvyQoPV+jHI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeWraYWPEjCJbZw9ckKwv GXJ8n6/GhgHHNee1SCE4jSngeqncSbTAdpKS+3pp6M66LGV7jM4GgIUd1zimKm0rEriVukOc BE2wwN7+MDe82TuFLERRSaQonGeuQUHc8FNCOB84waIooLQ4gCEFi0HQyRHZdgOqsA7X3op2 0WPktevAiZg2JWRSHSA5vKeqTS5OgALImIYIywJVw0I55/kuo5bphvfRNFuOK24lNv4HXf8w FiivCU4wrkek8MP/6G65kzcxSKhoIDTSQw47RmRWXiqhj6Vf6agbo2srFLdvfBJKd/DSkHb5 Sde3c+D8OoJEJeB0jSXR/kAF62o4PDDNyDAhVloHN8q8DHFF2OfQL28KQpWfC9BWvvosxeyC KMPkWu9PKNuAUY=
- Ironport-hdrordr: A9a23:+iXPuago5iQwJ6FD/DaPnvIva3BQXioji2hC6mlwRA09TyX5ra 2TdZUgpHjJYVMqMk3I9uruBEDtex3hHNtOkOos1NSZLW3bUQmTTL2KhLGKq1Hd8m/Fh4xgPM 9bGJSWY+eAaGSS4/ya3OG5eexQvOVu8sqT9JjjJ6EGd3AVV0lihT0JezpyCidNNW977QJSLu vn2iJAzQDQAEg/X4CAKVQuefPMnNHPnIKOW296O/Z2gDP+9Q9B8dTBYmOl4is=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Dec 16, 2022 at 03:58:16PM +0100, Juergen Gross wrote:
> There is no need to have the functions blkif_get_x86_32_req() and
> blkif_get_x86_64_req() in a header file, as they are used in one place
> only.
>
> So move them into the using source file and drop the inline qualifier.
>
> While at it fix some style issues, and simplify the code by variable
> reusing and using min() instead of open coding it.
>
> Instead of using barrier() use READ_ONCE() for avoiding multiple reads
> of nr_segments.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> drivers/block/xen-blkback/blkback.c | 104 ++++++++++++++++++++++++++++
> drivers/block/xen-blkback/common.h | 96 -------------------------
> 2 files changed, 104 insertions(+), 96 deletions(-)
>
> diff --git a/drivers/block/xen-blkback/blkback.c
> b/drivers/block/xen-blkback/blkback.c
> index 243712b59a05..7561fdb72c13 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -1072,7 +1072,111 @@ static void end_block_io_op(struct bio *bio)
> bio_put(bio);
> }
>
> +static void blkif_get_x86_32_req(struct blkif_request *dst,
> + struct blkif_x86_32_request *src)
src can be const.
> +{
> + int i, n;
Could we also take the opportunity to convert i and n to unsigned?
With that:
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|