Skip to content

Commit

Permalink
Revert "staging: greybus: Fix capitalization and punctuation inconsis…
Browse files Browse the repository at this point in the history
…tencies"

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 <johan@kernel.org>
Link: https://lore.kernel.org/r/20240909124853.9213-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jhovold authored and gregkh committed Sep 11, 2024
1 parent 5e6bf74 commit b95150a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 48 deletions.
38 changes: 19 additions & 19 deletions drivers/staging/greybus/arche-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int apb_cold_boot(struct device *dev, void *data)

ret = apb_ctrl_coldboot(dev);
if (ret)
dev_warn(dev, "Failed to coldboot\n");
dev_warn(dev, "failed to coldboot\n");

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

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

return 0;
}
Expand Down Expand Up @@ -142,7 +142,7 @@ static irqreturn_t arche_platform_wd_irq_thread(int irq, void *devid)

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

spin_lock_irqsave(&arche_pdata->wake_lock, flags);
arche_platform_set_wake_detect_state(arche_pdata, WD_STATE_IDLE);
Expand Down Expand Up @@ -228,12 +228,12 @@ arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata)

ret = clk_prepare_enable(arche_pdata->svc_ref_clk);
if (ret) {
dev_err(arche_pdata->dev, "Failed to enable svc_ref_clk: %d\n",
dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n",
ret);
return ret;
}

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

arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_ACTIVE);
Expand Down Expand Up @@ -262,7 +262,7 @@ arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata)

ret = clk_prepare_enable(arche_pdata->svc_ref_clk);
if (ret) {
dev_err(arche_pdata->dev, "Failed to enable svc_ref_clk: %d\n",
dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n",
ret);
return ret;
}
Expand Down Expand Up @@ -340,7 +340,7 @@ static ssize_t state_store(struct device *dev,
if (arche_pdata->state == ARCHE_PLATFORM_STATE_STANDBY)
goto exit;

dev_warn(arche_pdata->dev, "Standby state not supported\n");
dev_warn(arche_pdata->dev, "standby state not supported\n");
} else if (sysfs_streq(buf, "fw_flashing")) {
if (arche_pdata->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
goto exit;
Expand All @@ -358,7 +358,7 @@ static ssize_t state_store(struct device *dev,
if (ret)
goto exit;
} else {
dev_err(arche_pdata->dev, "Unknown state\n");
dev_err(arche_pdata->dev, "unknown state\n");
ret = -EINVAL;
}

Expand Down Expand Up @@ -434,7 +434,7 @@ static int arche_platform_probe(struct platform_device *pdev)
if (!arche_pdata)
return -ENOMEM;

/* Setup svc reset gpio */
/* setup svc reset gpio */
arche_pdata->is_reset_act_hi = of_property_read_bool(np,
"svc,reset-active-high");
if (arche_pdata->is_reset_act_hi)
Expand All @@ -445,7 +445,7 @@ static int arche_platform_probe(struct platform_device *pdev)
arche_pdata->svc_reset = devm_gpiod_get(dev, "svc,reset", flags);
if (IS_ERR(arche_pdata->svc_reset)) {
ret = PTR_ERR(arche_pdata->svc_reset);
dev_err(dev, "Failed to request svc-reset GPIO: %d\n", ret);
dev_err(dev, "failed to request svc-reset GPIO: %d\n", ret);
return ret;
}
arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_OFF);
Expand All @@ -454,24 +454,24 @@ static int arche_platform_probe(struct platform_device *pdev)
GPIOD_OUT_LOW);
if (IS_ERR(arche_pdata->svc_sysboot)) {
ret = PTR_ERR(arche_pdata->svc_sysboot);
dev_err(dev, "Failed to request sysboot0 GPIO: %d\n", ret);
dev_err(dev, "failed to request sysboot0 GPIO: %d\n", ret);
return ret;
}

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

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

Expand Down Expand Up @@ -504,28 +504,28 @@ static int arche_platform_probe(struct platform_device *pdev)
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
dev_name(dev), arche_pdata);
if (ret) {
dev_err(dev, "Failed to request wake detect IRQ %d\n", ret);
dev_err(dev, "failed to request wake detect IRQ %d\n", ret);
return ret;
}
disable_irq(arche_pdata->wake_detect_irq);

ret = device_create_file(dev, &dev_attr_state);
if (ret) {
dev_err(dev, "Failed to create state file in sysfs\n");
dev_err(dev, "failed to create state file in sysfs\n");
return ret;
}

ret = of_platform_populate(np, NULL, NULL, dev);
if (ret) {
dev_err(dev, "Failed to populate child nodes %d\n", ret);
dev_err(dev, "failed to populate child nodes %d\n", ret);
goto err_device_remove;
}

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

