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

Commit 2b1b078c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Correct the format specifiers in sscanf function"

parents e3cbf0ad 27f7b3b3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static ssize_t panel_debug_base_offset_write(struct file *file,

	buf[count] = 0;	/* end of string */

	if (sscanf(buf, "%x %d", &off, &cnt) != 2)
	if (sscanf(buf, "%x %u", &off, &cnt) != 2)
		return -EFAULT;

	if (off > dbg->max_offset)
@@ -747,11 +747,11 @@ static ssize_t mdss_debug_factor_write(struct file *file,

	if (strnchr(buf, count, '/')) {
		/* Parsing buf as fraction */
		if (sscanf(buf, "%d/%d", &numer, &denom) != 2)
		if (sscanf(buf, "%u/%u", &numer, &denom) != 2)
			return -EFAULT;
	} else {
		/* Parsing buf as percentage */
		if (sscanf(buf, "%d", &numer) != 1)
		if (kstrtouint(buf, 0, &numer))
			return -EFAULT;
		denom = 100;
	}
@@ -1059,7 +1059,7 @@ static ssize_t mdss_debug_perf_bw_limit_write(struct file *file,

	if (strnchr(buf, count, ' ')) {
		/* Parsing buf */
		if (sscanf(buf, "%d %d", &mode, &val) != 2)
		if (sscanf(buf, "%u %u", &mode, &val) != 2)
			return -EFAULT;
	}

+4 −4
Original line number Diff line number Diff line
@@ -600,8 +600,8 @@ static ssize_t mdss_fb_force_panel_dead(struct device *dev,
		return len;
	}

	if (sscanf(buf, "%d", &pdata->panel_info.panel_force_dead) != 1)
		pr_err("sccanf buf error!\n");
	if (kstrtouint(buf, 0, &pdata->panel_info.panel_force_dead))
		pr_err("kstrtouint buf error!\n");

	return len;
}
@@ -714,8 +714,8 @@ static ssize_t mdss_fb_change_dfps_mode(struct device *dev,
	}
	pinfo = &pdata->panel_info;

	if (sscanf(buf, "%d", &dfps_mode) != 1) {
		pr_err("sccanf buf error!\n");
	if (kstrtouint(buf, 0, &dfps_mode)) {
		pr_err("kstrtouint buf error!\n");
		return len;
	}

+1 −1
Original line number Diff line number Diff line
@@ -2448,7 +2448,7 @@ static ssize_t mdss_mdp_store_max_limit_bw(struct device *dev,
	struct mdss_data_type *mdata = dev_get_drvdata(dev);
	u32 data = 0;

	if (1 != sscanf(buf, "%d", &data)) {
	if (kstrtouint(buf, 0, &data)) {
		pr_info("Not able scan to bw_mode_bitmap\n");
	} else {
		mdata->bw_mode_bitmap = data;
+1 −1
Original line number Diff line number Diff line
@@ -2969,7 +2969,7 @@ static ssize_t dynamic_fps_sysfs_wta_dfps(struct device *dev,

	if (pdata->panel_info.dfps_update ==
		DFPS_IMMEDIATE_MULTI_UPDATE_MODE_CLK_HFP) {
		if (sscanf(buf, "%d %d %d %d %d",
		if (sscanf(buf, "%u %u %u %u %u",
		    &data.hfp, &data.hbp, &data.hpw,
		    &data.clk_rate, &data.fps) != 5) {
			pr_err("could not read input\n");