From: Darren Hart <dvhart@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Mario Limonciello" <Mario.Limonciello@dell.com>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Platform Driver" <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: dell-laptop: Guard SMBIOS calls with a mutex
Date: Wed, 31 Jan 2018 10:54:48 -0800 [thread overview]
Message-ID: <20180131185448.GE8676@fury> (raw)
In-Reply-To: <CAHp75Vd4N2DNpnFgE-k85Kz7_sZ=SH=-L8sagLkFx=WMj8xW=Q@mail.gmail.com>
On Tue, Jan 30, 2018 at 05:39:58PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 30, 2018 at 5:35 PM, <Mario.Limonciello@dell.com> wrote:
>
> >> > dell_set_arguments(0x2, 0, 0, 0);
> >> > ret = dell_send_request(CLASS_INFO, SELECT_RFKILL);
> >>
> >> Hi! I'm looking at this code, and do we need shared global buffer with
> >> mutex protection at all? Is not buffer allocated on stack enough?
> >
> > Oh you mean rather than create buffer mutex to just remove global
> > buffer and allocate in each function? That seems like a workable
> > approach to me too.
> >
> > I'm fine with either way.
> >
> > Andy or Darren, what's your preference in this area?
>
> It reminds me USB stuff where buffer for transfer is allocated on heap
> before performing communication.
> So, it looks similar to some extent and I have no objection on that
> kind of approach.
Late to the party it seems, but FWIW:
I don't see a significant advantage of a global buffer. It doesn't *need* to be
global, and the locking just adds complexity. The heap solution seems much
preferable to me.
--
Darren Hart
VMware Open Source Technology Center
prev parent reply other threads:[~2018-01-31 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 23:15 [PATCH] platform/x86: dell-laptop: Guard SMBIOS calls with a mutex Mario Limonciello
2018-01-30 11:02 ` Pali Rohár
2018-01-30 15:35 ` Mario.Limonciello
2018-01-30 15:39 ` Andy Shevchenko
2018-01-31 18:54 ` Darren Hart [this message]
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=20180131185448.GE8676@fury \
--to=dvhart@infradead.org \
--cc=Mario.Limonciello@dell.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.kernel.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