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

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?

-- 
Zhixu Zhao
https://github.com/zhaozhixu


  parent reply	other threads:[~2020-06-18 14:18 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 [this message]
2020-06-18 14:03   ` Dan Carpenter
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=20200618134422.24278-1-zhixu001@126.com \
    --to=zhixu001@126.com \
    --cc=benchan@chromium.org \
    --cc=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 \
    /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).