From: Greg KH <gregkh@linuxfoundation.org>
To: Ekansh Gupta <quic_ekangupt@quicinc.com>
Cc: srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org,
quic_bkumar@quicinc.com, linux-kernel@vger.kernel.org,
quic_chennak@quicinc.com, dri-devel@lists.freedesktop.org,
arnd@arndb.de
Subject: Re: [PATCH v1] misc: fastrpc: Add support for multiple PD from one process
Date: Thu, 4 Jul 2024 08:40:00 +0200 [thread overview]
Message-ID: <2024070427-squash-antiviral-8c81@gregkh> (raw)
In-Reply-To: <c4a184cb-46d5-49cc-ad42-3d5d7828f06b@quicinc.com>
On Thu, Jul 04, 2024 at 11:47:22AM +0530, Ekansh Gupta wrote:
>
>
> On 7/3/2024 4:09 PM, Greg KH wrote:
> > On Wed, Jul 03, 2024 at 12:22:00PM +0530, Ekansh Gupta wrote:
> >> @@ -268,6 +272,7 @@ struct fastrpc_channel_ctx {
> >> struct fastrpc_session_ctx session[FASTRPC_MAX_SESSIONS];
> >> spinlock_t lock;
> >> struct idr ctx_idr;
> >> + struct ida dsp_pgid_ida;
> > You have an idr and an ida? Why two different types for the same
> > driver?
> Using ida for this because for this I just need to allocate and manage unique IDs
> without any associated data. So this looks more space efficient that idr.
> Should I keep it uniform for a driver?
Be consistant, it will make your life easier over the next 10+ years
that you have to maintain it.
> >> struct list_head users;
> >> struct kref refcount;
> >> /* Flag if dsp attributes are cached */
> >> @@ -299,6 +304,7 @@ struct fastrpc_user {
> >> struct fastrpc_buf *init_mem;
> >>
> >> int tgid;
> >> + int dsp_pgid;
> > Are you sure this fits in an int?
> I think this should be fine for IDs in rage of 1000-1064.
Where is that range specified anywhere? I don't see it documented here
for us to know that :(
And if that's all you care about, then use a u16.
thanks,
greg k-h
next prev parent reply other threads:[~2024-07-04 6:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 6:52 Ekansh Gupta
2024-07-03 10:39 ` Greg KH
2024-07-04 6:17 ` Ekansh Gupta
2024-07-04 6:20 ` Ekansh Gupta
2024-07-04 6:40 ` Greg KH [this message]
2024-07-03 10:42 ` Dmitry Baryshkov
2024-07-04 6:27 ` Ekansh Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024070427-squash-antiviral-8c81@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bkumar@quicinc.com \
--cc=quic_chennak@quicinc.com \
--cc=quic_ekangupt@quicinc.com \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®