[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009001411.yi37d25uyqkzaccw@Rk>
Date: Fri, 9 Oct 2020 08:14:11 +0800
From: Coiby Xu <coiby.xu@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: devel@...verdev.osuosl.org,
"supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER"
<GR-Linux-NIC-Dev@...vell.com>,
Manish Chopra <manishc@...vell.com>,
"open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" <netdev@...r.kernel.org>,
Shung-Hsi Yu <shung-hsi.yu@...e.com>,
open list <linux-kernel@...r.kernel.org>,
Benjamin Poirier <benjamin.poirier@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v1 2/6] staging: qlge: coredump via devlink health
reporter
On Thu, Oct 08, 2020 at 04:39:40PM +0300, Dan Carpenter wrote:
>On Thu, Oct 08, 2020 at 07:58:04PM +0800, Coiby Xu wrote:
>> -static int
>> -qlge_reporter_coredump(struct devlink_health_reporter *reporter,
>> - struct devlink_fmsg *fmsg, void *priv_ctx,
>> - struct netlink_ext_ack *extack)
>> +static int fill_seg_(struct devlink_fmsg *fmsg,
>> + struct mpi_coredump_segment_header *seg_header,
>> + u32 *reg_data)
>> {
>> - return 0;
>> + int i;
>> + int header_size = sizeof(struct mpi_coredump_segment_header);
>
>Please use the sizeof() directly in the code. Don't introduce
>indirection if you can help it.
>
>> + int regs_num = (seg_header->seg_size - header_size) / sizeof(u32);
>> + int err;
>> +
>
Thank you for the suggestion!
>regards,
>dan carpenter
--
Best regards,
Coiby
Powered by blists - more mailing lists