Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp618923pxb; Thu, 23 Sep 2021 07:19:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCIKrle/eRDbhUJsVPhjyUZsms1YOlThLYb0z4Ccyr1dvbSVqWxQW7XrKDu+i/RSrqc6Me X-Received: by 2002:a5e:a609:: with SMTP id q9mr4045469ioi.23.1632406788075; Thu, 23 Sep 2021 07:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632406788; cv=none; d=google.com; s=arc-20160816; b=H1kK++CWq9vsJtdvqGmyzP82d10uCjXXHAE1MQTN6W96k3WOG6YRuqUtSjG/K88coE MYrrr7BGW5cgVBlZ6TR6p+kgHpovHkTjvW+JiJclTGl3u68cVMg1vUorBpMI92B+0iv7 uBNHvT5gCd/WifWwVZlj11GwBtUEFBkaL9xvM81vwnXDmUZ7/FblWDzcHdIj7z9x3ClQ a+miA2kgv+Ifp5ux0w4RsZEtTdyMyhatuEibQD0Vt0yp7t6k/DKnD7mbbLFOFdZ11C5D F7XTOMcP0v1axas8QIo6fXQd224ZhWaJOX112ZuSm335wmjpokehz8neeeTuRae+dbKG VRLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=9HKguLBcl6Xc2w1XNRpbMZSXz9liJ9nOFYDNnmE2rEw=; b=jlm908r35Ttj9rJjQWi9ukWbQ8cDjJ7kUeQrxDzyaPf0Ni/Cr92QQChcs7zmJ4kBkr eO+sGveSdaB8InIBRrDu6iSPn36Z8CFZm4GleGRXfX9GUxKbsv3poacRNVZhqOKFYVR0 BBQsaaznpd9r8ZJwiCtoe5+EZIiUyiwL1gCbuP3d6ldrWQO6B0h/9GAzWXyP+bzCp/D9 19VDNI17uyosQ+np8wWGnMm4mnLerAUvjKR/HxHJ12qkcTkZZDV+3NPf4vGtgPL7wBIX 64fjdCLprF3F5sICaodJ/Z6jg3FKhS9YR7fvoBLxycfNaaEYwZIdnxM6qXjff/k69m6F XR3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si7333923ioz.60.2021.09.23.07.19.31; Thu, 23 Sep 2021 07:19:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241590AbhIWOTm (ORCPT + 99 others); Thu, 23 Sep 2021 10:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241308AbhIWOTk (ORCPT ); Thu, 23 Sep 2021 10:19:40 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9613EC061574 for ; Thu, 23 Sep 2021 07:18:08 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTPXz-0007m8-0V; Thu, 23 Sep 2021 16:17:59 +0200 Received: from mtr by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mTPXy-0000Xt-8t; Thu, 23 Sep 2021 16:17:58 +0200 Date: Thu, 23 Sep 2021 16:17:58 +0200 From: Michael Tretter To: Harini Katakam Cc: vkoul@kernel.org, romain.perier@gmail.com, allen.lkml@gmail.com, yukuai3@huawei.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, harinikatakamlinux@gmail.com, michal.simek@xilinx.com, radhey.shyam.pandey@xilinx.com, shravya.kumbham@xilinx.com, kernel@pengutronix.de Subject: Re: [PATCH 4/4] dmaengine: zynqmp_dma: Typecast with enum to fix the coverity warning Message-ID: <20210923141758.GB30905@pengutronix.de> References: <20210914082817.22311-1-harini.katakam@xilinx.com> <20210914082817.22311-5-harini.katakam@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210914082817.22311-5-harini.katakam@xilinx.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:12:10 up 217 days, 17:36, 113 users, load average: 0.96, 0.50, 0.32 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: mtr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Sep 2021 13:58:17 +0530, Harini Katakam wrote: > From: Shravya Kumbham > > Typecast the flags variable with (enum dma_ctrl_flags) in > zynqmp_dma_prep_memcpy function to fix the coverity warning. > > Addresses-Coverity: Event mixed_enum_type. > Signed-off-by: Shravya Kumbham > Reviewed-by: Radhey Shyam Pandey > --- > drivers/dma/xilinx/zynqmp_dma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c > index 588460e56ab8..282d01ab402f 100644 > --- a/drivers/dma/xilinx/zynqmp_dma.c > +++ b/drivers/dma/xilinx/zynqmp_dma.c > @@ -849,7 +849,7 @@ static struct dma_async_tx_descriptor *zynqmp_dma_prep_memcpy( > > zynqmp_dma_desc_config_eod(chan, desc); > async_tx_ack(&first->async_tx); > - first->async_tx.flags = flags; > + first->async_tx.flags = (enum dma_ctrl_flags)flags; Thanks for the patch. I looked at a few dmaengine drivers, at it looks like all of them have this issue. Maybe we should change the signature of the dmaengine_prep_dma_memcpy() engine to accept "enum dma_ctrl_flags flags" instead of "unsigned long flags"? Michael > return &first->async_tx; > } > > -- > 2.17.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >