Make Linux kernel coding style modifications for XGI_main_26.c to include:
CHECK: Alignment should match open parenthesis
CHECK: No space is necessary after a cast
CHECK: Logical continuations should be on the previous line
CHECK: spaces preferred around that '-'
CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: Blank lines aren't necessary before a close brace '}'
Comment style modifications
Walt Feasel (7):
staging: xgifb: XGI_main_26.c Comment style modifications
staging: xgifb: XGI_main_26.c No space after cast
staging: xgifb: XGI_main_26.c Logical continuation
staging: xgifb: XGI_main_26.c Space around operator
staging: xgifb: XGI_main_26.c Blank line after {
staging: xgifb: XGI_main_26.c Blank line before }
staging: xgifb: XGI_main_26.c Align match parenthesis
drivers/staging/xgifb/XGI_main_26.c | 184 +++++++++++++++---------------------
1 file changed, 78 insertions(+), 106 deletions(-)
--
v2 makes changes to correct for email format patch submission
2.1.4
Make suggested checkpatch modification for
CHECK: No space is necessary after a cast
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 95999cd..51b1194 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -105,7 +105,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
cr_data = XGI_CRT1Table[index].CR[3];
/* Horizontal retrace (=sync) start */
- HRS = (cr_data & 0xff) | ((unsigned short) (sr_data & 0xC0) << 2);
+ HRS = (cr_data & 0xff) | ((unsigned short)(sr_data & 0xC0) << 2);
F = HRS - HDE - 3;
sr_data = XGI_CRT1Table[index].CR[6];
@@ -115,8 +115,8 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
cr_data2 = XGI_CRT1Table[index].CR[4];
/* Horizontal blank end */
- HBE = (cr_data & 0x1f) | ((unsigned short) (cr_data2 & 0x80) >> 2)
- | ((unsigned short) (sr_data & 0x03) << 6);
+ HBE = (cr_data & 0x1f) | ((unsigned short)(cr_data2 & 0x80) >> 2)
+ | ((unsigned short)(sr_data & 0x03) << 6);
/* Horizontal retrace (=sync) end */
HRE = (cr_data2 & 0x1f) | ((sr_data & 0x04) << 3);
@@ -142,15 +142,15 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
cr_data = XGI_CRT1Table[index].CR[10];
/* Vertical retrace (=sync) start */
- VRS = (cr_data & 0xff) | ((unsigned short) (cr_data2 & 0x04) << 6)
- | ((unsigned short) (cr_data2 & 0x80) << 2)
- | ((unsigned short) (sr_data & 0x08) << 7);
+ VRS = (cr_data & 0xff) | ((unsigned short)(cr_data2 & 0x04) << 6)
+ | ((unsigned short)(cr_data2 & 0x80) << 2)
+ | ((unsigned short)(sr_data & 0x08) << 7);
F = VRS + 1 - VDE;
cr_data = XGI_CRT1Table[index].CR[13];
/* Vertical blank end */
- VBE = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x10) << 4);
+ VBE = (cr_data & 0xff) | ((unsigned short)(sr_data & 0x10) << 4);
temp = VBE - ((VDE - 1) & 511);
B = (temp > 0) ? temp : (temp + 512);
@@ -945,7 +945,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
if (var->pixclock) {
drate = 1000000000 / var->pixclock;
hrate = (drate * 1000) / htotal;
- xgifb_info->refresh_rate = (unsigned int) (hrate * 2
+ xgifb_info->refresh_rate = (unsigned int)(hrate * 2
/ vtotal);
} else {
xgifb_info->refresh_rate = 60;
@@ -1150,7 +1150,7 @@ static int XGIfb_setcolreg(unsigned int regno, unsigned int red,
}
break;
case 16:
- ((u32 *) (info->pseudo_palette))[regno] = ((red & 0xf800))
+ ((u32 *)(info->pseudo_palette))[regno] = ((red & 0xf800))
| ((green & 0xfc00) >> 5) | ((blue & 0xf800)
>> 11);
break;
@@ -1158,7 +1158,7 @@ static int XGIfb_setcolreg(unsigned int regno, unsigned int red,
red >>= 8;
green >>= 8;
blue >>= 8;
- ((u32 *) (info->pseudo_palette))[regno] = (red << 16) | (green
+ ((u32 *)(info->pseudo_palette))[regno] = (red << 16) | (green
<< 8) | (blue);
break;
}
@@ -1250,7 +1250,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
drate = 1000000000 / var->pixclock;
hrate = (drate * 1000) / htotal;
xgifb_info->refresh_rate =
- (unsigned int) (hrate * 2 / vtotal);
+ (unsigned int)(hrate * 2 / vtotal);
pr_debug(
"%s: pixclock = %d ,htotal=%d, vtotal=%d\n"
"%s: drate=%d, hrate=%d, refresh_rate=%d\n",
@@ -1670,7 +1670,7 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_info->mmio_size = pci_resource_len(pdev, 1);
xgifb_info->vga_base = pci_resource_start(pdev, 2) + 0x30;
dev_info(&pdev->dev, "Relocate IO address: %Lx [%08lx]\n",
- (u64) pci_resource_start(pdev, 2),
+ (u64)pci_resource_start(pdev, 2),
xgifb_info->vga_base);
if (pci_enable_device(pdev)) {
@@ -1763,13 +1763,13 @@ static int xgifb_probe(struct pci_dev *pdev,
dev_info(&pdev->dev,
"Framebuffer at 0x%Lx, mapped to 0x%p, size %dk\n",
- (u64) xgifb_info->video_base,
+ (u64)xgifb_info->video_base,
xgifb_info->video_vbase,
xgifb_info->video_size / 1024);
dev_info(&pdev->dev,
"MMIO at 0x%Lx, mapped to 0x%p, size %ldk\n",
- (u64) xgifb_info->mmio_base, xgifb_info->mmio_vbase,
+ (u64)xgifb_info->mmio_base, xgifb_info->mmio_vbase,
xgifb_info->mmio_size / 1024);
pci_set_drvdata(pdev, xgifb_info);
@@ -1964,7 +1964,7 @@ static int xgifb_probe(struct pci_dev *pdev,
XGIfb_bpp_to_var(xgifb_info, &fb_info->var);
- fb_info->var.pixclock = (u32) (1000000000 /
+ fb_info->var.pixclock = (u32)(1000000000 /
XGIfb_mode_rate_to_dclock(&xgifb_info->dev_info,
hw_info,
XGIbios_mode[xgifb_info->mode_idx].mode_no));
--
2.1.4
Make comment style modifications.
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 982f90f..95999cd 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1064,7 +1064,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
break;
}
}
- XGIfb_bpp_to_var(xgifb_info, var); /*update ARGB info*/
+ XGIfb_bpp_to_var(xgifb_info, var); /* update ARGB info */
dumpVGAReg(xgifb_info);
return 0;
@@ -1688,7 +1688,7 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_reg_set(XGISR, IND_SIS_PASSWORD, SIS_PASSWORD);
reg1 = xgifb_reg_get(XGISR, IND_SIS_PASSWORD);
- if (reg1 != 0xa1) { /*I/O error */
+ if (reg1 != 0xa1) { /* I/O error */
dev_err(&pdev->dev, "I/O error\n");
ret = -EIO;
goto error_disable;
@@ -1727,7 +1727,7 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_info->video_size = video_size_max;
}
- /* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE */
+ /* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE */
xgifb_reg_or(XGISR,
IND_SIS_PCI_ADDRESS_SET,
(SIS_PCI_ADDR_ENABLE | SIS_MEM_MAP_IO_ENABLE));
@@ -2028,9 +2028,7 @@ static int xgifb_probe(struct pci_dev *pdev,
return ret;
}
-/*****************************************************/
-/* PCI DEVICE HANDLING */
-/*****************************************************/
+/* -------------------- PCI DEVICE HANDLING -------------------- */
static void xgifb_remove(struct pci_dev *pdev)
{
@@ -2054,9 +2052,7 @@ static struct pci_driver xgifb_driver = {
.remove = xgifb_remove
};
-/*****************************************************/
-/* MODULE */
-/*****************************************************/
+/* -------------------- MODULE -------------------- */
module_param(mode, charp, 0000);
MODULE_PARM_DESC(mode,
--
2.1.4
Make suggested checkpatch modification for
CHECK: spaces preferred around that '-,&'
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 9218c74..6e8df20 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -561,7 +561,7 @@ static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info,
!= 1)) {
pr_debug("Adjusting rate from %d down to %d\n",
rate,
- XGIfb_vrate[i-1].refresh);
+ XGIfb_vrate[i - 1].refresh);
xgifb_info->rate_idx =
XGIfb_vrate[i - 1].idx;
xgifb_info->refresh_rate =
@@ -1696,7 +1696,7 @@ static int xgifb_probe(struct pci_dev *pdev,
case PCI_DEVICE_ID_XGI_20:
xgifb_reg_or(XGICR, Index_CR_GPIO_Reg3, GPIOG_EN);
CR48 = xgifb_reg_get(XGICR, Index_CR_GPIO_Reg1);
- if (CR48&GPIOG_READ)
+ if (CR48 & GPIOG_READ)
xgifb_info->chip = XG21;
else
xgifb_info->chip = XG20;
@@ -1782,9 +1782,9 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_info->hasVB = HASVB_NONE;
} else if (xgifb_info->chip == XG21) {
CR38 = xgifb_reg_get(XGICR, 0x38);
- if ((CR38&0xE0) == 0xC0)
+ if ((CR38 & 0xE0) == 0xC0)
xgifb_info->display2 = XGIFB_DISP_LCD;
- else if ((CR38&0xE0) == 0x60)
+ else if ((CR38 & 0xE0) == 0x60)
xgifb_info->hasVB = HASVB_CHRONTEL;
else
xgifb_info->hasVB = HASVB_NONE;
--
2.1.4
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index b1fe17e..e31d107 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1465,7 +1465,6 @@ static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info)
reg,
xgifb_info->video_size, ChannelNum);
return 0;
-
}
static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info)
@@ -1976,7 +1975,6 @@ static int xgifb_probe(struct pci_dev *pdev,
fb_info->var.yres >>= 1;
fb_info->var.yres_virtual >>= 1;
}
-
}
fb_info->flags = FBINFO_FLAG_DEFAULT;
--
2.1.4
Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 100 +++++++++++++++++-------------------
1 file changed, 46 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index e31d107..777cd6e 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -56,8 +56,8 @@ static inline void dumpVGAReg(struct xgifb_video_info *xgifb_info)
/* --------------- Hardware Access Routines -------------------------- */
static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
- struct xgi_hw_device_info *HwDeviceExtension,
- unsigned char modeno)
+ struct xgi_hw_device_info *HwDeviceExtension,
+ unsigned char modeno)
{
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex = 0, ClockIndex = 0;
@@ -68,7 +68,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
XGI_SearchModeID(ModeNo, &ModeIdIndex);
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
- ModeIdIndex, XGI_Pr);
+ ModeIdIndex, XGI_Pr);
ClockIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
@@ -76,11 +76,11 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
}
static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
- struct xgi_hw_device_info *HwDeviceExtension,
- unsigned char modeno,
- u32 *left_margin, u32 *right_margin, u32 *upper_margin,
- u32 *lower_margin, u32 *hsync_len, u32 *vsync_len, u32 *sync,
- u32 *vmode)
+ struct xgi_hw_device_info *HwDeviceExtension,
+ unsigned char modeno, u32 *left_margin,
+ u32 *right_margin, u32 *upper_margin,
+ u32 *lower_margin, u32 *hsync_len,
+ u32 *vsync_len, u32 *sync, u32 *vmode)
{
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex, index = 0;
@@ -95,7 +95,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
if (!XGI_SearchModeID(ModeNo, &ModeIdIndex))
return 0;
RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo,
- ModeIdIndex, XGI_Pr);
+ ModeIdIndex, XGI_Pr);
index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC;
sr_data = XGI_CRT1Table[index].CR[5];
@@ -682,7 +682,7 @@ static void XGIfb_pre_setmode(struct xgifb_video_info *xgifb_info)
xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR30, cr30);
xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR31, cr31);
xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR33,
- (xgifb_info->rate_idx & 0x0F));
+ (xgifb_info->rate_idx & 0x0F));
}
static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
@@ -904,7 +904,7 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
}
static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
- struct fb_info *info)
+ struct fb_info *info)
{
struct xgifb_video_info *xgifb_info = info->par;
struct xgi_hw_device_info *hw_info = &xgifb_info->hw_info;
@@ -944,10 +944,8 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
}
pr_debug("Change mode to %dx%dx%d-%dHz\n",
- var->xres,
- var->yres,
- var->bits_per_pixel,
- xgifb_info->refresh_rate);
+ var->xres, var->yres, var->bits_per_pixel,
+ xgifb_info->refresh_rate);
old_mode = xgifb_info->mode_idx;
xgifb_info->mode_idx = 0;
@@ -1159,7 +1157,7 @@ static int XGIfb_setcolreg(unsigned int regno, unsigned int red,
/* ----------- FBDev related routines for all series ---------- */
static int XGIfb_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info)
+ struct fb_info *info)
{
struct xgifb_video_info *xgifb_info = info->par;
@@ -1253,10 +1251,10 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
search_idx = 0;
while ((XGIbios_mode[search_idx].mode_no != 0) &&
- (XGIbios_mode[search_idx].xres <= var->xres)) {
+ (XGIbios_mode[search_idx].xres <= var->xres)) {
if ((XGIbios_mode[search_idx].xres == var->xres) &&
- (XGIbios_mode[search_idx].yres == var->yres) &&
- (XGIbios_mode[search_idx].bpp == var->bits_per_pixel)) {
+ (XGIbios_mode[search_idx].yres == var->yres) &&
+ (XGIbios_mode[search_idx].bpp == var->bits_per_pixel)) {
if (XGIfb_validate_mode(xgifb_info, search_idx) > 0) {
found_mode = 1;
break;
@@ -1267,7 +1265,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (!found_mode) {
pr_err("%dx%dx%d is no valid mode\n",
- var->xres, var->yres, var->bits_per_pixel);
+ var->xres, var->yres, var->bits_per_pixel);
search_idx = 0;
while (XGIbios_mode[search_idx].mode_no != 0) {
if ((var->xres <= XGIbios_mode[search_idx].xres) &&
@@ -1286,11 +1284,11 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->xres = XGIbios_mode[search_idx].xres;
var->yres = XGIbios_mode[search_idx].yres;
pr_debug("Adapted to mode %dx%dx%d\n",
- var->xres, var->yres, var->bits_per_pixel);
+ var->xres, var->yres, var->bits_per_pixel);
} else {
pr_err("Failed to find similar mode to %dx%dx%d\n",
- var->xres, var->yres, var->bits_per_pixel);
+ var->xres, var->yres, var->bits_per_pixel);
return -EINVAL;
}
}
@@ -1322,7 +1320,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
}
static int XGIfb_pan_display(struct fb_var_screeninfo *var,
- struct fb_info *info)
+ struct fb_info *info)
{
int err;
@@ -1462,8 +1460,7 @@ static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info)
xgifb_info->video_size = xgifb_info->video_size * ChannelNum;
pr_info("SR14=%x DramSzie %x ChannelNum %x\n",
- reg,
- xgifb_info->video_size, ChannelNum);
+ reg, xgifb_info->video_size, ChannelNum);
return 0;
}
@@ -1620,8 +1617,7 @@ static int __init XGIfb_setup(char *options)
return 0;
}
-static int xgifb_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
u8 reg, reg1;
u8 CR48, CR38;
@@ -1726,7 +1722,7 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_info->video_size,
"XGIfb FB")) {
dev_err(&pdev->dev, "Unable request memory size %x\n",
- xgifb_info->video_size);
+ xgifb_info->video_size);
dev_err(&pdev->dev,
"Fatal error: Unable to reserve frame buffer memory. Is there another framebuffer driver active?\n");
ret = -ENODEV;
@@ -1889,8 +1885,7 @@ static int xgifb_probe(struct pci_dev *pdev,
xgifb_info->refresh_rate = refresh_rate;
if (xgifb_info->refresh_rate == 0)
xgifb_info->refresh_rate = 60;
- if (XGIfb_search_refresh_rate(xgifb_info,
- xgifb_info->refresh_rate) == 0) {
+ if (XGIfb_search_refresh_rate(xgifb_info, xgifb_info->refresh_rate) == 0) {
xgifb_info->rate_idx = 1;
xgifb_info->refresh_rate = 60;
}
@@ -1925,15 +1920,13 @@ static int xgifb_probe(struct pci_dev *pdev,
default:
xgifb_info->video_cmap_len = 16;
pr_info("Unsupported depth %d\n",
- xgifb_info->video_bpp);
+ xgifb_info->video_bpp);
break;
}
pr_info("Default mode is %dx%dx%d (%dHz)\n",
- xgifb_info->video_width,
- xgifb_info->video_height,
- xgifb_info->video_bpp,
- xgifb_info->refresh_rate);
+ xgifb_info->video_width, xgifb_info->video_height,
+ xgifb_info->video_bpp, xgifb_info->refresh_rate);
fb_info->var.red.length = 8;
fb_info->var.green.length = 8;
@@ -1950,21 +1943,20 @@ static int xgifb_probe(struct pci_dev *pdev,
XGIfb_bpp_to_var(xgifb_info, &fb_info->var);
- fb_info->var.pixclock = (u32)(1000000000 /
- XGIfb_mode_rate_to_dclock(&xgifb_info->dev_info,
- hw_info,
- XGIbios_mode[xgifb_info->mode_idx].mode_no));
-
- if (XGIfb_mode_rate_to_ddata(&xgifb_info->dev_info, hw_info,
- XGIbios_mode[xgifb_info->mode_idx].mode_no,
- &fb_info->var.left_margin,
- &fb_info->var.right_margin,
- &fb_info->var.upper_margin,
- &fb_info->var.lower_margin,
- &fb_info->var.hsync_len,
- &fb_info->var.vsync_len,
- &fb_info->var.sync,
- &fb_info->var.vmode)) {
+ fb_info->var.pixclock = (u32)(1000000000 / XGIfb_mode_rate_to_dclock
+ (&xgifb_info->dev_info, hw_info,
+ XGIbios_mode[xgifb_info->mode_idx].mode_no));
+
+ if (XGIfb_mode_rate_to_ddata(&xgifb_info->dev_info,
+ hw_info, XGIbios_mode[xgifb_info->mode_idx].mode_no,
+ &fb_info->var.left_margin,
+ &fb_info->var.right_margin,
+ &fb_info->var.upper_margin,
+ &fb_info->var.lower_margin,
+ &fb_info->var.hsync_len,
+ &fb_info->var.vsync_len,
+ &fb_info->var.sync,
+ &fb_info->var.vmode)) {
if ((fb_info->var.vmode & FB_VMODE_MASK) ==
FB_VMODE_INTERLACED) {
fb_info->var.yres <<= 1;
@@ -2040,19 +2032,19 @@ static struct pci_driver xgifb_driver = {
module_param(mode, charp, 0000);
MODULE_PARM_DESC(mode,
- "Selects the desired default display mode in the format XxYxDepth (eg. 1024x768x16).");
+ "Selects the desired default display mode in the format XxYxDepth (eg. 1024x768x16).");
module_param(forcecrt2type, charp, 0000);
MODULE_PARM_DESC(forcecrt2type,
- "Force the second display output type. Possible values are NONE, LCD, TV, VGA, SVIDEO or COMPOSITE.");
+ "Force the second display output type. Possible values are NONE, LCD, TV, VGA, SVIDEO or COMPOSITE.");
module_param(vesa, int, 0000);
MODULE_PARM_DESC(vesa,
- "Selects the desired default display mode by VESA mode number (eg. 0x117).");
+ "Selects the desired default display mode by VESA mode number (eg. 0x117).");
module_param(filter, int, 0000);
MODULE_PARM_DESC(filter,
- "Selects TV flicker filter type (only for systems with a SiS301 video bridge). Possible values 0-7. Default: [no filter]).");
+ "Selects TV flicker filter type (only for systems with a SiS301 video bridge). Possible values 0-7. Default: [no filter]).");
static int __init xgifb_init(void)
{
--
2.1.4
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 6e8df20..b1fe17e 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -729,7 +729,6 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
if (xgifb_info->display2 == XGIFB_DISP_TV &&
xgifb_info->hasVB == HASVB_301) {
-
reg = xgifb_reg_get(XGIPART4, 0x01);
if (reg < 0xB0) { /* Set filter for XGI301 */
@@ -762,16 +761,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
0x01);
if (xgifb_info->TV_type == TVMODE_NTSC) {
-
xgifb_reg_and(XGIPART2, 0x3a, 0x1f);
if (xgifb_info->TV_plug == TVPLUG_SVIDEO) {
-
xgifb_reg_and(XGIPART2, 0x30, 0xdf);
} else if (xgifb_info->TV_plug
== TVPLUG_COMPOSITE) {
-
xgifb_reg_or(XGIPART2, 0x30, 0x20);
switch (xgifb_info->video_width) {
@@ -821,16 +817,13 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
}
} else if (xgifb_info->TV_type == TVMODE_PAL) {
-
xgifb_reg_and(XGIPART2, 0x3A, 0x1F);
if (xgifb_info->TV_plug == TVPLUG_SVIDEO) {
-
xgifb_reg_and(XGIPART2, 0x30, 0xDF);
} else if (xgifb_info->TV_plug
== TVPLUG_COMPOSITE) {
-
xgifb_reg_or(XGIPART2, 0x30, 0x20);
switch (xgifb_info->video_width) {
@@ -991,7 +984,6 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
}
if (isactive) {
-
XGIfb_pre_setmode(xgifb_info);
if (XGISetModeNew(xgifb_info, hw_info,
XGIbios_mode[xgifb_info->mode_idx].mode_no)
@@ -1274,7 +1266,6 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
}
if (!found_mode) {
-
pr_err("%dx%dx%d is no valid mode\n",
var->xres, var->yres, var->bits_per_pixel);
search_idx = 0;
@@ -1399,7 +1390,6 @@ static struct fb_ops XGIfb_ops = {
static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info)
{
-
u8 ChannelNum, tmp;
u8 reg = 0;
@@ -1595,7 +1585,6 @@ static int __init XGIfb_setup(char *options)
pr_info("Options: %s\n", options);
while ((this_opt = strsep(&options, ",")) != NULL) {
-
if (!*this_opt)
continue;
@@ -1977,7 +1966,6 @@ static int xgifb_probe(struct pci_dev *pdev,
&fb_info->var.vsync_len,
&fb_info->var.sync,
&fb_info->var.vmode)) {
-
if ((fb_info->var.vmode & FB_VMODE_MASK) ==
FB_VMODE_INTERLACED) {
fb_info->var.yres <<= 1;
--
2.1.4
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the previous line
Signed-off-by: Walt Feasel <[email protected]>
---
v2 makes changes to correct for email format patch submission
drivers/staging/xgifb/XGI_main_26.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 51b1194..9218c74 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -231,11 +231,11 @@ static int XGIfb_GetXG21DefaultLVDSModeIdx(struct xgifb_video_info *xgifb_info)
{
int i = 0;
- while ((XGIbios_mode[i].mode_no != 0)
- && (XGIbios_mode[i].xres <= xgifb_info->lvds_data.LVDSHDE)) {
- if ((XGIbios_mode[i].xres == xgifb_info->lvds_data.LVDSHDE)
- && (XGIbios_mode[i].yres == xgifb_info->lvds_data.LVDSVDE)
- && (XGIbios_mode[i].bpp == 8)) {
+ while ((XGIbios_mode[i].mode_no != 0) &&
+ (XGIbios_mode[i].xres <= xgifb_info->lvds_data.LVDSHDE)) {
+ if ((XGIbios_mode[i].xres == xgifb_info->lvds_data.LVDSHDE) &&
+ (XGIbios_mode[i].yres == xgifb_info->lvds_data.LVDSVDE) &&
+ (XGIbios_mode[i].bpp == 8)) {
return i;
}
i++;
@@ -384,9 +384,8 @@ static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex)
return -1;
break;
case 640:
- if ((XGIbios_mode[myindex].yres != 400)
- && (XGIbios_mode[myindex].yres
- != 480))
+ if ((XGIbios_mode[myindex].yres != 400) &&
+ (XGIbios_mode[myindex].yres != 480))
return -1;
break;
case 800:
@@ -1344,9 +1343,8 @@ static int XGIfb_pan_display(struct fb_var_screeninfo *var,
if (var->vmode & FB_VMODE_YWRAP) {
if (var->yoffset >= info->var.yres_virtual || var->xoffset)
return -EINVAL;
- } else if (var->xoffset + info->var.xres > info->var.xres_virtual
- || var->yoffset + info->var.yres
- > info->var.yres_virtual) {
+ } else if (var->xoffset + info->var.xres > info->var.xres_virtual ||
+ var->yoffset + info->var.yres > info->var.yres_virtual) {
return -EINVAL;
}
err = XGIfb_pan_var(var, info);
--
2.1.4