Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp971960ybl; Fri, 24 Jan 2020 12:59:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxo6Lm7pFDSjibAe5KLnl+i2aHAAYY5LfDVFIqOMLZCNXp51JQ2YuS2arvL0UXzuOs0C5wi X-Received: by 2002:a9d:4d81:: with SMTP id u1mr4249656otk.323.1579899547747; Fri, 24 Jan 2020 12:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579899547; cv=none; d=google.com; s=arc-20160816; b=e5HOkmxT3u4vSPQtyDsKyCdRruRwJrkZ63FFkHUr78d9xlwXQgFqnUa3fq8PTS+bBm cDVPWt+z3B8qIhYB4GYiZNkhnSeLb0DIEwGOqpSRCI6nWBBzo5+ffhwRN5E+bthnNUK2 n45vTDjThEJCzRSRLDxYzOERpb5M4imDPMJMIZFunnijN3duKcRalAIY8i5/JNMVMvNy iTlzBoGuHR/nluhcjag1y4OFUOYuC4eubksOxn4lCbx44LjsVmrHuG54nnsuGsel+q5V pW2Rr0DeSK/uTw2jcCMEdYrnW0TVR5dGIjQgyIUj6QjR0tz8OubdsqxWVm9LEAPXDZGg 1REQ== 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=roARSU9b8pR7ckNgf+KRw9jkBNuUEJiQpcfaWObJ9fo=; b=JAI4s7TMQwm+x6ofD6gOW4WpuMQtuQQekkiz1a3EiD752cupRUOVLNcjfkx7VFUx8A I7kUcq+Xw4fuWBTf35JbDBhDJqYfQwCuIaOyzPXAF6cZ6Vn7yV+WYdeMFq9Z4AyjiPKH RG1yadIwrJ6Uw//TULPO+uSjiiT0xR2dtFHf8EvX5xxon3vOuR4YYj3e9B4NyRQp8iYj 1Dxtu/T9AvfkGo7KFzm1mhp2K8aHHWCNavoz1GcZTV0kfiZIsfsKXhYDgqit9Gq2gSHM vlCXbhTwHyQdhlj8tI/pTLDdbIn7Lk1PbkyjdPb4HQrYHnYC3LLKrYFAlkXTJKjVmKAZ VtDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FH87yV97; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h203si366353oif.3.2020.01.24.12.58.55; Fri, 24 Jan 2020 12:59:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FH87yV97; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390821AbgAXRvN (ORCPT + 99 others); Fri, 24 Jan 2020 12:51:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:37690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390609AbgAXRvM (ORCPT ); Fri, 24 Jan 2020 12:51:12 -0500 Received: from localhost (unknown [84.241.198.31]) (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 99C9F2071A; Fri, 24 Jan 2020 17:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579888272; bh=9hbmPEgHXRr8v1nxwUdlwfTPAg3pc8TX2Au28qS0i4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FH87yV97mOBhgZ9nhlA0nI77nM+HmKCJm2gdezoEjwtiTfgad6yje5Dm+Y8ZfS0Yh uiAdMxo9t220kz/g7dT/vZWIUqdwT4tBqoy7e3o2zocmzigWn1lhe3d9NoioWnG2x+ ZR+KaaZ+Y4gAg9mX/WOsFMXYmAsiuT30T/8UpJF4= Date: Fri, 24 Jan 2020 18:47:07 +0100 From: Greg KH To: Jeffrey Hugo Cc: Manivannan Sadhasivam , arnd@arndb.de, smohanad@codeaurora.org, kvalo@codeaurora.org, bjorn.andersson@linaro.org, hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/16] bus: mhi: core: Add support for registering MHI controllers Message-ID: <20200124174707.GB3417153@kroah.com> References: <20200123111836.7414-1-manivannan.sadhasivam@linaro.org> <20200123111836.7414-3-manivannan.sadhasivam@linaro.org> <20200124082939.GA2921617@kroah.com> <42c79181-9d97-3542-c6b0-1e37f9b2ff39@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42c79181-9d97-3542-c6b0-1e37f9b2ff39@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 24, 2020 at 07:24:43AM -0700, Jeffrey Hugo wrote: > > > +/** > > > + * struct mhi_result - Completed buffer information > > > + * @buf_addr: Address of data buffer > > > + * @dir: Channel direction > > > + * @bytes_xfer: # of bytes transferred > > > + * @transaction_status: Status of last transaction > > > + */ > > > +struct mhi_result { > > > + void *buf_addr; > > > > Why void *? > > Because its not possible to resolve this more clearly. The client provides > the buffer and knows what the structure is. The bus does not. Its just an > opaque pointer (hence void *) to the bus, and the client needs to decode it. > This is the struct that is handed to the client to allow them to decode the > activity (either a received buf, or a confirmation that a transmitted buf > has been consumed). Then shouldn't this be a "u8 *" instead as you are saying how many bytes are here? thanks, greg k-h