Skip to content

Commit b95150a

Browse files
jhovoldgregkh
authored andcommitted
Revert "staging: greybus: Fix capitalization and punctuation inconsistencies"
This reverts commit 30db846. The offending commit tried to make the error messages of a few Greybus drivers in staging more consistent by capitalising messages, but the rest of the Greybus code do not follow this style so the change ended up introducing an inconsistency instead. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5e6bf74 commit b95150a

File tree

5 files changed

+48
-48
lines changed

5 files changed

+48
-48
lines changed

drivers/staging/greybus/arche-platform.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int apb_cold_boot(struct device *dev, void *data)
9595

9696
ret = apb_ctrl_coldboot(dev);
9797
if (ret)
98-
dev_warn(dev, "Failed to coldboot\n");
98+
dev_warn(dev, "failed to coldboot\n");
9999

100100
/*Child nodes are independent, so do not exit coldboot operation */
101101
return 0;
@@ -107,7 +107,7 @@ static int apb_poweroff(struct device *dev, void *data)
107107

108108
/* Enable HUB3613 into HUB mode. */
109109
if (usb3613_hub_mode_ctrl(false))
110-
dev_warn(dev, "Failed to control hub device\n");
110+
dev_warn(dev, "failed to control hub device\n");
111111

112112
return 0;
113113
}
@@ -142,7 +142,7 @@ static irqreturn_t arche_platform_wd_irq_thread(int irq, void *devid)
142142

143143
/* Enable HUB3613 into HUB mode. */
144144
if (usb3613_hub_mode_ctrl(true))
145-
dev_warn(arche_pdata->dev, "Failed to control hub device\n");
145+
dev_warn(arche_pdata->dev, "failed to control hub device\n");
146146

147147
spin_lock_irqsave(&arche_pdata->wake_lock, flags);
148148
arche_platform_set_wake_detect_state(arche_pdata, WD_STATE_IDLE);
@@ -228,12 +228,12 @@ arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata)
228228

229229
ret = clk_prepare_enable(arche_pdata->svc_ref_clk);
230230
if (ret) {
231-
dev_err(arche_pdata->dev, "Failed to enable svc_ref_clk: %d\n",
231+
dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n",
232232
ret);
233233
return ret;
234234
}
235235

236-
/* Bring SVC out of reset */
236+
/* bring SVC out of reset */
237237
svc_reset_onoff(arche_pdata->svc_reset, !arche_pdata->is_reset_act_hi);
238238

239239
arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_ACTIVE);
@@ -262,7 +262,7 @@ arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata)
262262

263263
ret = clk_prepare_enable(arche_pdata->svc_ref_clk);
264264
if (ret) {
265-
dev_err(arche_pdata->dev, "Failed to enable svc_ref_clk: %d\n",
265+
dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n",
266266
ret);
267267
return ret;
268268
}
@@ -340,7 +340,7 @@ static ssize_t state_store(struct device *dev,
340340
if (arche_pdata->state == ARCHE_PLATFORM_STATE_STANDBY)
341341
goto exit;
342342

343-
dev_warn(arche_pdata->dev, "Standby state not supported\n");
343+
dev_warn(arche_pdata->dev, "standby state not supported\n");
344344
} else if (sysfs_streq(buf, "fw_flashing")) {
345345
if (arche_pdata->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
346346
goto exit;
@@ -358,7 +358,7 @@ static ssize_t state_store(struct device *dev,
358358
if (ret)
359359
goto exit;
360360
} else {
361-
dev_err(arche_pdata->dev, "Unknown state\n");
361+
dev_err(arche_pdata->dev, "unknown state\n");
362362
ret = -EINVAL;
363363
}
364364

@@ -434,7 +434,7 @@ static int arche_platform_probe(struct platform_device *pdev)
434434
if (!arche_pdata)
435435
return -ENOMEM;
436436

437-
/* Setup svc reset gpio */
437+
/* setup svc reset gpio */
438438
arche_pdata->is_reset_act_hi = of_property_read_bool(np,
439439
"svc,reset-active-high");
440440
if (arche_pdata->is_reset_act_hi)
@@ -445,7 +445,7 @@ static int arche_platform_probe(struct platform_device *pdev)
445445
arche_pdata->svc_reset = devm_gpiod_get(dev, "svc,reset", flags);
446446
if (IS_ERR(arche_pdata->svc_reset)) {
447447
ret = PTR_ERR(arche_pdata->svc_reset);
448-
dev_err(dev, "Failed to request svc-reset GPIO: %d\n", ret);
448+
dev_err(dev, "failed to request svc-reset GPIO: %d\n", ret);
449449
return ret;
450450
}
451451
arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_OFF);
@@ -454,24 +454,24 @@ static int arche_platform_probe(struct platform_device *pdev)
454454
GPIOD_OUT_LOW);
455455
if (IS_ERR(arche_pdata->svc_sysboot)) {
456456
ret = PTR_ERR(arche_pdata->svc_sysboot);
457-
dev_err(dev, "Failed to request sysboot0 GPIO: %d\n", ret);
457+
dev_err(dev, "failed to request sysboot0 GPIO: %d\n", ret);
458458
return ret;
459459
}
460460

