Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3619330ybt; Tue, 30 Jun 2020 07:25:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4X84mlrf9gshAvrlav8ktIGosyYrilb7wcVaA7KmWPiUl9e3MgALg7A+r5KDD+Fq2Eanz X-Received: by 2002:a17:906:f101:: with SMTP id gv1mr13755873ejb.327.1593527145228; Tue, 30 Jun 2020 07:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593527145; cv=none; d=google.com; s=arc-20160816; b=XnvubvX78q4PnGO9D31csm5h+e/HzOOs2m3ys6XQHNBhm2BKqDdFl/RkM8vS/4wjPp zd+57v4J5E8AUNSVcn+z9DqW4FXg8L2g3INnX/ZjSma9+/828ZVC/kMWCs0qUFPsZLME YakL/RTS4ZZvnCo5VJNydzvHKuPa7xlu2S75t+60E5jjieFilaLwCc9YwNK5CH0wm1hP yNqUoY+Do/J2lqyFIwE8p179/gBX2UWsqIg255o/Ov/yAZ0FiLV1B0OutM5aS7c5KBkA SkTJYA8n7m9bKFA4w9fPPrfFYU5lqrqs5Cy0hUb118IsGX20mzvsmN7GeUEao3PeFC+o DeLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=QHeWzxA1aHHuyUS1XuJEon/3kX/HpJOCckwHBgpSRjU=; b=ZKhdJlBUed5g2qYeIL0GYkALkZxUpMyao7oH8vBz+SEBhyMjpqbjgjWBku+aeKbJKV DIHo8R1eZjoLFs+rzqUIF+H8iGCY8EB1ET/jyYXwCyBpv6uBuiGEn5QxZDr48Fbvgcvk unKdGBwIXT3x9uBPZyHJ6dZ9vhFbc42F/t1yUIZ/ThCvd29WAh9AkyQqV0h7LUFE7/t6 L6BLObotWJjub8sLdwcyPnd6ZwuqsvFS8SFTYHSXZFNXxYyyE/AQ7gNd16D1CMf4rKah ZN/4ETYDNgeNJBpq7AR4AlNQZg6hjfIUuCCaTBig9MBDOD0sn3ZlaYYwVqFcXZeNZw89 Jw7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qq+285UL; 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 bc21si1870550edb.51.2020.06.30.07.25.22; Tue, 30 Jun 2020 07:25:45 -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=default header.b=Qq+285UL; 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 S2388841AbgF3OYd (ORCPT + 99 others); Tue, 30 Jun 2020 10:24:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:55792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728909AbgF3OYc (ORCPT ); Tue, 30 Jun 2020 10:24:32 -0400 Received: from localhost (unknown [122.182.251.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 41D7720672; Tue, 30 Jun 2020 14:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593527072; bh=ge1JjR8yCKRp2SCQdixfwB2tfDCzu96qp1bblnzo3MY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qq+285ULYVSVmGGKvuGr5XnuXZMuyUROGjNId+dkUNPMw5K1hiSmZev8R46Ydkia1 Ljkn6bPbDnvHp5z/eiHxGVXQCKTpv/cMXe+gndtgIWRYRL44My8agPHpLIyzAS2MYt WrmY7cIyTsbSSEnixH18uvI9PlcMgxoTMDvdf11A= Date: Tue, 30 Jun 2020 19:54:27 +0530 From: Vinod Koul To: Amit Tomer Cc: Andre Przywara , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , dan.j.williams@intel.com, cristian.ciocaltea@gmail.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel , linux-actions@lists.infradead.org Subject: Re: [PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA engine Message-ID: <20200630142427.GP2599@vkoul-mobl> References: <1591697830-16311-1-git-send-email-amittomer25@gmail.com> <1591697830-16311-3-git-send-email-amittomer25@gmail.com> <20200624061529.GF2324254@vkoul-mobl> <20200629095207.GG2599@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30-06-20, 15:17, Amit Tomer wrote: > Hi Vinod, > > On Mon, Jun 29, 2020 at 3:22 PM Vinod Koul wrote: > > > If you use of_device_get_match_data() you will not fall into this :) > > But again, of_device_get_match_data() returns void *, and we need > "uintptr_t" in order to type cast it properly (at-least without > warning). Not really, you can cast from void * to you own structure.. btw why do you need uintptr_t? > > Also, while looking around found the similar warning for other file > where it uses " of_device_get_match_data()" > drivers/pci/controller/pcie-iproc-platform.c:56:15: warning: cast to > smaller integer type 'enum iproc_pcie_type' from 'const void *' > [-Wvoid-pointer-to-enum-cast] > pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); The problem is a pointer to enum conversion :) I think the right way would be to do would be below soc_type = (enum foo)of_device_get_match_data(dev); or soc_type = (unsigned long) of_device_get_match_data(dev); which I think should be fine in gcc, but possibly give you above warning in clang.. but i thought that was fixed in clang https://reviews.llvm.org/D75758 Thanks -- ~Vinod