Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533254 > unrolled thread

[PATCH] usb:hub: readibility and consistency in coding style

Started byAtul Raj <atul.r@samsung.com>
First post2016-11-30 13:00 +0100
Last post2016-11-30 15:00 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] usb:hub: readibility and consistency in coding style Atul Raj <atul.r@samsung.com> - 2016-11-30 13:00 +0100
    Re: [PATCH] usb:hub: readibility and consistency in coding style "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2016-11-30 13:10 +0100
    RE: Re: [PATCH] usb:hub: readibility and consistency in coding style Atul Raj <atul.r@samsung.com> - 2016-11-30 13:40 +0100
      Re: Re: [PATCH] usb:hub: readibility and consistency in coding style "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2016-11-30 15:00 +0100

#1533254 — [PATCH] usb:hub: readibility and consistency in coding style

FromAtul Raj <atul.r@samsung.com>
Date2016-11-30 13:00 +0100
Subject[PATCH] usb:hub: readibility and consistency in coding style
Message-ID<sJbIm-5Bx-17@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

It is suggested to keep braces if there is a comment in if case as
comment also takes a line.
---
 drivers/usb/core/hub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 82059f26..f43e6302 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5334,10 +5334,10 @@ static int descriptors_changed(struct usb_device *udev,
        }

        buf = kmalloc(len, GFP_NOIO);
-       if (!buf)
+       if (!buf) {
                /* assume the worst */
                return 1;
-
+       }
        for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
                old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
                length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
--
2.10.2.windows.1

[toc] | [next] | [standalone]


#1533261

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2016-11-30 13:10 +0100
Message-ID<sJbS2-5UT-17@gated-at.bofh.it>
In reply to#1533254
On Wed, Nov 30, 2016 at 11:51:39AM +0000, Atul Raj wrote:
> It is suggested to keep braces if there is a comment in if case as
> comment also takes a line.
> ---
>  drivers/usb/core/hub.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Ok, this is getting to be a joke.

Take a few days off, relax, then try to send a patch that works to
yourself first, and run it through scripts/checkpatch.pl to verify that
it really is correct.  Hint, this one isn't at all.

Then, maybe you should start doing some work on drivers/staging/ first,
which is where new developers should start out to work out all of these
issues so you don't bother the other developers who are working on
adding new features and fixing bugs.

Also, why are you including a ton of people who have nothing to do with
usb patches on this one?

good luck,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1533267

FromAtul Raj <atul.r@samsung.com>
Date2016-11-30 13:40 +0100
Message-ID<sJcl3-67K-9@gated-at.bofh.it>
In reply to#1533254

[Multipart message — attachments visible in raw view] — view raw

Hi Greg,

I am so happy to get a mail from you and I am really sorry Greg that I disappointed you.
I will take utmost care in future.
I will send you correct patch in sometime.
for your ques
"Also, why are you including a ton of people who have nothing to do with
usb patches on this one?"

I got the name of people from get_maintainer.pl
from now I will include only you.
is it ok??


one more thing in another mail you replied to me as
On Wed, Nov 30, 2016 at 11:40:28AM +0000, Atul Raj wrote:
>  changes in v2
>         - added braces as suggested.

Why is this here?

> 
>  drivers/usb/core/hub.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

do you disagree with viresh comment of braces???

Thanks for your words.


Your Fan
Atul Raj


>
 > On Wed, Nov 30, 2016 at 11:51:39AM +0000, Atul Raj wrote:
 > > It is suggested to keep braces if there is a comment in if case as
 > > comment also takes a line.
 > > ---
 > >  drivers/usb/core/hub.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
 >
 > Ok, this is getting to be a joke.
 >
 > Take a few days off, relax, then try to send a patch that works to
 > yourself first, and run it through scripts/checkpatch.pl to verify that
 > it really is correct.  Hint, this one isn't at all.
 >
 > Then, maybe you should start doing some work on drivers/staging/ first,
 > which is where new developers should start out to work out all of these
 > issues so you don't bother the other developers who are working on
 > adding new features and fixing bugs.
 >
 > Also, why are you including a ton of people who have nothing to do with
 > usb patches on this one?
 >
 > good luck,
 >
 > greg k-h
 

 
 

[toc] | [prev] | [next] | [standalone]


#1533304

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2016-11-30 15:00 +0100
Message-ID<sJdAt-6My-1@gated-at.bofh.it>
In reply to#1533267
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Wed, Nov 30, 2016 at 12:35:21PM +0000, Atul Raj wrote:
> Hi Greg,
> 
> I am so happy to get a mail from you and I am really sorry Greg that I disappointed you.
> I will take utmost care in future.
> I will send you correct patch in sometime.
> for your ques
> "Also, why are you including a ton of people who have nothing to do with
> usb patches on this one?"
> 
> I got the name of people from get_maintainer.pl

When using get_maintainer.pl on this patch it does not include the
dri-devel list, so I don't think you used it correctly.

> from now I will include only you.
> is it ok??

No, do it correctly.

> one more thing in another mail you replied to me as
> On Wed, Nov 30, 2016 at 11:40:28AM +0000, Atul Raj wrote:
> >  changes in v2
> >         - added braces as suggested.
> 
> Why is this here?
> 
> > 
> >  drivers/usb/core/hub.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> do you disagree with viresh comment of braces???

I disagree that this is a valid changelog comment, please read
Documentation/SubmittingPatches for the correct way to do this.

Again, if you don't have experience doing this, please work in the
drivers/staging/ directory first, not in the "core" kernel.

thanks,

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web