From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0EEAC12002 for ; Wed, 21 Jul 2021 13:57:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD8296121E for ; Wed, 21 Jul 2021 13:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235762AbhGUNQg (ORCPT ); Wed, 21 Jul 2021 09:16:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38803 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238684AbhGUNQf (ORCPT ); Wed, 21 Jul 2021 09:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626875831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DDrHjh3VhLT0AfhlZPlV06wXQC67/bVbhkLa9iM0YQw=; b=XDhkHW1hmGcZPV+8dQo7tV4EEILxujCS2WbeX9C79qYipIIvrHaXZxFxVQKO5lrmLklIne MqwY11Rm8WhaIwcLBW5oskak55NJCpvp5oemofk99ljJjNDlA8mzDK5uJJ6hhZ0PD5K9dz jE2KiYLGMdlVzaCH9C5ak8Ai0S/u3bM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-603-qBICz2xPMMKSW_mnu_nLeg-1; Wed, 21 Jul 2021 09:57:09 -0400 X-MC-Unique: qBICz2xPMMKSW_mnu_nLeg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6232510150B7; Wed, 21 Jul 2021 13:57:07 +0000 (UTC) Received: from localhost (ovpn-112-135.ams2.redhat.com [10.36.112.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 286FC779D0; Wed, 21 Jul 2021 13:56:45 +0000 (UTC) From: Cornelia Huck To: Jason Gunthorpe , kvm@vger.kernel.org Cc: Alex Williamson , Yishai Hadas Subject: Re: [PATCH v3] vfio/pci: Make vfio_pci_regops->rw() return ssize_t In-Reply-To: <0-v3-5db12d1bf576+c910-vfio_rw_jgg@nvidia.com> Organization: Red Hat GmbH References: <0-v3-5db12d1bf576+c910-vfio_rw_jgg@nvidia.com> User-Agent: Notmuch/0.32.1 (https://notmuchmail.org) Date: Wed, 21 Jul 2021 15:56:43 +0200 Message-ID: <874kcn93dw.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Jul 21 2021, Jason Gunthorpe wrote: > From: Yishai Hadas > > The only implementation of this in IGD returns a -ERRNO which is > implicitly cast through a size_t and then casted again and returned as a > ssize_t in vfio_pci_rw(). > > Fix the vfio_pci_regops->rw() return type to be ssize_t so all is > consistent. > > Fixes: 28541d41c9e0 ("vfio/pci: Add infrastructure for additional device specific regions") > Signed-off-by: Yishai Hadas > Signed-off-by: Jason Gunthorpe > --- > drivers/vfio/pci/vfio_pci_igd.c | 10 +++++----- > drivers/vfio/pci/vfio_pci_private.h | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Cornelia Huck