]> www.infradead.org Git - linux.git/commitdiff
staging: greybus: Fix capitalization and punctuation inconsistencies
authorSteven Davis <goldside000@outlook.com>
Sun, 1 Sep 2024 21:18:59 +0000 (17:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2024 08:36:03 +0000 (10:36 +0200)
There were a lot of inconsistencies in outputs and
comments, some were properly formatted and
capitalized, and some weren't. This patch resolves
this by properly formatting the inconsistent comments
and outputs.

Signed-off-by: Steven Davis <goldside000@outlook.com>
Link: https://lore.kernel.org/r/SJ2P223MB102660087EA9382BE5287FDBF7912@SJ2P223MB1026.NAMP223.PROD.OUTLOOK.COM
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/arche-platform.c
drivers/staging/greybus/authentication.c
drivers/staging/greybus/bootrom.c
drivers/staging/greybus/light.c
drivers/staging/greybus/log.c

index b33977ccd5271064a1b588df6e529e1684c2d190..45c1737817d0017b436b77b79cf63baed067e89b 100644 (file)
@@ -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;
@@ -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;
 }
@@ -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);
@@ -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);
@@ -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;
        }
@@ -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;
@@ -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;
        }
 
@@ -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)
@@ -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);
@@ -454,16 +454,16 @@ 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;
        }
 
@@ -471,7 +471,7 @@ static int arche_platform_probe(struct platform_device *pdev)
        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;
        }
 
@@ -504,20 +504,20 @@ 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;
        }
 
@@ -525,7 +525,7 @@ static int arche_platform_probe(struct platform_device *pdev)
        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;
        }
 
@@ -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)
index d53e58f92e8176eb005aab7f0ada6fa2831261fb..e1a819d1b1c8375ce1423177b6305fed45490255 100644 (file)
@@ -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;
        }
 
@@ -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;
        }
 
@@ -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;
        }
 
index d4d86b3898de420772a4b4dfee3ec072e53a4cb3..8ad763026dea6d66864d17144077e2cb678e35b5 100644 (file)
@@ -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;
@@ -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;
@@ -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:
@@ -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:
        /*
@@ -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;
        }
 }
@@ -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;
        }
@@ -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;
        }
 
index e509fdc715dbbf53fa4cbd9a9f6d7b539ce7e354..8ee08389d80103ec094db90d3100db26c5f414e3 100644 (file)
@@ -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)                              \
@@ -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;
        }
 
@@ -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)
@@ -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)
@@ -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;
        }
 
@@ -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;
 }
 
@@ -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)
@@ -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);
@@ -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);
@@ -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;
 }
 
index 57dcf9453bf1678902024c0d960504875823b78c..ce47f16a0c5bcd3efc04f4eadba9cf9ccdea6397 100644 (file)
@@ -23,30 +23,30 @@ static int gb_log_request_handler(struct gb_operation *op)
        u16 len;
 
        if (op->type != GB_LOG_TYPE_SEND_LOG) {
-               dev_err(dev, "unknown request type 0x%02x\n", op->type);
+               dev_err(dev, "Unknown request type 0x%02x\n", op->type);
                return -EINVAL;
        }
 
        /* Verify size of payload */
        if (op->request->payload_size < sizeof(*receive)) {
-               dev_err(dev, "log request too small (%zu < %zu)\n",
+               dev_err(dev, "Log request too small (%zu < %zu)\n",
                        op->request->payload_size, sizeof(*receive));
                return -EINVAL;
        }
        receive = op->request->payload;
        len = le16_to_cpu(receive->len);
        if (len != (op->request->payload_size - sizeof(*receive))) {
-               dev_err(dev, "log request wrong size %d vs %zu\n", len,
+               dev_err(dev, "Log request wrong size %d vs %zu\n", len,
                        (op->request->payload_size - sizeof(*receive)));
                return -EINVAL;
        }
        if (len == 0) {
-               dev_err(dev, "log request of 0 bytes?\n");
+               dev_err(dev, "Log request of 0 bytes?\n");
                return -EINVAL;
        }
 
        if (len > GB_LOG_MAX_LEN) {
-               dev_err(dev, "log request too big: %d\n", len);
+               dev_err(dev, "Log request too big: %d\n", len);
                return -EINVAL;
        }