linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Wang, Haiyue" <haiyue.wang@linux.intel.com>
To: minyard@acm.org, openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH ipmi/kcs_bmc v1] ipmi: kcs_bmc: optimize the data buffers allocation
Date: Wed, 4 Apr 2018 08:34:05 +0800	[thread overview]
Message-ID: <3b51eb4a-1fe5-097d-9b62-e0e46b7f9d62@linux.intel.com> (raw)
In-Reply-To: <143afdd1-bdde-fb9b-d21c-8dc8eeb24e6c@acm.org>

Just a small piece of cake, not so urgent. I just try to understand

the code commitment process, such as time etc. :)

Thanks!

BR,
Haiyue

On 2018-04-04 02:45, Corey Minyard wrote:
> On 04/03/2018 01:00 AM, Wang, Haiyue wrote:
>> Hi Corey,
>>
>> The 4.17 merge window is opened now, this patch is not yet in 
>> linux-next tree,
>>
>> so it will be merged into 4.18 ?
>>
>
> Yeah, this came in kind of late, and I had some other critical
> things I was having to focus on, so I've been kind of out of the loop.
>
> If it's urgent, I can work on getting it into 4.17 later, but I'd rather
> wait on 4.18.
>
> -corey
>
>> Thanks & Regards,
>>
>> Haiyue
>>
>> On 2018-03-15 20:20, Haiyue Wang wrote:
>>> Allocate a continuous memory block for the three KCS data buffers with
>>> related index assignment.
>>>
>>> Signed-off-by: Haiyue Wang <haiyue.wang@linux.intel.com>
>>> ---
>>>   drivers/char/ipmi/kcs_bmc.c | 10 ++++++----
>>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/char/ipmi/kcs_bmc.c b/drivers/char/ipmi/kcs_bmc.c
>>> index fbfc05e..dc19c0d 100644
>>> --- a/drivers/char/ipmi/kcs_bmc.c
>>> +++ b/drivers/char/ipmi/kcs_bmc.c
>>> @@ -435,6 +435,7 @@ static const struct file_operations kcs_bmc_fops 
>>> = {
>>>   struct kcs_bmc *kcs_bmc_alloc(struct device *dev, int sizeof_priv, 
>>> u32 channel)
>>>   {
>>>       struct kcs_bmc *kcs_bmc;
>>> +    void *buf;
>>>         kcs_bmc = devm_kzalloc(dev, sizeof(*kcs_bmc) + sizeof_priv, 
>>> GFP_KERNEL);
>>>       if (!kcs_bmc)
>>> @@ -448,11 +449,12 @@ struct kcs_bmc *kcs_bmc_alloc(struct device 
>>> *dev, int sizeof_priv, u32 channel)
>>>       mutex_init(&kcs_bmc->mutex);
>>>       init_waitqueue_head(&kcs_bmc->queue);
>>>   -    kcs_bmc->data_in = devm_kmalloc(dev, KCS_MSG_BUFSIZ, 
>>> GFP_KERNEL);
>>> -    kcs_bmc->data_out = devm_kmalloc(dev, KCS_MSG_BUFSIZ, GFP_KERNEL);
>>> -    kcs_bmc->kbuffer = devm_kmalloc(dev, KCS_MSG_BUFSIZ, GFP_KERNEL);
>>> -    if (!kcs_bmc->data_in || !kcs_bmc->data_out || !kcs_bmc->kbuffer)
>>> +    buf = devm_kmalloc_array(dev, 3, KCS_MSG_BUFSIZ, GFP_KERNEL);
>>> +    if (!buf)
>>>           return NULL;
>>> +    kcs_bmc->data_in  = buf;
>>> +    kcs_bmc->data_out = buf + KCS_MSG_BUFSIZ;
>>> +    kcs_bmc->kbuffer  = buf + KCS_MSG_BUFSIZ * 2;
>>>         kcs_bmc->miscdev.minor = MISC_DYNAMIC_MINOR;
>>>       kcs_bmc->miscdev.name = dev_name(dev);
>>
>

  reply	other threads:[~2018-04-04  0:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 12:20 [PATCH ipmi/kcs_bmc v1] ipmi: kcs_bmc: optimize the data buffers allocation Haiyue Wang
2018-04-03  6:00 ` Wang, Haiyue
2018-04-03 18:45   ` Corey Minyard
2018-04-04  0:34     ` Wang, Haiyue [this message]
2018-04-06 21:47 ` Corey Minyard
2018-04-07  2:37   ` Wang, Haiyue
2018-04-07  7:54     ` Wang, Haiyue
2018-04-13 13:50       ` Corey Minyard
2018-04-13 14:10         ` Wang, Haiyue

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=3b51eb4a-1fe5-097d-9b62-e0e46b7f9d62@linux.intel.com \
    --to=haiyue.wang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).