if (ret) {
dev_err(dev, "Failed to register pm notifier %d\n", ret);
dev_err(dev, "failed to register pm notifier %d\n", ret);
goto err_device_remove;
}

Expand Down Expand Up @@ -570,7 +570,7 @@ static void arche_platform_remove(struct platform_device *pdev)
arche_platform_poweroff_seq(arche_pdata);

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

static __maybe_unused int arche_platform_suspend(struct device *dev)
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/greybus/authentication.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int cap_get_endpoint_uid(struct gb_cap *cap, u8 *euid)
ret = gb_operation_sync(connection, GB_CAP_TYPE_GET_ENDPOINT_UID, NULL,
0, &response, sizeof(response));
if (ret) {
dev_err(cap->parent, "Failed to get endpoint uid (%d)\n", ret);
dev_err(cap->parent, "failed to get endpoint uid (%d)\n", ret);
return ret;
}

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

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

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

ret = gb_operation_request_send_sync(op);
if (ret) {
dev_err(cap->parent, "Failed to authenticate (%d)\n", ret);
dev_err(cap->parent, "failed to authenticate (%d)\n", ret);
goto done;
}

Expand Down
16 changes: 8 additions & 8 deletions drivers/staging/greybus/bootrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int find_firmware(struct gb_bootrom *bootrom, u8 stage)
&connection->bundle->dev);
if (rc) {
dev_err(&connection->bundle->dev,
"Failed to find %s firmware (%d)\n", firmware_name, rc);
"failed to find %s firmware (%d)\n", firmware_name, rc);
}

return rc;
Expand Down Expand Up @@ -274,7 +274,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
size = le32_to_cpu(firmware_request->size);

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

dev_dbg(dev, "Responding with firmware (offs = %u, size = %u)\n",
dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n",
offset, size);

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

queue_work:
/*
Expand All @@ -367,7 +367,7 @@ static int gb_bootrom_request_handler(struct gb_operation *op)
return gb_bootrom_ready_to_boot(op);
default:
dev_err(&op->connection->bundle->dev,
"Unsupported request: %u\n", type);
"unsupported request: %u\n", type);
return -EINVAL;
}
}
Expand All @@ -388,14 +388,14 @@ static int gb_bootrom_get_version(struct gb_bootrom *bootrom)
sizeof(response));
if (ret) {
dev_err(&bundle->dev,
"Failed to get protocol version: %d\n",
"failed to get protocol version: %d\n",
ret);
return ret;
}

if (response.major > request.major) {
dev_err(&bundle->dev,
"Unsupported major protocol version (%u > %u)\n",
"unsupported major protocol version (%u > %u)\n",
response.major, request.major);
return -ENOTSUPP;
}
Expand Down Expand Up @@ -467,7 +467,7 @@ static int gb_bootrom_probe(struct gb_bundle *bundle,
NULL, 0);
if (ret) {
dev_err(&connection->bundle->dev,
"Failed to send AP READY: %d\n", ret);
"failed to send AP READY: %d\n", ret);
goto err_cancel_timeout;
}

Expand Down
26 changes: 13 additions & 13 deletions drivers/staging/greybus/light.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static ssize_t fade_##__dir##_store(struct device *dev, \
\
ret = kstrtou8(buf, 0, &fade); \
if (ret < 0) { \
dev_err(dev, "Could not parse fade value %d\n", ret); \
dev_err(dev, "could not parse fade value %d\n", ret); \
goto unlock; \
} \
if (channel->fade_##__dir == fade) \
Expand Down Expand Up @@ -238,7 +238,7 @@ static ssize_t color_store(struct device *dev, struct device_attribute *attr,
}
ret = kstrtou32(buf, 0, &color);
if (ret < 0) {
dev_err(dev, "Could not parse color value %d\n", ret);
dev_err(dev, "could not parse color value %d\n", ret);
goto unlock;
}

Expand Down Expand Up @@ -376,12 +376,12 @@ static int __gb_lights_led_brightness_set(struct gb_channel *channel)
else
channel->active = false;

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

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

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

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

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

Expand Down Expand Up @@ -576,7 +576,7 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
{
struct gb_connection *connection = get_conn_from_light(light);

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

Expand Down Expand Up @@ -728,14 +728,14 @@ static int __gb_lights_channel_torch_attach(struct gb_channel *channel,
{
char *name;

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

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

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

/*
* If light have torch mode channel, this channel will be the led
* classdev of the registered above flash classdev.
* classdev of the registered above flash classdev
*/
channel_torch = get_channel_from_mode(channel->light,
GB_CHANNEL_MODE_TORCH);
Expand Down Expand Up @@ -838,7 +838,7 @@ static int gb_lights_channel_flash_config(struct gb_channel *channel)
*/
channel->led->max_brightness = (fset->max - fset->min) / fset->step;

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

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

Expand Down
Loading

0 comments on commit b95150a

Please sign in to comment.