Messages in this thread | | | From | Loic Poulain <> | Date | Thu, 24 Jun 2021 17:39:58 +0200 | Subject | Re: [PATCH 4/8] bus: mhi: Add inbound buffers allocation flag |
| |
Hi Greg,
On Thu, 24 Jun 2021 at 15:51, Greg KH <gregkh@linuxfoundation.org> wrote: > > On Mon, Jun 21, 2021 at 09:46:12PM +0530, Manivannan Sadhasivam wrote: > > From: Loic Poulain <loic.poulain@linaro.org> > > > > 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. > > > > Keep auto_queue flag for now, but should be removed at some point. > > > > Signed-off-by: Loic Poulain <loic.poulain@linaro.org> > > Tested-by: Bhaumik Bhatt <bbhatt@codeaurora.org> > > Reviewed-by: Bhaumik Bhatt <bbhatt@codeaurora.org> > > Reviewed-by: Hemant Kumar <hemantk@codeaurora.org> > > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > Acked-by: Jakub Kicinski <kuba@kernel.org> > > Link: https://lore.kernel.org/r/1621603519-16773-1-git-send-email-loic.poulain@linaro.org > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> [...] > > +/** > > + * enum mhi_chan_flags - MHI channel flags > > + * @MHI_CH_INBOUND_ALLOC_BUFS: Automatically allocate and queue inbound buffers > > + */ > > +enum mhi_chan_flags { > > + MHI_CH_INBOUND_ALLOC_BUFS = BIT(0), > > Why is an enumerated type a bitfield? > > Please just use integers for enumerated types.
This 'trick' for listing flags is used in other places like drm, mac80211, etc...: grep -r "BIT(0)," ./include/
I don't understand why it would not be right? should we simply use a list of defines for this?
Regards, Loic
| |