Linux Input/HID development
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Chen Ni" <nichen@iscas.ac.cn>,
	"Derek J . Clark" <derekjohn.clark@gmail.com>
Cc: "Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <bentiss@kernel.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: hid-lenovo-go: Remove unneeded semicolon
Date: Sun, 01 Mar 2026 20:33:17 -0500	[thread overview]
Message-ID: <0e072068-6e13-4522-9c02-62d9855f0f2e@app.fastmail.com> (raw)
In-Reply-To: <20260228033936.285945-1-nichen@iscas.ac.cn>

On Fri, Feb 27, 2026, at 10:39 PM, Chen Ni wrote:
> Remove unnecessary semicolons after switch statements and function
> bodies. Most issues were reported by Coccinelle/coccicheck using the
> semantic patch at scripts/coccinelle/misc/semicolon.cocci. Additional
> instances found during manual code review were also fixed.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
>  drivers/hid/hid-lenovo-go.c | 52 ++++++++++++++++++-------------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/hid/hid-lenovo-go.c b/drivers/hid/hid-lenovo-go.c
> index 6972d13802e2..77e3823447e5 100644
> --- a/drivers/hid/hid-lenovo-go.c
> +++ b/drivers/hid/hid-lenovo-go.c
> @@ -455,7 +455,7 @@ static int hid_go_feature_status_event(struct 
> command_report *cmd_rep)
>  			return 0;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  	case FEATURE_IMU_BYPASS:
>  		switch (cmd_rep->device_type) {
>  		case LEFT_CONTROLLER:
> @@ -466,7 +466,7 @@ static int hid_go_feature_status_event(struct 
> command_report *cmd_rep)
>  			return 0;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		break;
>  	case FEATURE_LIGHT_ENABLE:
>  		drvdata.rgb_en = cmd_rep->data[0];
> @@ -481,7 +481,7 @@ static int hid_go_feature_status_event(struct 
> command_report *cmd_rep)
>  			return 0;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		break;
>  	case FEATURE_TOUCHPAD_ENABLE:
>  		drvdata.tp_en = cmd_rep->data[0];
> @@ -515,7 +515,7 @@ static int hid_go_motor_event(struct command_report 
> *cmd_rep)
>  			return 0;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		break;
>  	case RUMBLE_MODE:
>  		switch (cmd_rep->device_type) {
> @@ -527,7 +527,7 @@ static int hid_go_motor_event(struct command_report 
> *cmd_rep)
>  			return 0;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  	case TP_VIBRATION_ENABLE:
>  		drvdata.tp_vibration_en = cmd_rep->data[0];
>  		return 0;
> @@ -625,7 +625,7 @@ static int hid_go_os_mode_cfg_event(struct 
> command_report *cmd_rep)
>  		return 0;
>  	default:
>  		return -EINVAL;
> -	};
> +	}
>  }
> 
>  static int hid_go_set_event_return(struct command_report *cmd_rep)
> @@ -699,14 +699,14 @@ static int hid_go_raw_event(struct hid_device 
> *hdev, struct hid_report *report,
>  		default:
>  			ret = -EINVAL;
>  			break;
> -		};
> +		}
>  		break;
>  	case OS_MODE_DATA:
>  		ret = hid_go_os_mode_cfg_event(cmd_rep);
>  		break;
>  	default:
>  		goto passthrough;
> -	};
> +	}
>  	dev_dbg(&hdev->dev, "Rx data as raw input report: [%*ph]\n",
>  		GO_PACKET_SIZE, data);
> 
> @@ -925,7 +925,7 @@ static ssize_t feature_status_store(struct device *dev,
>  		break;
>  	default:
>  		return -EINVAL;
> -	};
> +	}
> 
>  	if (ret < 0)
>  		return ret;
> @@ -1013,7 +1013,7 @@ static ssize_t feature_status_show(struct device *dev,
>  			break;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		count = sysfs_emit(buf, "%u\n", i);
>  		break;
>  	case FEATURE_FPS_SWITCH_STATUS:
> @@ -1032,7 +1032,7 @@ static ssize_t feature_status_show(struct device *dev,
>  		break;
>  	default:
>  		return -EINVAL;
> -	};
> +	}
> 
>  	return count;
>  }
> @@ -1070,7 +1070,7 @@ static ssize_t feature_status_options(struct device *dev,
>  		break;
>  	default:
>  		return -EINVAL;
> -	};
> +	}
> 
>  	if (count)
>  		buf[count - 1] = '\n';
> @@ -1111,7 +1111,7 @@ static ssize_t motor_config_store(struct device *dev,
>  		ret = sysfs_match_string(intensity_text, buf);
>  		val = ret;
>  		break;
> -	};
> +	}
> 
>  	if (ret < 0)
>  		return ret;
> @@ -1161,7 +1161,7 @@ static ssize_t motor_config_show(struct device *dev,
>  			break;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		if (i >= ARRAY_SIZE(enabled_status_text))
>  			return -EINVAL;
> 
> @@ -1177,7 +1177,7 @@ static ssize_t motor_config_show(struct device *dev,
>  			break;
>  		default:
>  			return -EINVAL;
> -		};
> +		}
>  		if (i >= ARRAY_SIZE(rumble_mode_text))
>  			return -EINVAL;
> 
> @@ -1197,7 +1197,7 @@ static ssize_t motor_config_show(struct device *dev,
> 
>  		count = sysfs_emit(buf, "%s\n", intensity_text[i]);
>  		break;
> -	};
> +	}
> 
>  	return count;
>  }
> @@ -1232,7 +1232,7 @@ static ssize_t motor_config_options(struct device *dev,
>  					       enabled_status_text[i]);
>  		}
>  		break;
> -	};
> +	}
> 
>  	if (count)
>  		buf[count - 1] = '\n';
> @@ -1333,7 +1333,7 @@ static ssize_t device_status_show(struct device *dev,
>  		break;
>  	default:
>  		return -EINVAL;
> -	};
> +	}
> 
>  	if (i >= ARRAY_SIZE(cal_status_text))
>  		return -EINVAL;
> @@ -1459,7 +1459,7 @@ static int rgb_attr_show(void)
>  	index = drvdata.rgb_profile + 3;
> 
>  	return rgb_cfg_call(drvdata.hdev, GET_RGB_CFG, index, 0, 0);
> -};
> +}
> 
>  static ssize_t rgb_effect_store(struct device *dev,
>  				struct device_attribute *attr, const char *buf,
> @@ -1489,7 +1489,7 @@ static ssize_t rgb_effect_store(struct device *dev,
> 
>  	drvdata.rgb_effect = effect;
>  	return count;
> -};
> +}
> 
>  static ssize_t rgb_effect_show(struct device *dev,
>  			       struct device_attribute *attr, char *buf)
> @@ -1552,7 +1552,7 @@ static ssize_t rgb_speed_store(struct device *dev,
>  	drvdata.rgb_speed = val;
> 
>  	return count;
> -};
> +}
> 
>  static ssize_t rgb_speed_show(struct device *dev, struct 
> device_attribute *attr,
>  			      char *buf)
> @@ -1594,7 +1594,7 @@ static ssize_t rgb_mode_store(struct device *dev, 
> struct device_attribute *attr,
>  	drvdata.rgb_mode = val;
> 
>  	return count;
> -};
> +}
> 
>  static ssize_t rgb_mode_show(struct device *dev, struct 
> device_attribute *attr,
>  			     char *buf)
> @@ -1609,7 +1609,7 @@ static ssize_t rgb_mode_show(struct device *dev, 
> struct device_attribute *attr,
>  		return -EINVAL;
> 
>  	return sysfs_emit(buf, "%s\n", rgb_mode_text[drvdata.rgb_mode]);
> -};
> +}
> 
>  static ssize_t rgb_mode_index_show(struct device *dev,
>  				   struct device_attribute *attr, char *buf)
> @@ -1649,7 +1649,7 @@ static ssize_t rgb_profile_store(struct device *dev,
>  	drvdata.rgb_profile = val;
> 
>  	return count;
> -};
> +}
> 
>  static ssize_t rgb_profile_show(struct device *dev,
>  				struct device_attribute *attr, char *buf)
> @@ -1665,7 +1665,7 @@ static ssize_t rgb_profile_show(struct device *dev,
>  		return -EINVAL;
> 
>  	return sysfs_emit(buf, "%hhu\n", drvdata.rgb_profile);
> -};
> +}
> 
>  static ssize_t rgb_profile_range_show(struct device *dev,
>  				      struct device_attribute *attr, char *buf)
> @@ -1704,7 +1704,7 @@ static void hid_go_brightness_set(struct 
> led_classdev *led_cdev,
>  		break;
>  	default:
>  		dev_err(led_cdev->dev, "Failed to write RGB profile: %i\n", ret);
> -	};
> +	}
>  }
> 
>  #define LEGO_DEVICE_ATTR_RW(_name, _attrname, _dtype, _rtype, _group)         \
> -- 
> 2.25.1

Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

  reply	other threads:[~2026-03-02  1:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  3:39 [PATCH] HID: hid-lenovo-go: Remove unneeded semicolon Chen Ni
2026-03-02  1:33 ` Mark Pearson [this message]
2026-03-06  5:59 ` Derek John Clark

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=0e072068-6e13-4522-9c02-62d9855f0f2e@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=bentiss@kernel.org \
    --cc=derekjohn.clark@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    /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