[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200618140327.GS4151@kadam>
Date: Thu, 18 Jun 2020 17:03:27 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Zhixu Zhao <zhixu001@....com>
Cc: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Richard Yeh <rcy@...gle.com>,
Rob Springer <rspringer@...gle.com>,
Joe Perches <joe@...ches.com>,
Todd Poynor <toddpoynor@...gle.com>
Subject: Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in
gasket_core.c
On Thu, Jun 18, 2020 at 09:44:22PM +0800, Zhixu Zhao wrote:
> At 2020-06-18 03:10:02, "Dan Carpenter" <dan.carpenter@...cle.com> wrote:
> >It would be better to do this in the declaration block so you can change
> >the earlier two uses in this function:
> >
> >+ struct gasket_bar_data *data = &gasket_dev->bar_data[bar_num];
> >- ulong desc_bytes = driver_desc->bar_descriptions[bar_num].size;
> >+ ulong desc_bytes = data->size;
> >
> >...
> >
> >- if (driver_desc->bar_descriptions[bar_num].type != PCI_BAR) {
> >+ if (data->type != PCI_BAR) {
>
> `struct gasket_bar_data *data` and `driver_desc->bar_descriptions[bar_num]`
> are not the same thing as I see it. Besides, `struct gasket_bar_data`
> doesn't have a `size` field (it does have a `length_bytes` field).
> So... did I miss anything?
>
Ah wow... I'm so sorry. You're right. Sorry for the noise.
Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
regards,
dan carpenter
Powered by blists - more mailing lists