Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1050931pxx; Tue, 27 Oct 2020 07:11:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx//zJcOSQ5SZ5YRL5AEuBfH3NqJme9GtsPgjcgT+ljUlC9zCiGeS2nN+5XJDmavRXYbnVq X-Received: by 2002:aa7:c586:: with SMTP id g6mr2476004edq.343.1603807891930; Tue, 27 Oct 2020 07:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603807891; cv=none; d=google.com; s=arc-20160816; b=sI14OeYwfbV8J9BZQ9zvbBY3MDOzFJWdBVdwcP7vKVfawijvk0Kyu34xSCKNIf3Ic7 YMxch4uiOkHthe40Vcp/eyOfgOztrXBl5a4fmgO5cT8FrGv6p7gLeG6gwXLdoNBaxCRC I2G9V1WEqY7APbmCdjBE5PmRbf9bGFIOsqwI2wYLrgZhNueKnbZA85d7tUO1E7r0AEX1 veEuNJYeENTIE5GkHnbluPAKXKmccoyZXMfnIWh0qplj24NHahJFJ+NN36M6MbYtk62M ++Eh0PCYUODK4L5k4482v8JVJ6Fizb2fp+1kv4P9CJxXD2EQdcdPM2ZPpKXOGaj4Hlpe E9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Gvm0rHZv6ZytyaW+fToZnnx5xhB6hxH+duasZbvDz+4=; b=y8xdmzGjXLUANdoEti1FVoOWqxV029j4e5vHn2aOAPpV/i0Wxbd2URLydoMbd7bQbl dJDsLteSNsILt1rL9oXX5chNVivGZVjeBdPADEN8DHTBHWt4q46Hirs+PzcJ1zrcMvxx X6zp+5wq6ghbKsVm7MEGVFdg83lfZG7dyPAEqdw3iutlK3fWGaVKZ8YikbhO6BUc76TD nwu4tYj2Rfw1QyUCzUHz9QdEPnf+nn53R1ECAVFBR4BAjGEeboqdvJHSekz0rBbPoQne dzZwbEZpHddP5uzFp79yvV6M2CYJVdjJVR4sl7JMiAVu1+akzkt5KdUTLi4mSfVu16mC Kv9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AjuetEnr; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si895243edp.57.2020.10.27.07.11.04; Tue, 27 Oct 2020 07:11:31 -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=@ti.com header.s=ti-com-17Q1 header.b=AjuetEnr; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732718AbgJ0HCC (ORCPT + 99 others); Tue, 27 Oct 2020 03:02:02 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43578 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730446AbgJ0HCB (ORCPT ); Tue, 27 Oct 2020 03:02:01 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09R71kda057937; Tue, 27 Oct 2020 02:01:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1603782106; bh=Gvm0rHZv6ZytyaW+fToZnnx5xhB6hxH+duasZbvDz+4=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=AjuetEnr/G8X3j36GCztIXk9lbZ0zhDKZGea/WjIbs0vkAhREwUD2CH9V8zgVjUjm 4wzRkDwtumeqOt/wR+KKk+x19+unVpZYk+5GNYbaCrtmpGvNvVEQ9kw3iyUTrHEgqo S/3tUqe8LgcxnYGkJKyZJVcb59a+0P2SxrKHcZIU= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09R71kx5041212 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 27 Oct 2020 02:01:46 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 27 Oct 2020 02:01:46 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 27 Oct 2020 02:01:46 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09R71iUR028399; Tue, 27 Oct 2020 02:01:45 -0500 Subject: Re: [PATCH] dmaengine: ti: k3-udma: fix -Wenum-conversion warning To: Arnd Bergmann , Vinod Koul , Grygorii Strashko CC: Arnd Bergmann , Dan Williams , Yu Kuai , , References: <20201026160123.3704531-1-arnd@kernel.org> From: Peter Ujfalusi Message-ID: <2bf8a179-9dad-97b9-2295-31d27eefdbb7@ti.com> Date: Tue, 27 Oct 2020 09:02:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201026160123.3704531-1-arnd@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/10/2020 18.01, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc warns about a mismatch argument type when passing > 'false' into a function that expects an enum: Strange enough, but my gcc does not warn me (Gentoo 10.2.0-r2 p3). > drivers/dma/ti/k3-udma-private.c: In function 'xudma_tchan_get': > drivers/dma/ti/k3-udma-private.c:86:34: warning: implicit conversion from 'enum ' to 'enum udma_tp_level' [-Wenum-conversion] > 86 | return __udma_reserve_##res(ud, false, id); \ > | ^~~~~ > drivers/dma/ti/k3-udma-private.c:95:1: note: in expansion of macro 'XUDMA_GET_PUT_RESOURCE' > 95 | XUDMA_GET_PUT_RESOURCE(tchan); > | ^~~~~~~~~~~~~~~~~~~~~~ But this is valid. The Throughput Levels got expanded with j721e from 2 to three and I failed to update this. > In this case, false has the same numerical value as > UDMA_TP_NORMAL, so passing that is most likely the correct > way to avoid the warning without changing the behavior. Yes, that's correct, thanks for fixing it! Acked-by: Peter Ujfalusi > Fixes: d70241913413 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users") > Signed-off-by: Arnd Bergmann > --- > drivers/dma/ti/k3-udma-private.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma/ti/k3-udma-private.c b/drivers/dma/ti/k3-udma-private.c > index aa24e554f7b4..8563a392f30b 100644 > --- a/drivers/dma/ti/k3-udma-private.c > +++ b/drivers/dma/ti/k3-udma-private.c > @@ -83,7 +83,7 @@ EXPORT_SYMBOL(xudma_rflow_is_gp); > #define XUDMA_GET_PUT_RESOURCE(res) \ > struct udma_##res *xudma_##res##_get(struct udma_dev *ud, int id) \ > { \ > - return __udma_reserve_##res(ud, false, id); \ > + return __udma_reserve_##res(ud, UDMA_TP_NORMAL, id); \ > } \ > EXPORT_SYMBOL(xudma_##res##_get); \ > \ > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki