From: Antonio Ospite <ao2@ao2.it>
To: Jamie Lentin <jm@lentin.co.uk>
Cc: Jiri Kosina <jkosina@suse.cz>,
Hans de Goede <hdegoede@redhat.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] HID: lenovo: Style fixes
Date: Fri, 25 Jul 2014 15:33:24 +0200 [thread overview]
Message-ID: <20140725153324.3463287fa928e6d495801b46@ao2.it> (raw)
In-Reply-To: <1406154648-14000-4-git-send-email-jm@lentin.co.uk>
On Wed, 23 Jul 2014 23:30:47 +0100
Jamie Lentin <jm@lentin.co.uk> wrote:
> Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Jamie, please send a v6 of this patch alone[*], where you print the
return value as Dmitry suggested . You do print it in a similar
statement of the subsequent patch, so this makes even more sense.
FWIW I'd already take the patch as it is and consider it a readability
improvement, but I now realize that the suggestion of not calling
functions in conditions is not mentioned anywhere in
Documentation/CodingStyle, so maybe I would just be over-zealous.
Ciao,
Antonio
[*] You can use the --in-relpy-to option of git-send-email to make it a
reply to your v5 3/4
> ---
> drivers/hid/hid-lenovo.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
> index a56b9e7..6d55939 100644
> --- a/drivers/hid/hid-lenovo.c
> +++ b/drivers/hid/hid-lenovo.c
> @@ -350,6 +350,7 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
> size_t name_sz = strlen(dev_name(dev)) + 16;
> char *name_mute, *name_micmute;
> int i;
> + int ret;
>
> /*
> * Only register extra settings against subdevice where input_mapping
> @@ -368,10 +369,9 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
> if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2))
> return -ENODEV;
>
> - if (sysfs_create_group(&hdev->dev.kobj,
> - &lenovo_attr_group_tpkbd)) {
> + ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_tpkbd);
> + if (ret)
> hid_warn(hdev, "Could not create sysfs group\n");
> - }
>
> data_pointer = devm_kzalloc(&hdev->dev,
> sizeof(struct lenovo_drvdata_tpkbd),
> --
> 2.0.0
>
--
Antonio Ospite
http://ao2.it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
next prev parent reply other threads:[~2014-07-25 13:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 22:30 [PATCH v5 0/4] HID: lenovo: Add support for Lenovo Compact Keyboard Jamie Lentin
2014-07-23 22:30 ` [PATCH v5 1/4] HID: lenovo: Rename hid-lenovo-tpkbd to hid-lenovo Jamie Lentin
2014-07-25 12:56 ` Antonio Ospite
2014-07-23 22:30 ` [PATCH v5 2/4] HID: lenovo: Prepare support for adding other devices Jamie Lentin
2014-07-25 12:58 ` Antonio Ospite
2014-07-23 22:30 ` [PATCH v5 3/4] HID: lenovo: Style fixes Jamie Lentin
2014-07-23 23:37 ` Dmitry Torokhov
2014-07-25 13:33 ` Antonio Ospite [this message]
2014-07-26 14:42 ` [PATCH v6 3/4] HID: lenovo: Don't call function in condition, show error codes Jamie Lentin
2014-07-28 17:46 ` Dmitry Torokhov
2014-07-23 22:30 ` [PATCH v5 4/4] HID: lenovo: Add support for Compact (BT|USB) keyboard Jamie Lentin
2014-07-25 13:39 ` Antonio Ospite
2014-07-25 14:05 ` [PATCH v5 0/4] HID: lenovo: Add support for Lenovo Compact Keyboard Antonio Ospite
2014-07-26 10:09 ` Jamie Lentin
2014-07-29 9:25 ` Jiri Kosina
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=20140725153324.3463287fa928e6d495801b46@ao2.it \
--to=ao2@ao2.it \
--cc=hdegoede@redhat.com \
--cc=jkosina@suse.cz \
--cc=jm@lentin.co.uk \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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®