461-
/* Setup the clock request gpio first */
461+
/* setup the clock request gpio first */
462462
arche_pdata->svc_refclk_req = devm_gpiod_get(dev, "svc,refclk-req",
463463
GPIOD_IN);
464464
if (IS_ERR(arche_pdata->svc_refclk_req)) {
465465
ret = PTR_ERR(arche_pdata->svc_refclk_req);
466-
dev_err(dev, "Failed to request svc-clk-req GPIO: %d\n", ret);
466+
dev_err(dev, "failed to request svc-clk-req GPIO: %d\n", ret);
467467
return ret;
468468
}
469469

470470
/* setup refclk2 to follow the pin */
471471
arche_pdata->svc_ref_clk = devm_clk_get(dev, "svc_ref_clk");
472472
if (IS_ERR(arche_pdata->svc_ref_clk)) {
473473
ret = PTR_ERR(arche_pdata->svc_ref_clk);
474-
dev_err(dev, "Failed to get svc_ref_clk: %d\n", ret);
474+
dev_err(dev, "failed to get svc_ref_clk: %d\n", ret);
475475
return ret;
476476
}
477477

@@ -504,28 +504,28 @@ static int arche_platform_probe(struct platform_device *pdev)
504504
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
505505
dev_name(dev), arche_pdata);
506506
if (ret) {
507-
dev_err(dev, "Failed to request wake detect IRQ %d\n", ret);
507+
dev_err(dev, "failed to request wake detect IRQ %d\n", ret);
508508
return ret;
509509
}
510510
disable_irq(arche_pdata->wake_detect_irq);
511511

512512
ret = device_create_file(dev, &dev_attr_state);
513513
if (ret) {
514-
dev_err(dev, "Failed to create state file in sysfs\n");
514+
dev_err(dev, "failed to create state file in sysfs\n");
515515
return ret;
516516
}
517517

518518
ret = of_platform_populate(np, NULL, NULL, dev);
519519
if (ret) {
520-
dev_err(dev, "Failed to populate child nodes %d\n", ret);
520+
dev_err(dev, "failed to populate child nodes %d\n", ret);
521521
goto err_device_remove;
522522
}
523523

524524
arche_pdata->pm_notifier.notifier_call = arche_platform_pm_notifier;
525525
ret = register_pm_notifier(&arche_pdata->pm_notifier);
526526

527527
if (ret) {
528-
dev_err(dev, "Failed to register pm notifier %d\n", ret);
528+
dev_err(dev, "failed to register pm notifier %d\n", ret);
529529
goto err_device_remove;
530530
}
531531

@@ -570,7 +570,7 @@ static void arche_platform_remove(struct platform_device *pdev)
570570
arche_platform_poweroff_seq(arche_pdata);
571571

572572
if (usb3613_hub_mode_ctrl(false))
573-
dev_warn(arche_pdata->dev, "Failed to control hub device\n");
573+
dev_warn(arche_pdata->dev, "failed to control hub device\n");
574574
}
575575

576576
static __maybe_unused int arche_platform_suspend(struct device *dev)

drivers/staging/greybus/authentication.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static int cap_get_endpoint_uid(struct gb_cap *cap, u8 *euid)
9393
ret = gb_operation_sync(connection, GB_CAP_TYPE_GET_ENDPOINT_UID, NULL,
9494
0, &response, sizeof(response));
9595
if (ret) {
96-
dev_err(cap->parent, "Failed to get endpoint uid (%d)\n", ret);
96+
dev_err(cap->parent, "failed to get endpoint uid (%d)\n", ret);
9797
return ret;
9898
}
9999

@@ -126,7 +126,7 @@ static int cap_get_ims_certificate(struct gb_cap *cap, u32 class, u32 id,
126126

127127
ret = gb_operation_request_send_sync(op);
128128
if (ret) {
129-
dev_err(cap->parent, "Failed to get certificate (%d)\n", ret);
129+
dev_err(cap->parent, "failed to get certificate (%d)\n", ret);
130130
goto done;
131131
}
132132

@@ -165,7 +165,7 @@ static int cap_authenticate(struct gb_cap *cap, u32 auth_type, u8 *uid,
165165

166166
ret = gb_operation_request_send_sync(op);
167167
if (ret) {
168-
dev_err(cap->parent, "Failed to authenticate (%d)\n", ret);
168+
dev_err(cap->parent, "failed to authenticate (%d)\n", ret);
169169
goto done;
170170
}
171171

drivers/staging/greybus/bootrom.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static int find_firmware(struct gb_bootrom *bootrom, u8 stage)
179179
&connection->bundle->dev);
180180
if (rc) {
181181
dev_err(&connection->bundle->dev,
182-
"Failed to find %s firmware (%d)\n", firmware_name, rc);
182+
"failed to find %s firmware (%d)\n", firmware_name, rc);
183183
}
184184

185185
return rc;
@@ -274,7 +274,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
274274
size = le32_to_cpu(firmware_request->size);
275275

