Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4996961pxv; Wed, 28 Jul 2021 00:03:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG2SAlE+MVUKhDOPVB4LOFfJqhilGzL5z6rRMDyxR2JwydxGtBwEeqLM31tii+CdhZBa8x X-Received: by 2002:a05:6e02:1a28:: with SMTP id g8mr19625221ile.128.1627455824217; Wed, 28 Jul 2021 00:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627455824; cv=none; d=google.com; s=arc-20160816; b=X0CFZQ00F9jr7v5caiHopSVy0PfU1+indb7hGePEvtkAofVtCydVH6pTNF9BfYk1s9 Wdw5yYyaH23qxnIW4HLcv3WTg2yB7EdaG1FhzXTExnUOnxjF1dEBTrq5l6S5x4caSvNw XVJLtoRT8ZPxRJmsxsMBqBbzWxEdoU7MG4A6sW5WAKJbPyQo/zM6DQSecEtmv43/5DSe fMrv5B17FBHzi71yauAf0ZAPhTwU+xAGKEg/lksdeDFiaSNv+lfuF3JR5lQ7kB/9ozYr dZ/frz8lbFdrG0QEk6fWHe/G1cQ2B6J7GfJwC/JRh0r21n+mO1rSMt8heoqI93dhpwLA HPOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pYGIAmCG+3xyL5d4yU/QmADFhwqc8baFD81H3udGjRk=; b=htH3sLm75oPe9Aam/MP/3GZPE7EcECiJpiQDjO5P0WAL94STemasUgbtyZUrahW1tf Vlr/jzJzNmizH2OuDt+Oj2l8rpFow2NRdL6mD68lt2Kms0osQVHFaCT2QKg+7twgvqVN 05diGAsfIGHdlN6mNKYKbiUIBcwSLYZs6HEa57Wq0O2g8LDPKNItyK2keuYe1BomI1j9 miMLvPWqscgksLajBdL92HNeqydB8WV9W5T/FgPLZMGidzArOWeBC72EedyBGKVXmDgd VtsET0wGL69qbKBikf/x2CHraDKRWftdt3Q14LUfIyJfIgEJeC1jMSAkuKAthjg249FO Pqkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FDM94G/g"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si6926259ilt.138.2021.07.28.00.03.32; Wed, 28 Jul 2021 00:03:44 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FDM94G/g"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234056AbhG1HBo (ORCPT + 99 others); Wed, 28 Jul 2021 03:01:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:42970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbhG1HBl (ORCPT ); Wed, 28 Jul 2021 03:01:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE4D960C3F; Wed, 28 Jul 2021 07:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627455700; bh=Pe0ZHMvG6qcMakxU7KrbLnoLHeVkuUbgO2phXsQdKIo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FDM94G/gs3YI/de0Hn+IFf1JEtQUWdlfETwkJAOFV/i1q1p/7EwnNxCO4pG+tq0NS uUDsd0J27wKzd7zHuWRyOYZM9zNM5WzWE3jN7aDlMk/4MSUQlEFE0Baroz3Z2Bh8N9 HoLOvWVluDlimoejnxJNxv4VbL4ceF6w3n9xJfiB7Ry0zHK+yvzI9cqhCkm9p4UgEj j46t6kJxIUq7Uru/pBwHNfj1ZBjwA6CeNDDu9KLkVgQtsqG7/FEX3EkeaNDUFYnZPZ X7KORUm6AScHYRX1b/sGowGkEsqxnEaxSAxdCMbqqUK5uj3siEZxqTzqWOvIwIFy9a 1MXRU16KRCb3A== Date: Wed, 28 Jul 2021 12:31:36 +0530 From: Vinod Koul To: Harini Katakam Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, harinikatakamlinux@gmail.com, michal.simek@xilinx.com, radhey.shyam.pandey@xilinx.com, shravya.kumbham@xilinx.com Subject: Re: [PATCH] dmaengine: pl330: Typecast with enum to fix the coverity warning Message-ID: References: <20210629103710.24828-1-harini.katakam@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210629103710.24828-1-harini.katakam@xilinx.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-06-21, 16:07, Harini Katakam wrote: > From: Shravya Kumbham > > Typecast the flags and flg variables with (enum dma_ctrl_flags) in > pl330_prep_dma_cyclic, pl330_prep_dma_memcpy and pl330_prep_slave_sg > functions to fix the coverity warning. > > Addresses-Coverity: Event mixed_enum_type. > Signed-off-by: Shravya Kumbham > Signed-off-by: Harini Katakam > Reviewed-by: Radhey Shyam Pandey > --- > drivers/dma/pl330.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c > index 110de8a60058..35afbad2e1a7 100644 > --- a/drivers/dma/pl330.c > +++ b/drivers/dma/pl330.c > @@ -2752,7 +2752,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( > return NULL; > > pch->cyclic = true; > - desc->txd.flags = flags; > + desc->txd.flags = (enum dma_ctrl_flags)flags; Does this driver use the txd.flags? > > return &desc->txd; > } > @@ -2804,7 +2804,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, > > desc->bytes_requested = len; > > - desc->txd.flags = flags; > + desc->txd.flags = (enum dma_ctrl_flags)flags; > > return &desc->txd; > } > @@ -2889,7 +2889,7 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, > } > > /* Return the last desc in the chain */ > - desc->txd.flags = flg; > + desc->txd.flags = (enum dma_ctrl_flags)flg; > return &desc->txd; > } > > -- > 2.17.1 -- ~Vinod