mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Atul Raj" <atul.r@samsung.com>
To: "Viresh Kumar" <viresh.kumar@linaro.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"mathias.nyman@linux.intel.com" <mathias.nyman@linux.intel.com>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
	"oneukum@suse.com" <oneukum@suse.com>,
	"hansy@nvidia.com" <hansy@nvidia.com>,
	"alcooperx@gmail.com" <alcooperx@gmail.com>
Cc: "atulraj.nith@gmail.com" <atulraj.nith@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Pankaj Singh" <pankaj.s4@samsung.com>
Subject: [PATCH] usb:hub: readibility and consistency in coding style
Date: Wed, 30 Nov 2016 11:51:39 +0000	[thread overview]
Message-ID: <20161130115139epcms5p3fb0520cf6cabcf69e470be63463a46d1@epcms5p3> (raw)
In-Reply-To: <20161130063238epcms5p5b82d469df3d562bdfb1b6ca53ea1e226@epcms5p5>

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

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

  parent reply	other threads:[~2016-11-30 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161130063238epcms5p5b82d469df3d562bdfb1b6ca53ea1e226@epcms5p5>
     [not found] ` <20161130063238epcms5p5b82d469df3d562bdfb1b6ca53ea1e226@epcms5p5>
2016-11-30 11:40   ` RE: [PATCH v2] usb: core:hub.c: do not print error log on -enomem Atul Raj
2016-11-30 11:55     ` gregkh
2016-11-30 11:51   ` Atul Raj [this message]
2016-11-30 12:02     ` [PATCH] usb:hub: readibility and consistency in coding style gregkh
2016-11-30 12:35     ` Atul Raj
2016-11-30 13:49       ` gregkh

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=20161130115139epcms5p3fb0520cf6cabcf69e470be63463a46d1@epcms5p3 \
    --to=atul.r@samsung.com \
    --cc=alcooperx@gmail.com \
    --cc=atulraj.nith@gmail.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansy@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=oneukum@suse.com \
    --cc=pankaj.s4@samsung.com \
    --cc=stern@rowland.harvard.edu \
    --cc=viresh.kumar@linaro.org \
    /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

all inboxes | Powered by JetHome®