From: Tim Gardner <tim.gardner@canonical.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Armin Schindler <mac@melware.de>,
Karsten Keil <isdn@linux-pingi.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4.4-rc8 6/7] isdn: eicon: diddfunc: Silence frame size warning
Date: Fri, 8 Jan 2016 15:05:10 -0700 [thread overview]
Message-ID: <56903296.3090701@canonical.com> (raw)
In-Reply-To: <5690163B.7050808@cogentembedded.com>
On 01/08/2016 01:04 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 01/08/2016 03:32 PM, tim.gardner@canonical.com wrote:
>
>> From: Tim Gardner <tim.gardner@canonical.com>
>>
>> drivers/isdn/hardware/eicon/diddfunc.c: In function 'connect_didd':
>> drivers/isdn/hardware/eicon/diddfunc.c:77:1: warning: the frame size
>> of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>>
>> gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)
>>
>> Cc: Armin Schindler <mac@melware.de>
>> Cc: Karsten Keil <isdn@linux-pingi.de>
>> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
>> ---
>> drivers/isdn/hardware/eicon/diddfunc.c | 17 +++++++++++++----
>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/isdn/hardware/eicon/diddfunc.c
>> b/drivers/isdn/hardware/eicon/diddfunc.c
>> index b0b23ed..a9feb4f 100644
>> --- a/drivers/isdn/hardware/eicon/diddfunc.c
>> +++ b/drivers/isdn/hardware/eicon/diddfunc.c
>> @@ -52,9 +52,13 @@ static int __init connect_didd(void)
>> int x = 0;
>> int dadapter = 0;
>> IDI_SYNC_REQ req;
>> - DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
>> + DESCRIPTOR *DIDD_Table;
>>
>> - DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
>> + DIDD_Table = kcalloc(MAX_DESCRIPTORS, sizeof(*DIDD_Table),
>> GFP_KERNEL);
>
> Previously the array didn't seem to be zeroed, perhaps it's better to
> use kmalloc_array()?
>
> [...]
>
> MHR, Sergei
>
The last patch in the series (isdn: eicon: consolidate descriptor
allocation) consolidates the allocation code into one function. I used
kmalloc() there because I noticed that diva_didd_read_adapter_array()
does zero the buffer before using it.
Do you think that is sufficient ?
rtg
--
Tim Gardner tim.gardner@canonical.com
next prev parent reply other threads:[~2016-01-08 22:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 12:32 [PATCH v4.4-rc8 0/7] isdn: eicon: Silence frame size warnings tim.gardner
2016-01-08 12:32 ` [PATCH v4.4-rc8 1/7] isdn: eicon: message: Silence frame size warning tim.gardner
2016-01-08 12:32 ` [PATCH v4.4-rc8 2/7] isdn: eicon: capifunc: " tim.gardner
2016-01-08 12:32 ` [PATCH v4.4-rc8 3/7] isdn: eicon: idifunc: " tim.gardner
2016-01-08 12:32 ` [PATCH v4.4-rc8 4/7] isdn: eicon: mntfunc: " tim.gardner
2016-01-08 12:32 ` [PATCH v4.4-rc8 5/7] isdn: eicon: divasfunc: " tim.gardner
2016-01-08 20:05 ` Sergei Shtylyov
2016-01-08 12:32 ` [PATCH v4.4-rc8 6/7] isdn: eicon: diddfunc: " tim.gardner
2016-01-08 20:04 ` Sergei Shtylyov
2016-01-08 22:05 ` Tim Gardner [this message]
2016-01-08 22:20 ` Sergei Shtylyov
2016-01-08 12:32 ` [PATCH v4.4-rc8 7/7] isdn: eicon: consolidate descriptor allocation tim.gardner
2016-01-11 3:53 ` [PATCH v4.4-rc8 0/7] isdn: eicon: Silence frame size warnings David Miller
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=56903296.3090701@canonical.com \
--to=tim.gardner@canonical.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mac@melware.de \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.