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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79AB8C43334 for ; Wed, 6 Jul 2022 19:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233871AbiGFTPI (ORCPT ); Wed, 6 Jul 2022 15:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiGFTPE (ORCPT ); Wed, 6 Jul 2022 15:15:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2632C19C19 for ; Wed, 6 Jul 2022 12:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657134901; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fe2Xwz5G0SOLEGSbWZeizefklyOtEuVCF/HmgAiG5W8=; b=NOClT1bnzEoubqinkjt6Ke9Hy9ieDcOFJAa9+eIkZtytdYPX5DzL7JLmT+cAaJ4pjlKykF fl+oAzh3mgqJxfa6ODwvoNtEewtRYT1q6meLl4XpvrNWJgenXRz4+7G//CPgLCvxs2q/DA Q0VXi75W0gnaP8Mag0SyxWpp7onrTsY= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-NcxX9MlkPHS_1GFEg0Paag-1; Wed, 06 Jul 2022 15:15:00 -0400 X-MC-Unique: NcxX9MlkPHS_1GFEg0Paag-1 Received: by mail-il1-f199.google.com with SMTP id b8-20020a92c568000000b002dc0d54f7b1so5349972ilj.19 for ; Wed, 06 Jul 2022 12:15:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=fe2Xwz5G0SOLEGSbWZeizefklyOtEuVCF/HmgAiG5W8=; b=LYQwisAhEoK76VSr2QmSPf/VW+Xu6S4HBTmUb2D/VBU+438yLxEyWJiPtiPO63Tj1C wmkGzwW33S1dxBMNQqNJ7FYh5C28kgwHw2TCiAitNOZ+A/mjCVl4jP/tea2AkiYu/Vnl /8F1ZCm3RtRFIRtHHmICAZ7hkBzAOxalgjpUiOqPLtQ2iimux7BdkYmlwJt0bc2M3LFO ZVs3lifSPh9dd9cmgPnEFKNblpvuoHOm0LtFWPz/dGUqsEHuosezifZCnqZtrxKmL91W UWa6Nt1QQXgtjhifyG7kLKU7P5tS70R+SSw9jt/P1rUcBgK9iPCjbQPknBXjbuUtYVto xOzw== X-Gm-Message-State: AJIora/ct5wPS8Bw4luCEifPgipbs4x8L0A410Ou1iNBV6FA7BHlbFpD kkmTKwoo3YQwMrXw7elZIpiQ7feeDYIhKg2IqLCjUEDWumd9JlYC7LLykFYM+6SAbntwoulTdvS xP44niyt8mj5VxohB0WOqaOgc X-Received: by 2002:a05:6638:f81:b0:33c:5393:c0ff with SMTP id h1-20020a0566380f8100b0033c5393c0ffmr25986100jal.231.1657134899820; Wed, 06 Jul 2022 12:14:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uU5DNOvzd0f8YLcM9RN/fjk8aTWDGW1pdOba6lI2hg5z6GFsfHePI/n1aNOqFJfFXMJ9bwLg== X-Received: by 2002:a05:6638:f81:b0:33c:5393:c0ff with SMTP id h1-20020a0566380f8100b0033c5393c0ffmr25986091jal.231.1657134899640; Wed, 06 Jul 2022 12:14:59 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id g93-20020a028566000000b003319a68d2f5sm16176468jai.125.2022.07.06.12.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 12:14:58 -0700 (PDT) Date: Wed, 6 Jul 2022 13:14:56 -0600 From: Alex Williamson To: Deming Wang Cc: , , , Alexey Kardashevskiy Subject: Re: [PATCH] vfio/spapr_tce: Remove the unused parameters container Message-ID: <20220706131456.3c08c2b7.alex.williamson@redhat.com> In-Reply-To: <20220702064613.5293-1-wangdeming@inspur.com> References: <20220702064613.5293-1-wangdeming@inspur.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2 Jul 2022 02:46:13 -0400 Deming Wang wrote: > The parameter of container has been unused for tce_iommu_unuse_page. > So, we should delete it. > > Signed-off-by: Deming Wang > --- > drivers/vfio/vfio_iommu_spapr_tce.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) I'll give Alexey a chance to ack this, but agree that it seems this arg has never had any purpose. Perhaps a debugging remnant. Thanks, Alex > > diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c > index 708a95e61831..ea3d17a94e94 100644 > --- a/drivers/vfio/vfio_iommu_spapr_tce.c > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c > @@ -378,8 +378,7 @@ static void tce_iommu_release(void *iommu_data) > kfree(container); > } > > -static void tce_iommu_unuse_page(struct tce_container *container, > - unsigned long hpa) > +static void tce_iommu_unuse_page(unsigned long hpa) > { > struct page *page; > > @@ -474,7 +473,7 @@ static int tce_iommu_clear(struct tce_container *container, > continue; > } > > - tce_iommu_unuse_page(container, oldhpa); > + tce_iommu_unuse_page(oldhpa); > } > > iommu_tce_kill(tbl, firstentry, pages); > @@ -524,7 +523,7 @@ static long tce_iommu_build(struct tce_container *container, > ret = iommu_tce_xchg_no_kill(container->mm, tbl, entry + i, > &hpa, &dirtmp); > if (ret) { > - tce_iommu_unuse_page(container, hpa); > + tce_iommu_unuse_page(hpa); > pr_err("iommu_tce: %s failed ioba=%lx, tce=%lx, ret=%ld\n", > __func__, entry << tbl->it_page_shift, > tce, ret); > @@ -532,7 +531,7 @@ static long tce_iommu_build(struct tce_container *container, > } > > if (dirtmp != DMA_NONE) > - tce_iommu_unuse_page(container, hpa); > + tce_iommu_unuse_page(hpa); > > tce += IOMMU_PAGE_SIZE(tbl); > }