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 56199C3DA6F for ; Thu, 24 Aug 2023 13:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231631AbjHXNNq (ORCPT ); Thu, 24 Aug 2023 09:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240397AbjHXNNl (ORCPT ); Thu, 24 Aug 2023 09:13:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE98198A; Thu, 24 Aug 2023 06:13:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BF6026269E; Thu, 24 Aug 2023 13:13:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A422AC433C7; Thu, 24 Aug 2023 13:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1692882818; bh=SfeSvLlzV/QIsfQI6lGrqzROvKL38Kvs5ty/5yOH31A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZhJLIz8BGyAb2ivMZw6rmCdfIOYmFrT9z8ODxNAAJEQ85enR0GfFmnfIbFsFmArtl FXYOynVSVtLEblhukepFVPKrJuXATUHOsl0w7G192F+Dh01gV5/rU18iIZ1iZF5rBy bA5+n8aGEXbZtIfZb49YeDS5zo5cbYTnS7/mUOWs= Date: Thu, 24 Aug 2023 15:13:35 +0200 From: Greg Kroah-Hartman To: Alexandra Diupina Cc: Joerg Roedel , stable@vger.kernel.org, Will Deacon , Matthias Brugger , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Message-ID: <2023082458-mongrel-catlike-b73d@gregkh> References: <20230824130954.29688-1-adiupina@astralinux.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230824130954.29688-1-adiupina@astralinux.ru> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Aug 24, 2023 at 04:09:54PM +0300, Alexandra Diupina wrote: > iommu_device_register always returns 0 in 4.11-5.12, so What do you mean by "4.11-5.12"? > we need to remove redundant comparison with 0 Why? > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: b16c0170b53c ("iommu/mediatek: Make use of iommu_device_register interface") How is this a fix if it isn't actually changing the code at all? > Signed-off-by: Alexandra Diupina > --- > drivers/iommu/mtk_iommu.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 051815c9d2bb..208c47218b75 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -748,9 +748,7 @@ static int mtk_iommu_probe(struct platform_device *pdev) > iommu_device_set_ops(&data->iommu, &mtk_iommu_ops); > iommu_device_set_fwnode(&data->iommu, &pdev->dev.of_node->fwnode); > > - ret = iommu_device_register(&data->iommu); > - if (ret) > - return ret; > + iommu_device_register(&data->iommu); This is obviously incorrect, please fix your "tool" that is telling you to make such a broken change. Unless your tool wants to create buggy code? If so, it's succeeding very well. greg k-h