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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74766C33CAD for ; Mon, 13 Jan 2020 11:36:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46BFC2084D for ; Mon, 13 Jan 2020 11:36:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YmbPmmJ1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46BFC2084D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pn/A0QoNOi4rkF6m3cRbXBz7LMb+l/2rHEYO8jcNAZE=; b=YmbPmmJ1rykyJX Pd5ZJi2bOONeNaKGUuoDKS+AkJC95qaKfA9BmQqoMeLz/2DrzLoBrWlS/CxdLjLBHv90GyixOYu5f Z8MccBv//u9YH9ehJaGcWzRcnX4fwYqHZ7Q2LuUZKJGwg2lWwM8WERyql0yQIpgzMNyVz60PgsFhv xk8Cixonxo04iHsW0c9EkktDkNflmERvEl+uKhuSxJNE8EFCz5gPY/+dVcL5RDAIxqgS7R4GBAihp 6bll+txxVR6VMv4qNDoA874fXyGCfTmUtAiA5JVDg0uzrZ5Wl6TQhwXW+SpLxupji6nFpYaGExxfs LMAI5mFfrMpahmPMrhzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqy1V-0005CY-SC; Mon, 13 Jan 2020 11:36:45 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqy1S-0005Ax-3F for linux-arm-kernel@lists.infradead.org; Mon, 13 Jan 2020 11:36:43 +0000 Received: from mail-qt1-f174.google.com ([209.85.160.174]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1N1Ofr-1jpIcR3Hul-012rU1 for ; Mon, 13 Jan 2020 12:36:36 +0100 Received: by mail-qt1-f174.google.com with SMTP id w47so8777009qtk.4 for ; Mon, 13 Jan 2020 03:36:35 -0800 (PST) X-Gm-Message-State: APjAAAUFIIwaTY33Q81Cygo/6A1RfJzhDwhM3m2K/lRCme4J47gGzm9M bMpUQeOtISVuWFm0yvEgGrPX+o9b6XPMX+dy6Ks= X-Google-Smtp-Source: APXvYqy4d5Y865StavZXLM6RVQnqg1jOobhsOc+SKK7Ta7Xbx6KIewCh7Nm3l9DGq6gktI9KWSqh+RU8fwyhDyVDD2g= X-Received: by 2002:ac8:47d3:: with SMTP id d19mr13346118qtr.142.1578915394643; Mon, 13 Jan 2020 03:36:34 -0800 (PST) MIME-Version: 1.0 References: <3f5567ec928e20963d729350e6d674c4acb0c7a0.1578648530.git.viresh.kumar@linaro.org> <20200113064156.lt3xxpzygattz3he@vireshk-i7> In-Reply-To: <20200113064156.lt3xxpzygattz3he@vireshk-i7> From: Arnd Bergmann Date: Mon, 13 Jan 2020 12:36:18 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2] firmware: arm_scmi: Make scmi core independent of transport type To: Viresh Kumar X-Provags-ID: V03:K1:Tgpv592JoZa8KhPoyQkYiNX7qWpb0xaKeYxPPNgtODeseWH/wyR I0cNVHdOVKlBWg8WaJ3zoasimam92gwDJri4Ntmz6sp/JrDV4Nsibw8WIkXWwTqbIgkLHZy pW3mDPzEiNClJr/CCMmzvt/F1K46EoH5j/llS/ICanF0zr2+JHZ831LhApipBz1QYxMk7Qz U6K3a+myFl36ppeZ4mU9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:3WIuvaXmAZg=:9LMRtcntZH21S/HhzOIYSk +/KQK3pFQT3LR2sZM6D/Geb5EG9R6A2kEDiawKKbcWWEgoPVW76Ga9Gnim5kT+IWzrNXh3vJu rarv8brx5Y7q0Aiw0bPexTdh9mcOn8qPGWfYKVL/VBjMJfnmzmdhR1DSItSRY+ug4RG4ioagi ks3XRF/PQ+ifTZHfYGDFzct0Fv8phLXYQh28oFicDO/enoXsSWWHb0hEVbs2qIVwp4U4mt+Zg MsOHlcd/itNx85CeLbsQ5RxmH9mZYZhaJpAT0g/oi2SGPrC4dAcdZzLe7jf2DE4Thj3lDPYk5 j+Q/QvH0tfBHKdJ+YViTuBhwasw1f798sPOxCOhRUx9RGYihy/yf5btepCYqDCyRXN8PUAMUR HlMge04zbiWs27Qu7oNHvzQ2vkhsAFKGW96QDkj6goSE5A3Zsty2J/lh9NamR9usxaG1sNpv3 Bap7IquguV3Dtwq7fKLA0qB8sJj8pjXFsCuKf7lmPqr2glp8nv2s1Rle7wl5eyBquzWOERYwy 8bBjlQf7YzN8+lOkwWmcsi8DjtQdJDWBtJEn/FJXNHPbM9uH9G/4eil7i8tC8ykU2muuRz5Bi Za5wK2sYxLrh7VQsXDYwFxfmAGaCtNSMTUB4fMOLZsFwME+fTFLq3m38HG43JqAVQXkf7fp1g 3lNwmyeZYeR2nIsrneJIYdK1f5s83yNqBL5SqwQRLpnXv5/BszhhT7sKQAWB1j+VG13vYp4bZ 5ZKL0uh7N84FjQk81lJXInkd3oSVD94pqq2y/BPz5V3D1cdYs6DbJW8kSmkEw+dM6EwURjPhF iAPT8wxFJg4mh1UHJRZb+mQh2cxWwLG2Ueek24dEgEU+qzs/5N4YJoMBczGCpcI39IfcxGcXo vLA9KzKZsLodx2BGAXdA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200113_033642_425330_919A5834 X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peng.fan@nxp.com, Jassi Brar , "linux-kernel@vger.kernel.org" , cristian.marussi@arm.com, Sudeep Holla , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 13, 2020 at 7:42 AM Viresh Kumar wrote: > On 10-01-20, 12:15, Arnd Bergmann wrote: > > On Fri, Jan 10, 2020 at 10:43 AM Viresh Kumar wrote: > > > > Simply dropping the __iomem isn't much better, now you get other > > type mismatches. > > Right. So what exactly do you suggest I should do now? Drop __iomem > from the structure's payload field but keep all local variables and > function arguments with __iomem ? > > > +struct scmi_chan_info { > > > + void *payload; > > > + struct device *dev; > > > + struct scmi_handle *handle; > > > + void *transport_info; > > > +}; > > > > Maybe you can wrap the scmi_chan_info inside of another > > structure that contains the payload pointer, and use container_of > > to convert between them? > > We don't need to convert between the two of them, isn't it ? Are you > referring some other field here ? > > It's not obvious which parts of the structure should be shared and > > which are transport specific. > > All transport specific information is kept in the transport specific > structure which is saved here in the transport_info field. Is there > something else that isn't clear ? To answer all three, what I meant is that the payload pointer appears to be transport specific and should not be part of the common structure if there is generic way to access it. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel