All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4EDA9882.208@gmx.de>

diff --git a/a/1.txt b/N1/1.txt
index 62ef919..7604f51 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -316,7 +316,7 @@ Why "!!"?
 > +	struct i740fb_par *par = info->par;
 > +
 > +	mutex_lock(&(par->open_lock));
-> +	if (par->ref_count = 0) {
+> +	if (par->ref_count == 0) {
 > +		mutex_unlock(&(par->open_lock));
 > +		return -EINVAL;
 
@@ -578,7 +578,7 @@ The kernel has a macro called ALIGN, using it would be better, I think.
 > +	vslen = var->vsync_len;
 > +	upper = var->upper_margin;
 > +
-> +	if (vxres * vyres * ((bpp + 1) / 8) > info->screen_size || vyres = yres) {
+> +	if (vxres * vyres * ((bpp + 1) / 8) > info->screen_size || vyres == yres) {
 > +		vyres = info->screen_size / vxres / ((bpp + 1) / 8);
 > +		if (vyres < yres)
 > +			return -ENOMEM;
@@ -678,7 +678,7 @@ The kernel has a macro called ALIGN, using it would be better, I think.
 > +		break;
 > +	case 15: /* 0rrrrrgg gggbbbbb */
 > +	case 16: /* rrrrrggg gggbbbbb */
-> +		par->pixelpipe_cfg1 = (var->green.length = 6) ? DISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE;
+> +		par->pixelpipe_cfg1 = (var->green.length == 6) ? DISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE;
 > +		par->crtc[VGA_CRTC_OFFSET] = vxres >> 2;
 > +		par->ext_offset = vxres >> 10;
 > +		par->bitblt_cntl = COLEXP_16BPP;
@@ -934,7 +934,7 @@ Shouldn't you use i740outreg_mask here?
 > +	vga_unprotect(par);
 > +
 > +	info->fix.line_length = info->var.xres_virtual * info->var.bits_per_pixel / 8;
-> +	if (info->var.bits_per_pixel = 8)
+> +	if (info->var.bits_per_pixel == 8)
 > +		info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
 > +	else
 > +		info->fix.visual = FB_VISUAL_TRUECOLOR;
@@ -961,9 +961,9 @@ Shouldn't you use i740outreg_mask here?
 > +	case 16:
 > +		if (regno >= 16)
 > +			return 0;
-> +		if (info->var.green.length = 5)
+> +		if (info->var.green.length == 5)
 > +			((u32 *)info->pseudo_palette)[regno] = ((red & 0xF800) >> 1) | ((green & 0xF800) >> 6) | ((blue & 0xF800) >> 11);
-> +		else if (info->var.green.length = 6)
+> +		else if (info->var.green.length == 6)
 > +			((u32 *)info->pseudo_palette)[regno] = (red & 0xF800) |	((green & 0xFC00) >> 5) | ((blue & 0xF800) >> 11);
 > +		else
 > +			return -EINVAL;
@@ -1080,7 +1080,7 @@ You shouldn't add dead/inactive code, I think.
 > +	i740outreg(par, XRX, DPMS_SYNC_SELECT, DPMSSyncSelect);
 > +
 > +	/* Let fbcon do a soft blank for us */
-> +	return (blank_mode = FB_BLANK_NORMAL) ? 1 : 0;
+> +	return (blank_mode == FB_BLANK_NORMAL) ? 1 : 0;
 > +}
 > +
 > +static struct fb_ops i740fb_ops = {
@@ -1149,7 +1149,7 @@ You shouldn't add dead/inactive code, I think.
 > +	}
 > +
 > +	/* detect memory size */
-> +	if ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) = DRAM_ROW_1_SDRAM)
+> +	if ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) == DRAM_ROW_1_SDRAM)
 > +		i740outb(par, XRX, DRAM_ROW_BNDRY_1);
 > +	else
 > +		i740outb(par, XRX, DRAM_ROW_BNDRY_0);
@@ -1170,7 +1170,7 @@ You shouldn't add dead/inactive code, I think.
 > +	info->fix.smem_len = info->screen_size;
 > +	info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
 > +
-> +	if (i740fb_setup_ddc_bus(info) = 0) {
+> +	if (i740fb_setup_ddc_bus(info) == 0) {
 > +		par->ddc_registered = true;
 > +		edid = fb_ddc_read(&par->ddc_adapter);
 > +		if (edid) {
@@ -1188,7 +1188,7 @@ You shouldn't add dead/inactive code, I think.
 > +				if (m) {
 > +					fb_videomode_to_var(&info->var, m);
 > +					/* fill all other info->var's fields */
-> +					if (i740fb_check_var(&info->var, info) = 0)
+> +					if (i740fb_check_var(&info->var, info) == 0)
 > +						found = true;
 > +				}
 > +			}
@@ -1202,7 +1202,7 @@ You shouldn't add dead/inactive code, I think.
 > +		ret = fb_find_mode(&info->var, info, mode_option,
 > +				   info->monspecs.modedb, info->monspecs.modedb_len,
 > +				   NULL, info->var.bits_per_pixel);
-> +		if (!ret || ret = 4) {
+> +		if (!ret || ret == 4) {
 > +			dev_err(info->device, "mode %s not found\n", mode_option);
 > +			ret = -EINVAL;
 > +		}
@@ -1215,7 +1215,7 @@ You shouldn't add dead/inactive code, I think.
 > +	info->var.yres_virtual = info->fix.smem_len * 8 /
 > +			(info->var.bits_per_pixel * info->var.xres_virtual);
 > +
-> +	if (ret = -EINVAL)
+> +	if (ret == -EINVAL)
 > +		goto err_find_mode;
 > +
 > +	ret = fb_alloc_cmap(&info->cmap, 256, 0);
@@ -1291,14 +1291,14 @@ You shouldn't add dead/inactive code, I think.
 > +	struct i740fb_par *par = info->par;
 > +
 > +	/* don't disable console during hibernation and wakeup from it */
-> +	if (state.event = PM_EVENT_FREEZE || state.event = PM_EVENT_PRETHAW)
+> +	if (state.event == PM_EVENT_FREEZE || state.event == PM_EVENT_PRETHAW)
 > +		return 0;
 > +
 > +	console_lock();
 > +	mutex_lock(&(par->open_lock));
 > +
 > +	/* do nothing if framebuffer is not active */
-> +	if (par->ref_count = 0) {
+> +	if (par->ref_count == 0) {
 > +		mutex_unlock(&(par->open_lock));
 > +		console_unlock();
 > +		return 0;
@@ -1324,7 +1324,7 @@ You shouldn't add dead/inactive code, I think.
 > +	console_lock();
 > +	mutex_lock(&(par->open_lock));
 > +
-> +	if (par->ref_count = 0)
+> +	if (par->ref_count == 0)
 > +		goto fail;
 > +
 > +	pci_set_power_state(dev, PCI_D0);
diff --git a/a/content_digest b/N1/content_digest
index 1b3d26a..6ceb5bd 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -326,7 +326,7 @@
  "> +\tstruct i740fb_par *par = info->par;\n"
  "> +\n"
  "> +\tmutex_lock(&(par->open_lock));\n"
- "> +\tif (par->ref_count = 0) {\n"
+ "> +\tif (par->ref_count == 0) {\n"
  "> +\t\tmutex_unlock(&(par->open_lock));\n"
  "> +\t\treturn -EINVAL;\n"
  "\n"
@@ -588,7 +588,7 @@
  "> +\tvslen = var->vsync_len;\n"
  "> +\tupper = var->upper_margin;\n"
  "> +\n"
- "> +\tif (vxres * vyres * ((bpp + 1) / 8) > info->screen_size || vyres = yres) {\n"
+ "> +\tif (vxres * vyres * ((bpp + 1) / 8) > info->screen_size || vyres == yres) {\n"
  "> +\t\tvyres = info->screen_size / vxres / ((bpp + 1) / 8);\n"
  "> +\t\tif (vyres < yres)\n"
  "> +\t\t\treturn -ENOMEM;\n"
@@ -688,7 +688,7 @@
  "> +\t\tbreak;\n"
  "> +\tcase 15: /* 0rrrrrgg gggbbbbb */\n"
  "> +\tcase 16: /* rrrrrggg gggbbbbb */\n"
- "> +\t\tpar->pixelpipe_cfg1 = (var->green.length = 6) ? DISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE;\n"
+ "> +\t\tpar->pixelpipe_cfg1 = (var->green.length == 6) ? DISPLAY_16BPP_MODE : DISPLAY_15BPP_MODE;\n"
  "> +\t\tpar->crtc[VGA_CRTC_OFFSET] = vxres >> 2;\n"
  "> +\t\tpar->ext_offset = vxres >> 10;\n"
  "> +\t\tpar->bitblt_cntl = COLEXP_16BPP;\n"
@@ -944,7 +944,7 @@
  "> +\tvga_unprotect(par);\n"
  "> +\n"
  "> +\tinfo->fix.line_length = info->var.xres_virtual * info->var.bits_per_pixel / 8;\n"
- "> +\tif (info->var.bits_per_pixel = 8)\n"
+ "> +\tif (info->var.bits_per_pixel == 8)\n"
  "> +\t\tinfo->fix.visual = FB_VISUAL_PSEUDOCOLOR;\n"
  "> +\telse\n"
  "> +\t\tinfo->fix.visual = FB_VISUAL_TRUECOLOR;\n"
@@ -971,9 +971,9 @@
  "> +\tcase 16:\n"
  "> +\t\tif (regno >= 16)\n"
  "> +\t\t\treturn 0;\n"
- "> +\t\tif (info->var.green.length = 5)\n"
+ "> +\t\tif (info->var.green.length == 5)\n"
  "> +\t\t\t((u32 *)info->pseudo_palette)[regno] = ((red & 0xF800) >> 1) | ((green & 0xF800) >> 6) | ((blue & 0xF800) >> 11);\n"
- "> +\t\telse if (info->var.green.length = 6)\n"
+ "> +\t\telse if (info->var.green.length == 6)\n"
  "> +\t\t\t((u32 *)info->pseudo_palette)[regno] = (red & 0xF800) |\t((green & 0xFC00) >> 5) | ((blue & 0xF800) >> 11);\n"
  "> +\t\telse\n"
  "> +\t\t\treturn -EINVAL;\n"
@@ -1090,7 +1090,7 @@
  "> +\ti740outreg(par, XRX, DPMS_SYNC_SELECT, DPMSSyncSelect);\n"
  "> +\n"
  "> +\t/* Let fbcon do a soft blank for us */\n"
- "> +\treturn (blank_mode = FB_BLANK_NORMAL) ? 1 : 0;\n"
+ "> +\treturn (blank_mode == FB_BLANK_NORMAL) ? 1 : 0;\n"
  "> +}\n"
  "> +\n"
  "> +static struct fb_ops i740fb_ops = {\n"
@@ -1159,7 +1159,7 @@
  "> +\t}\n"
  "> +\n"
  "> +\t/* detect memory size */\n"
- "> +\tif ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) = DRAM_ROW_1_SDRAM)\n"
+ "> +\tif ((i740inreg(par, XRX, DRAM_ROW_TYPE) & DRAM_ROW_1) == DRAM_ROW_1_SDRAM)\n"
  "> +\t\ti740outb(par, XRX, DRAM_ROW_BNDRY_1);\n"
  "> +\telse\n"
  "> +\t\ti740outb(par, XRX, DRAM_ROW_BNDRY_0);\n"
@@ -1180,7 +1180,7 @@
  "> +\tinfo->fix.smem_len = info->screen_size;\n"
  "> +\tinfo->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;\n"
  "> +\n"
- "> +\tif (i740fb_setup_ddc_bus(info) = 0) {\n"
+ "> +\tif (i740fb_setup_ddc_bus(info) == 0) {\n"
  "> +\t\tpar->ddc_registered = true;\n"
  "> +\t\tedid = fb_ddc_read(&par->ddc_adapter);\n"
  "> +\t\tif (edid) {\n"
@@ -1198,7 +1198,7 @@
  "> +\t\t\t\tif (m) {\n"
  "> +\t\t\t\t\tfb_videomode_to_var(&info->var, m);\n"
  "> +\t\t\t\t\t/* fill all other info->var's fields */\n"
- "> +\t\t\t\t\tif (i740fb_check_var(&info->var, info) = 0)\n"
+ "> +\t\t\t\t\tif (i740fb_check_var(&info->var, info) == 0)\n"
  "> +\t\t\t\t\t\tfound = true;\n"
  "> +\t\t\t\t}\n"
  "> +\t\t\t}\n"
@@ -1212,7 +1212,7 @@
  "> +\t\tret = fb_find_mode(&info->var, info, mode_option,\n"
  "> +\t\t\t\t   info->monspecs.modedb, info->monspecs.modedb_len,\n"
  "> +\t\t\t\t   NULL, info->var.bits_per_pixel);\n"
- "> +\t\tif (!ret || ret = 4) {\n"
+ "> +\t\tif (!ret || ret == 4) {\n"
  "> +\t\t\tdev_err(info->device, \"mode %s not found\\n\", mode_option);\n"
  "> +\t\t\tret = -EINVAL;\n"
  "> +\t\t}\n"
@@ -1225,7 +1225,7 @@
  "> +\tinfo->var.yres_virtual = info->fix.smem_len * 8 /\n"
  "> +\t\t\t(info->var.bits_per_pixel * info->var.xres_virtual);\n"
  "> +\n"
- "> +\tif (ret = -EINVAL)\n"
+ "> +\tif (ret == -EINVAL)\n"
  "> +\t\tgoto err_find_mode;\n"
  "> +\n"
  "> +\tret = fb_alloc_cmap(&info->cmap, 256, 0);\n"
@@ -1301,14 +1301,14 @@
  "> +\tstruct i740fb_par *par = info->par;\n"
  "> +\n"
  "> +\t/* don't disable console during hibernation and wakeup from it */\n"
- "> +\tif (state.event = PM_EVENT_FREEZE || state.event = PM_EVENT_PRETHAW)\n"
+ "> +\tif (state.event == PM_EVENT_FREEZE || state.event == PM_EVENT_PRETHAW)\n"
  "> +\t\treturn 0;\n"
  "> +\n"
  "> +\tconsole_lock();\n"
  "> +\tmutex_lock(&(par->open_lock));\n"
  "> +\n"
  "> +\t/* do nothing if framebuffer is not active */\n"
- "> +\tif (par->ref_count = 0) {\n"
+ "> +\tif (par->ref_count == 0) {\n"
  "> +\t\tmutex_unlock(&(par->open_lock));\n"
  "> +\t\tconsole_unlock();\n"
  "> +\t\treturn 0;\n"
@@ -1334,7 +1334,7 @@
  "> +\tconsole_lock();\n"
  "> +\tmutex_lock(&(par->open_lock));\n"
  "> +\n"
- "> +\tif (par->ref_count = 0)\n"
+ "> +\tif (par->ref_count == 0)\n"
  "> +\t\tgoto fail;\n"
  "> +\n"
  "> +\tpci_set_power_state(dev, PCI_D0);\n"
@@ -1749,4 +1749,4 @@
  "\n"
  Florian Tobias Schandinat
 
-95d89ebf9ecdf289f60b0d155cfa4bf9da2fac2a604738debeccecf6add3e5a4
+b20217ece9e068594b002d68df3241c16ed49de2691261e6ef192d65034bd9f5

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.