From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chandra Annamaneni <chandra627@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
gneukum1@gmail.com, michael.scheiderer@fau.de,
fabian.krueger@fau.de, linux-kernel@vger.kernel.org,
simon@nikanor.nu
Subject: Re: [PATCH] KPC2000: kpc2000_spi.c: Fix alignment and style problems.
Date: Wed, 9 Oct 2019 10:57:00 +0300 [thread overview]
Message-ID: <20191009075700.GK25098@kadam> (raw)
In-Reply-To: <1570593039-19059-1-git-send-email-chandra627@gmail.com>
On Tue, Oct 08, 2019 at 08:50:39PM -0700, Chandra Annamaneni wrote:
> diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
> index 3be33c4..a20f2d7 100644
> --- a/drivers/staging/kpc2000/kpc2000_spi.c
> +++ b/drivers/staging/kpc2000/kpc2000_spi.c
> @@ -30,19 +30,27 @@
> #include "kpc.h"
>
> static struct mtd_partition p2kr0_spi0_parts[] = {
> - { .name = "SLOT_0", .size = 7798784, .offset = 0, },
> - { .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
> - { .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
> - { .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
> - { .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK},
> + { .name = "SLOT_0", .size = 7798784, .offset = 0,},
> + { .name = "SLOT_1", .size = 7798784, .offset =
> + MTDPART_OFS_NXTBLK},
This looks worse than the original code... :( You could maybe make it
a little bit tighter if you used space characters.
{ .name = "SLOT_0", .size = 7798784, .offset = 0, },
{ .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
{ .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
{ .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK},
{ .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK},
It still goes over 80 characters, but that's okay. Or we could just
leave the original code as is.
[ snip ]
> static struct flash_platform_data p2kr0_spi1_pdata = {
> .name = "SPI1",
> .nr_parts = ARRAY_SIZE(p2kr0_spi1_parts),
> @@ -165,7 +174,7 @@ kp_spi_read_reg(struct kp_spi_controller_state *cs, int idx)
> u64 val;
>
> addr += idx;
> - if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0))
> + if (idx == KP_SPI_REG_CONFIG && cs->conf_cache >= 0)
I like these changes but Greg doesn't. So don't bother with this one.
> return cs->conf_cache;
>
> val = readq(addr);
The rest of the changes are fine. Split them into multiple patches and
resend.
regards,
dan carpenter
prev parent reply other threads:[~2019-10-09 7:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 3:50 [PATCH] KPC2000: kpc2000_spi.c: Fix alignment and style problems Chandra Annamaneni
2019-10-09 7:43 ` Greg KH
2019-10-09 7:57 ` Dan Carpenter [this message]
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=20191009075700.GK25098@kadam \
--to=dan.carpenter@oracle.com \
--cc=chandra627@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=fabian.krueger@fau.de \
--cc=gneukum1@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.scheiderer@fau.de \
--cc=simon@nikanor.nu \
/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.