Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2612717pxb; Sun, 17 Oct 2021 20:30:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8BrfXxchezABWAvMKdOFL87ObdL+2j2FAclRXY2NV/VsO487VfSBRYtiDTfhCkyRm8ou8 X-Received: by 2002:a17:903:4095:b0:13f:aa05:6ea1 with SMTP id z21-20020a170903409500b0013faa056ea1mr9380446plc.36.1634527812930; Sun, 17 Oct 2021 20:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527812; cv=none; d=google.com; s=arc-20160816; b=mYO3tMYcOMErMDvigEst0ab6RhzKBD7Caq0+e9+kJcxbm1E4NaH6rctHCYefnzT2xb UtEyJui8rBQs7J2hgat1viiYXQZfkV1CwlgApn9ipllg6xAewMrjgEmUStCJ5JKpn9At qpuIa4Ysb6fzKWqFWzqth1iBd8ZvpI0x5TT1ca7WA3ZJ3v0rP2ZvpiHu/e5i37bMRgZo s5UneUfSPOTG5em6HPMXfaUSyw78pSIxn6tg/J2Y174N+/If1YxoqN8sos/12zAZU8pZ YuRuHWkcMNnxmrSRHlp3w2mi1ZqgkqVQqQflo/ogmbV1LUpRo41jhyHQLbP3Sv+11yMv NlgQ== 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=M5PbbWzbrqcvtFGfsrtKagzZdMcDOPljpOauNm+RAZE=; b=hiBFSNsuwmZeBRP3mhOjHbxV+f1895m2KglTeHXEYKv4mdO6BDIod44W6JhinqnBd8 C8/pgeSetQdKFVVDfUDveYgqO+1+wRSdsMbaBc6GwdsFLcDJ8ZA/uYbkqscipDx9uInR hZX4hWH5w00qyQgC6tscRpuZnJX15I2gflLBbGhXyboy/qN5LMxeQn0lptD/HwLAhOUS T9usCFFd+CgJNh+s+gSF1UU5F1JoqoNO6FQqcxaGoD3u3zuZl3wGX49C7M3xvPgnuMCN 3b5GXinjRptMj9f5J2vfi9MgQhAMWhcd14ZeoUriOIdkfxBlAoG2CO7Ux8bvQ1zd7W78 xv+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eKtHFpQ+; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si24244715plg.171.2021.10.17.20.30.01; Sun, 17 Oct 2021 20:30:12 -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=@linuxfoundation.org header.s=korg header.b=eKtHFpQ+; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243795AbhJPHmG (ORCPT + 98 others); Sat, 16 Oct 2021 03:42:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:48356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243775AbhJPHmF (ORCPT ); Sat, 16 Oct 2021 03:42:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD39D6109E; Sat, 16 Oct 2021 07:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634369998; bh=qcbHl1fGWWDXojY7bO3fExrjfefb6KGpVys1Le3UPE4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eKtHFpQ+BVSHYBWiFbGuJIU2bhm34CCXN6dNVBAOIokayRt6n/7DYEXV5y+yYV+zN tKmm0TxnFVNnWJvmB8mHQhe0yCQNwfwmcXCamWyBp5rWV2oLmIyL7h1LsCgoL3qHrL mFOumcJalT1KMxABt2Gf4+8C7qZurjMPGc0/wydM= Date: Sat, 16 Oct 2021 09:39:53 +0200 From: Greg KH To: Manivannan Sadhasivam Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, loic.poulain@linaro.org, wangqing@vivo.com, mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Subject: Re: [PATCH 2/3] bus: mhi: Add inbound buffers allocation flag Message-ID: References: <20211016065734.28802-1-manivannan.sadhasivam@linaro.org> <20211016065734.28802-3-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211016065734.28802-3-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 16, 2021 at 12:27:33PM +0530, Manivannan Sadhasivam wrote: > From: Loic Poulain > > Currently, the MHI controller driver defines which channels should > have their inbound buffers allocated and queued. But ideally, this is > something that should be decided by the MHI device driver instead, > which actually deals with that buffers. > > Add a flag parameter to mhi_prepare_for_transfer allowing to specify > if buffers have to be allocated and queued by the MHI stack. This is a horrible api. Now one has to go and look up why "0" was added to a function as a parameter. If you don't want to allocate the buffer, then make a function of that name and call that. As you only have one "flag", don't try to make something generic here that is obviously not generic at all. You all can do better than this. thanks, greg k-h