276276
if (offset >= fw->size || size > fw->size - offset) {
277-
dev_warn(dev, "Bad firmware request (offs = %u, size = %u)\n",
277+
dev_warn(dev, "bad firmware request (offs = %u, size = %u)\n",
278278
offset, size);
279279
ret = -EINVAL;
280280
goto unlock;
@@ -290,7 +290,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
290290
firmware_response = op->response->payload;
291291
memcpy(firmware_response, fw->data + offset, size);
292292

293-
dev_dbg(dev, "Responding with firmware (offs = %u, size = %u)\n",
293+
dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n",
294294
offset, size);
295295

296296
unlock:
@@ -340,7 +340,7 @@ static int gb_bootrom_ready_to_boot(struct gb_operation *op)
340340
/*
341341
* XXX Should we return error for insecure firmware?
342342
*/
343-
dev_dbg(dev, "Ready to boot: 0x%x, 0\n", status);
343+
dev_dbg(dev, "ready to boot: 0x%x, 0\n", status);
344344

345345
queue_work:
346346
/*
@@ -367,7 +367,7 @@ static int gb_bootrom_request_handler(struct gb_operation *op)
367367
return gb_bootrom_ready_to_boot(op);
368368
default:
369369
dev_err(&op->connection->bundle->dev,
370-
"Unsupported request: %u\n", type);
370+
"unsupported request: %u\n", type);
371371
return -EINVAL;
372372
}
373373
}
@@ -388,14 +388,14 @@ static int gb_bootrom_get_version(struct gb_bootrom *bootrom)
388388
sizeof(response));
389389
if (ret) {
390390
dev_err(&bundle->dev,
391-
"Failed to get protocol version: %d\n",
391+
"failed to get protocol version: %d\n",
392392
ret);
393393
return ret;
394394
}
395395

396396
if (response.major > request.major) {
397397
dev_err(&bundle->dev,
398-
"Unsupported major protocol version (%u > %u)\n",
398+
"unsupported major protocol version (%u > %u)\n",
399399
response.major, request.major);
400400
return -ENOTSUPP;
401401
}
@@ -467,7 +467,7 @@ static int gb_bootrom_probe(struct gb_bundle *bundle,
467467
NULL, 0);
468468
if (ret) {
469469
dev_err(&connection->bundle->dev,
470-
"Failed to send AP READY: %d\n", ret);
470+
"failed to send AP READY: %d\n", ret);
471471
goto err_cancel_timeout;
472472
}
473473

drivers/staging/greybus/light.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static ssize_t fade_##__dir##_store(struct device *dev, \
193193
\
194194
ret = kstrtou8(buf, 0, &fade); \
195195
if (ret < 0) { \
196-
dev_err(dev, "Could not parse fade value %d\n", ret); \
196+
dev_err(dev, "could not parse fade value %d\n", ret); \
197197
goto unlock; \
198198
} \
199199
if (channel->fade_##__dir == fade) \
@@ -238,7 +238,7 @@ static ssize_t color_store(struct device *dev, struct device_attribute *attr,
238238
}
239239
ret = kstrtou32(buf, 0, &color);
240240
if (ret < 0) {
241-
dev_err(dev, "Could not parse color value %d\n", ret);
241+
dev_err(dev, "could not parse color value %d\n", ret);
242242
goto unlock;
243243
}
244244

@@ -376,12 +376,12 @@ static int __gb_lights_led_brightness_set(struct gb_channel *channel)
376376
else
377377
channel->active = false;
378378

379-
/* We need to keep module alive when turning to active state */
379+
/* we need to keep module alive when turning to active state */
380380
if (!old_active && channel->active)
381381
goto out_unlock;
382382

383383
/*
384-
* On the other hand if going to inactive we still hold a reference and
384+
* on the other hand if going to inactive we still hold a reference and
385385
* need to put it, so we could go to suspend.
386386
*/
387387
if (old_active && !channel->active)
@@ -466,12 +466,12 @@ static int gb_blink_set(struct led_classdev *cdev, unsigned long *delay_on,
466466
else
467467
channel->active = false;
468468

469-
/* We need to keep module alive when turning to active state. */
469+
/* we need to keep module alive when turning to active state */
470470
if (!old_active && channel->active)
471471
goto out_unlock;
472472

473473
/*
474-
* On the other hand if going to inactive we still hold a reference and
474+
* on the other hand if going to inactive we still hold a reference and
475475
* need to put it, so we could go to suspend.
476476
*/
477477
if (old_active && !channel->active)
@@ -532,7 +532,7 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
532532

533533
channel_flash = get_channel_from_mode(light, GB_CHANNEL_MODE_FLASH);
534534
if (!channel_flash) {
535-
dev_err(dev, "Failed to get flash channel from mode\n");
535+
dev_err(dev, "failed to get flash channel from mode\n");
536536
return -EINVAL;
537537
}
538538

@@ -576,7 +576,7 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
576576
{
577577
struct gb_connection *connection = get_conn_from_light(light);
578578

579-
dev_err(&connection->bundle->dev, "No support for v4l2 subdevices\n");
579+
dev_err(&connection->bundle->dev, "no support for v4l2 subdevices\n");
580580
return 0;
581581
}
582582

@@ -728,14 +728,14 @@ static int __gb_lights_channel_torch_attach(struct gb_channel *channel,
728728
{
729729
char *name;
730730

731-
/* We can only attach torch to a flash channel */
731+
/* we can only attach torch to a flash channel */
732732
if (!(channel->mode & GB_CHANNEL_MODE_FLASH))
733733
return 0;
734734

735735
/* Move torch brightness to the destination */
736736
channel->led->max_brightness = channel_torch->led->max_brightness;
737737

738-
/* Append mode name to flash name */
738+
/* append mode name to flash name */
739739
name = kasprintf(GFP_KERNEL, "%s_%s", channel->led->name,
740740
channel_torch->mode_name);
741741
if (!name)
@@ -777,7 +777,7 @@ static int __gb_lights_flash_led_register(struct gb_channel *channel)
777777

778778
/*
779779
* If light have torch mode channel, this channel will be the led
780-
* classdev of the registered above flash classdev.
780+
* classdev of the registered above flash classdev
781781
*/
782782
channel_torch = get_channel_from_mode(channel->light,
783783
GB_CHANNEL_MODE_TORCH);
@@ -838,7 +838,7 @@ static int gb_lights_channel_flash_config(struct gb_channel *channel)
838838
*/
839839
channel->led->max_brightness = (fset->max - fset->min) / fset->step;
840840

841-
/* Only the flash mode have the timeout constraints settings. */
841+
/* Only the flash mode have the timeout constraints settings */
842842
if (channel->mode & GB_CHANNEL_MODE_FLASH) {
843843
fset = &channel->timeout_us;
844844
fset->min = le32_to_cpu(conf.timeout_min_us);
@@ -853,7 +853,7 @@ static int gb_lights_channel_flash_config(struct gb_channel *channel)
853853
{
854854
struct gb_connection *connection = get_conn_from_channel(channel);
855855

856-
dev_err(&connection->bundle->dev, "No support for flash devices\n");
856+
dev_err(&connection->bundle->dev, "no support for flash devices\n");
857857
return 0;
858858
}
859859

0 commit comments

Comments
 (0)