Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a2c775 authored by Greg Dietsche's avatar Greg Dietsche Committed by Stanislaw Gruszka
Browse files

iwlegacy: 4965-rs: cleanup il4965_rs_sta_dbgfs_rate_scale_data_read



1) remove ret local var and return the result directly
2) remove il since it is not used

Signed-off-by: default avatarGreg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
parent a741b995
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -2769,14 +2769,9 @@ il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file,
{
{
	char buff[120];
	char buff[120];
	int desc = 0;
	int desc = 0;
	ssize_t ret;

	struct il_lq_sta *lq_sta = file->private_data;
	struct il_lq_sta *lq_sta = file->private_data;
	struct il_priv *il;
	struct il_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl];
	struct il_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl];


	il = lq_sta->drv;

	if (is_Ht(tbl->lq_type))
	if (is_Ht(tbl->lq_type))
		desc +=
		desc +=
		    sprintf(buff + desc, "Bit Rate= %d Mb/s\n",
		    sprintf(buff + desc, "Bit Rate= %d Mb/s\n",
@@ -2786,8 +2781,7 @@ il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file,
		    sprintf(buff + desc, "Bit Rate= %d Mb/s\n",
		    sprintf(buff + desc, "Bit Rate= %d Mb/s\n",
			    il_rates[lq_sta->last_txrate_idx].ieee >> 1);
			    il_rates[lq_sta->last_txrate_idx].ieee >> 1);


	ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
	return simple_read_from_buffer(user_buf, count, ppos, buff, desc);
	return ret;
}
}


static const struct file_operations rs_sta_dbgfs_rate_scale_data_ops = {
static const struct file_operations rs_sta_dbgfs_rate_scale_data_ops = {