* [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line
@ 2014-09-08 12:32 Morgan Phillips
2014-09-08 13:48 ` Sudip Mukherjee
2014-09-08 14:55 ` [PATCH v2] " Morgan Phillips
0 siblings, 2 replies; 5+ messages in thread
From: Morgan Phillips @ 2014-09-08 12:32 UTC (permalink / raw)
To: brijohn
Cc: hdegoede, m.chehab, linux-media, linux-kernel, wolfram,
Morgan Phillips
Signed-off-by: Morgan Phillips <winter2718@gmail.com>
---
drivers/media/usb/gspca/sn9c20x.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index 41a9a89..95467f0 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev;
int i;
u8 value;
- u8 i2c_init[9] =
- {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03};
+ u8 i2c_init[9] = {
+ 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
+ };
for (i = 0; i < ARRAY_SIZE(bridge_init); i++) {
value = bridge_init[i][1];
@@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
{
struct sd *sd = (struct sd *) gspca_dev;
int avg_lum, is_jpeg;
- static const u8 frame_header[] =
- {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
+ static const u8 frame_header[] = {
+ 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96
+ };
is_jpeg = (sd->fmt & 0x03) == 0;
if (len >= 64 && memcmp(data, frame_header, 6) == 0) {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line 2014-09-08 12:32 [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line Morgan Phillips @ 2014-09-08 13:48 ` Sudip Mukherjee [not found] ` <CAGztXF1YXAMJhCrO_AmH115DX7NFfNmXzVefUBnVH2H9vkxNYg@mail.gmail.com> 2014-09-08 14:55 ` [PATCH v2] " Morgan Phillips 1 sibling, 1 reply; 5+ messages in thread From: Sudip Mukherjee @ 2014-09-08 13:48 UTC (permalink / raw) To: Morgan Phillips Cc: brijohn, hdegoede, m.chehab, linux-media, linux-kernel, wolfram On Mon, Sep 08, 2014 at 07:32:22AM -0500, Morgan Phillips wrote: > Signed-off-by: Morgan Phillips <winter2718@gmail.com> no commit message ? thanks sudip > --- > drivers/media/usb/gspca/sn9c20x.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c > index 41a9a89..95467f0 100644 > --- a/drivers/media/usb/gspca/sn9c20x.c > +++ b/drivers/media/usb/gspca/sn9c20x.c > @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev) > struct sd *sd = (struct sd *) gspca_dev; > int i; > u8 value; > - u8 i2c_init[9] = > - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; > + u8 i2c_init[9] = { > + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03 > + }; > > for (i = 0; i < ARRAY_SIZE(bridge_init); i++) { > value = bridge_init[i][1]; > @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, > { > struct sd *sd = (struct sd *) gspca_dev; > int avg_lum, is_jpeg; > - static const u8 frame_header[] = > - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96}; > + static const u8 frame_header[] = { > + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96 > + }; > > is_jpeg = (sd->fmt & 0x03) == 0; > if (len >= 64 && memcmp(data, frame_header, 6) == 0) { > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAGztXF1YXAMJhCrO_AmH115DX7NFfNmXzVefUBnVH2H9vkxNYg@mail.gmail.com>]
* Re: [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line [not found] ` <CAGztXF1YXAMJhCrO_AmH115DX7NFfNmXzVefUBnVH2H9vkxNYg@mail.gmail.com> @ 2014-09-08 14:22 ` Sudip Mukherjee 0 siblings, 0 replies; 5+ messages in thread From: Sudip Mukherjee @ 2014-09-08 14:22 UTC (permalink / raw) To: Morgan Reece Cc: Brian Johnson, Hans de Goede, m.chehab, linux-media, linux-kernel, wolfram On Mon, Sep 08, 2014 at 08:51:18AM -0500, Morgan Reece wrote: > Hi Sudip, > > I searched through the logs for examples of messages where people had just > fixed checkpatch errors. I found lots like this, so went the format, ex: > > commit 588a12d789e1a9b8193465c09f32024c0d43a849 > Author: Filipe Gonçalves <filipe@codinghighway.com> > Date: Fri Sep 5 05:09:46 2014 +0100 > > staging/lustre: Fixed checkpatch warning: Use #include <linux/statfs.h> > instead of <asm/statfs.h> > this is the commit log. whatever you write above your Signed-off-by goes as the commit log. ideally commit log should have the full details of the change you have done , and the reason behind the change. Incidentally , if you see all mails of today , you will find one of my patch as rejected because my commit log was not explanatory. thanks sudip > Signed-off-by: Filipe Gonçalves <filipe@codinghighway.com> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > On Mon, Sep 8, 2014 at 8:48 AM, Sudip Mukherjee <sudipm.mukherjee@gmail.com> > wrote: > > > On Mon, Sep 08, 2014 at 07:32:22AM -0500, Morgan Phillips wrote: > > > Signed-off-by: Morgan Phillips <winter2718@gmail.com> > > > > no commit message ? > > > > thanks > > sudip > > > > > --- > > > drivers/media/usb/gspca/sn9c20x.c | 10 ++++++---- > > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > > > diff --git a/drivers/media/usb/gspca/sn9c20x.c > > b/drivers/media/usb/gspca/sn9c20x.c > > > index 41a9a89..95467f0 100644 > > > --- a/drivers/media/usb/gspca/sn9c20x.c > > > +++ b/drivers/media/usb/gspca/sn9c20x.c > > > @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev) > > > struct sd *sd = (struct sd *) gspca_dev; > > > int i; > > > u8 value; > > > - u8 i2c_init[9] = > > > - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > > 0x03}; > > > + u8 i2c_init[9] = { > > > + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > > 0x03 > > > + }; > > > > > > for (i = 0; i < ARRAY_SIZE(bridge_init); i++) { > > > value = bridge_init[i][1]; > > > @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev > > *gspca_dev, > > > { > > > struct sd *sd = (struct sd *) gspca_dev; > > > int avg_lum, is_jpeg; > > > - static const u8 frame_header[] = > > > - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96}; > > > + static const u8 frame_header[] = { > > > + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96 > > > + }; > > > > > > is_jpeg = (sd->fmt & 0x03) == 0; > > > if (len >= 64 && memcmp(data, frame_header, 6) == 0) { > > > -- > > > 1.9.1 > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" > > in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > Please read the FAQ at http://www.tux.org/lkml/ > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line 2014-09-08 12:32 [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line Morgan Phillips 2014-09-08 13:48 ` Sudip Mukherjee @ 2014-09-08 14:55 ` Morgan Phillips 2014-09-08 15:18 ` Sudip Mukherjee 1 sibling, 1 reply; 5+ messages in thread From: Morgan Phillips @ 2014-09-08 14:55 UTC (permalink / raw) To: brijohn; +Cc: hdegoede, m.chehab, linux-media, linux-kernel, Morgan Phillips Change array initialization format to fix style error. from: u8 foo[] = {1, 2, 3}; to: u8 foo[] = { 1, 2, 3 }; Signed-off-by: Morgan Phillips <winter2718@gmail.com> --- Changes since v2: * adds a more verbose commit message drivers/media/usb/gspca/sn9c20x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 41a9a89..95467f0 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *) gspca_dev; int i; u8 value; - u8 i2c_init[9] = - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; + u8 i2c_init[9] = { + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03 + }; for (i = 0; i < ARRAY_SIZE(bridge_init); i++) { value = bridge_init[i][1]; @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, { struct sd *sd = (struct sd *) gspca_dev; int avg_lum, is_jpeg; - static const u8 frame_header[] = - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96}; + static const u8 frame_header[] = { + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96 + }; is_jpeg = (sd->fmt & 0x03) == 0; if (len >= 64 && memcmp(data, frame_header, 6) == 0) { -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line 2014-09-08 14:55 ` [PATCH v2] " Morgan Phillips @ 2014-09-08 15:18 ` Sudip Mukherjee 0 siblings, 0 replies; 5+ messages in thread From: Sudip Mukherjee @ 2014-09-08 15:18 UTC (permalink / raw) To: Morgan Phillips; +Cc: brijohn, hdegoede, m.chehab, linux-media, linux-kernel On Mon, Sep 08, 2014 at 09:55:58AM -0500, Morgan Phillips wrote: > Change array initialization format to fix style error. > from: > u8 foo[] = > {1, 2, 3}; > to: checkpatch is giving a warning here , but looks like a false positive. thanks sudip > u8 foo[] = { > 1, 2, 3 > }; > > Signed-off-by: Morgan Phillips <winter2718@gmail.com> > --- > Changes since v2: > * adds a more verbose commit message > > drivers/media/usb/gspca/sn9c20x.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c > index 41a9a89..95467f0 100644 > --- a/drivers/media/usb/gspca/sn9c20x.c > +++ b/drivers/media/usb/gspca/sn9c20x.c > @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev) > struct sd *sd = (struct sd *) gspca_dev; > int i; > u8 value; > - u8 i2c_init[9] = > - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; > + u8 i2c_init[9] = { > + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03 > + }; > > for (i = 0; i < ARRAY_SIZE(bridge_init); i++) { > value = bridge_init[i][1]; > @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, > { > struct sd *sd = (struct sd *) gspca_dev; > int avg_lum, is_jpeg; > - static const u8 frame_header[] = > - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96}; > + static const u8 frame_header[] = { > + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96 > + }; > > is_jpeg = (sd->fmt & 0x03) == 0; > if (len >= 64 && memcmp(data, frame_header, 6) == 0) { > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-08 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-08 12:32 [PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line Morgan Phillips
2014-09-08 13:48 ` Sudip Mukherjee
[not found] ` <CAGztXF1YXAMJhCrO_AmH115DX7NFfNmXzVefUBnVH2H9vkxNYg@mail.gmail.com>
2014-09-08 14:22 ` Sudip Mukherjee
2014-09-08 14:55 ` [PATCH v2] " Morgan Phillips
2014-09-08 15:18 ` Sudip Mukherjee
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).