From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761AbcD2V23 (ORCPT ); Fri, 29 Apr 2016 17:28:29 -0400 Received: from mail-bn1on0141.outbound.protection.outlook.com ([157.56.110.141]:36897 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751339AbcD2V21 convert rfc822-to-8bit (ORCPT ); Fri, 29 Apr 2016 17:28:27 -0400 From: "Dall, Betty" To: "Rafael J. Wysocki" CC: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , "Linux Kernel Mailing List" Subject: Re: [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Thread-Topic: [PATCH v2 3/3] ACPI/device_sysfs: Clean up checkpatch errors Thread-Index: AQHRolv5JDdIz4zAX06iNJhbyBGUew== Date: Fri, 29 Apr 2016 21:13:28 +0000 Message-ID: References: <1461957681-6163-1-git-send-email-betty.dall@hpe.com> <1461957681-6163-4-git-send-email-betty.dall@hpe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.65.252.15] x-ms-office365-filtering-correlation-id: 69df788c-9239-4806-43d0-08d370731bf0 x-microsoft-exchange-diagnostics: 1;AT5PR84MB0081;5:mOkQwjck1/HkqNtYKbOF6gxkMjwCCdeH04B8KrXX3Up6Qk+zrC6n2kGqaKbtaEli7rKsakt40YFqR/XqC2OQuoCAiE7pFjExjSxht9CuCRm+KR/2XPIA43RRgfnnHqc0JXSp+40r5tQezLu2C59YwQ==;24:TtMnF04MUa2TBX6d7GuTHvOxtI2iWh9+OoTBAc0vH1K5Li56CpQxX5Y0idtMPPKL3uA9Ce+F5QISkuf7H2lPFM0ucfI4Rp0jl7FkW5MC6tg=;7:/t8V6Dta89E8iegU/D5D/uX9LpNeCthZa9lXaXCmDKOpJ5YfAmZJgFR9aYmW2nA7GMyF9x507j/lpRK35gmqIIQ1WUmnoPMHXjbrQVVpNsBoVS+w6gC4Xwb87DO4VFv+C8eX/sl9+pLSsyk16TA2sAvodmJK134+/P4Vvrz/hentICQfnGKfvQmiJnNsOgUS x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0081; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:AT5PR84MB0081;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0081; x-forefront-prvs: 0927AA37C7 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(6116002)(122556002)(19580395003)(92566002)(19580405001)(586003)(102836003)(50986999)(3846002)(2900100001)(87936001)(10400500002)(86362001)(1096002)(1220700001)(2906002)(9686002)(3660700001)(106116001)(77096005)(5002640100001)(3280700002)(5003600100002)(76176999)(33656002)(189998001)(5008740100001)(110136002)(81166005)(11100500001)(99286002)(66066001)(54356999);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0081;H:AT5PR84MB0083.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2016 21:13:28.0402 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0081 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/29/2016 02:19 PM, Rafael J. Wysocki wrote: > On Fri, Apr 29, 2016 at 9:21 PM, Betty Dall wrote: >> Cleaning up five existing checkpatch errors in device_sysfs.c since the >> file is being changed. >> >> Signed-off-by: Betty Dall >> --- >> drivers/acpi/device_sysfs.c | 22 ++++++++++++++-------- >> 1 file changed, 14 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c >> index e556a3e..5aaebec 100644 >> --- a/drivers/acpi/device_sysfs.c >> +++ b/drivers/acpi/device_sysfs.c >> @@ -35,7 +35,7 @@ static ssize_t acpi_object_path(acpi_handle handle, char *buf) >> if (result) >> return result; >> >> - result = sprintf(buf, "%s\n", (char*)path.pointer); >> + result = sprintf(buf, "%s\n", (char *)path.pointer); > > OK > >> kfree(path.pointer); >> return result; >> } >> @@ -81,6 +81,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = { >> static void acpi_data_node_release(struct kobject *kobj) >> { >> struct acpi_data_node *dn = to_data_node(kobj); >> + > > Maybe. Checkpatch wants a blank line after declarations. >> complete(&dn->kobj_done); >> } >> >> @@ -106,7 +107,8 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj, >> ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, >> kobj, "%s", dn->name); >> if (ret) >> - acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); >> + acpi_handle_err(dn->handle, >> + "Failed to expose (%d)\n", ret); > > No. checkpatch is wrong here. Ok - that was just an 80 char warning. >> else >> acpi_expose_nondev_subnodes(&dn->kobj, &dn->data); >> } >> @@ -333,7 +335,9 @@ int acpi_device_modalias(struct device *dev, char *buf, int size) >> EXPORT_SYMBOL_GPL(acpi_device_modalias); >> >> static ssize_t >> -acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { >> +acpi_device_modalias_show(struct device *dev, >> + struct device_attribute *attr, char *buf) > > The brace should go to the new line, but it's better if the header > takes one line only. Ok - I was trying to clean up the 80 character warning, but I see your point. >> +{ >> return __acpi_device_modalias(to_acpi_device(dev), buf, 1024); >> } >> static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); >> @@ -397,7 +401,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, >> static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); >> >> static ssize_t >> -acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) { >> +acpi_device_hid_show(struct device *dev, >> + struct device_attribute *attr, char *buf) > > Ditto. OK. >> +{ >> struct acpi_device *acpi_dev = to_acpi_device(dev); >> >> return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev)); >> @@ -568,10 +574,10 @@ int acpi_device_setup_files(struct acpi_device *dev) >> goto end; >> } >> >> - /* >> - * If device has _EJ0, 'eject' file is created that is used to trigger >> - * hot-removal function from userland. >> - */ >> + /* >> + * If device has _EJ0, 'eject' file is created that is used to trigger >> + * hot-removal function from userland. >> + */ > > What's the problem with this comment? They were spaces - not a tab. > >> if (acpi_has_method(dev->handle, "_EJ0")) { >> result = device_create_file(&dev->dev, &dev_attr_eject); >> if (result) >> --