All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Zhixu Zhao <zhixu001@126.com>
Cc: devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Richard Yeh <rcy@google.com>,
	Rob Springer <rspringer@google.com>,
	Joe Perches <joe@perches.com>,
	Todd Poynor <toddpoynor@google.com>
Subject: Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c
Date: Thu, 18 Jun 2020 17:03:27 +0300	[thread overview]
Message-ID: <20200618140327.GS4151@kadam> (raw)
In-Reply-To: <20200618134422.24278-1-zhixu001@126.com>

On Thu, Jun 18, 2020 at 09:44:22PM +0800, Zhixu Zhao wrote:
> At 2020-06-18 03:10:02, "Dan Carpenter" <dan.carpenter@oracle.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@oracle.com>

regards,
dan carpenter

  reply	other threads:[~2020-06-18 14:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 16:11 [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c Zhixu Zhao
2020-06-17 19:10 ` Dan Carpenter
2020-07-15 10:38   ` Zhao
2020-06-18 13:44 ` Zhixu Zhao
2020-06-18 14:03   ` Dan Carpenter [this message]
2020-07-14 23:44 ` Zhixu Zhao
2020-07-15  7:17   ` Greg KH
2020-07-15  7:24     ` Joe Perches
2020-07-15  7:57       ` Greg KH
2020-07-15  8:37         ` Dan Carpenter
2020-07-15  9:04           ` Joe Perches
2020-07-15 10:45             ` Zhao
2020-07-15 11:06               ` Dan Carpenter
2020-07-15 13:33 ` [PATCH v3] " Zhixu Zhao

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=20200618140327.GS4151@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcy@google.com \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    --cc=zhixu001@126.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.