* [PATCH] staging: sm750fb: coding style fixes
@ 2015-07-14 6:58 Vinay Simha BN
2015-07-14 13:26 ` Sudip Mukherjee
0 siblings, 1 reply; 2+ messages in thread
From: Vinay Simha BN @ 2015-07-14 6:58 UTC (permalink / raw)
To: linux-fbdev
kernel coding style fixes for below messages from
scripts/checkpatch.pl
WARNING: line over 80 character
WARNING: Possible unnecessary 'out of memory' message
WARNING: unnecessary whitespace before a quoted newline
WARNING: Avoid line continuations in quoted strings
ERROR: "foo * bar" should be "foo *bar"
ERROR: do not initialise globals to 0 or NULL
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 49 ++++++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 6b642d7..12214f7 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -24,7 +24,7 @@
#include "modedb.h"
-int smi_indent = 0;
+int smi_indent;
/*
@@ -47,9 +47,9 @@ static int g_noaccel;
static int g_nomtrr;
static const char *g_fbmode[] = {NULL, NULL};
static const char *g_def_fbmode = "800x600-16@60";
-static char *g_settings = NULL;
+static char *g_settings;
static int g_dualview;
-static char *g_option = NULL;
+static char *g_option;
static const struct fb_videomode lynx750_ext[] = {
@@ -150,12 +150,16 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
u16 fg, bg;
fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800))|
- ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5)|
- ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
+ ((info->cmap.green[fbcursor->image.fg_color]
+ & 0xfc00) >> 5)|
+ ((info->cmap.blue[fbcursor->image.fg_color]
+ & 0xf800) >> 11);
bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800))|
- ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5)|
- ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
+ ((info->cmap.green[fbcursor->image.bg_color] &
+ 0xfc00) >> 5)|
+ ((info->cmap.blue[fbcursor->image.bg_color] &
+ 0xf800) >> 11);
cursor->setColor(cursor, fg, bg);
}
@@ -194,7 +198,8 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
pitch = info->fix.line_length;
Bpp = info->var.bits_per_pixel >> 3;
- color = (Bpp = 1)?region->color:((u32 *)info->pseudo_palette)[region->color];
+ color = (Bpp = 1) ?
+ region->color : ((u32 *)info->pseudo_palette)[region->color];
rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR:HW_ROP2_COPY;
/*
@@ -445,7 +450,8 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
pci_disable_device(pdev);
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
if (ret) {
- pr_err("error:%d occurred in pci_set_power_state\n", ret);
+ pr_err("error:%d occurred in
+ pci_set_power_state\n", ret);
return ret;
}
}
@@ -699,7 +705,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
output = &par->output;
crtc = &par->crtc;
- crtc->vidmem_size = (share->dual)?share->vidmem_size>>1:share->vidmem_size;
+ crtc->vidmem_size = (share->dual) ?
+ share->vidmem_size>>1 : share->vidmem_size;
/* setup crtc and output member */
spec_share->hwCursor = g_hwcursor;
@@ -716,10 +723,12 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
output->proc_setMode = hw_sm750_output_setMode;
output->proc_checkMode = hw_sm750_output_checkMode;
- output->proc_setBLANK = (share->revid = SM750LE_REVISION_ID)?hw_sm750le_setBLANK:hw_sm750_setBLANK;
+ output->proc_setBLANK = (share->revid = SM750LE_REVISION_ID) ?
+ hw_sm750le_setBLANK : hw_sm750_setBLANK;
output->clear = hw_sm750_output_clear;
/* chip specific phase */
- share->accel.de_wait = (share->revid = SM750LE_REVISION_ID)?hw_sm750le_deWait : hw_sm750_deWait;
+ share->accel.de_wait = (share->revid = SM750LE_REVISION_ID) ?
+ hw_sm750le_deWait : hw_sm750_deWait;
switch (spec_share->state.dataflow) {
case sm750_simul_pri:
output->paths = sm750_pnc;
@@ -743,7 +752,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
} else {
output->paths = sm750_crt;
crtc->channel = sm750_secondary;
- /* not consider of padding stuffs for oScreen,need fix */
+ /* not consider of padding stuffs
+ for oScreen,need fix */
crtc->oScreen = (share->vidmem_size >> 1);
crtc->vScreen = share->pvMem + crtc->oScreen;
}
@@ -757,7 +767,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
} else {
output->paths = sm750_crt;
crtc->channel = sm750_primary;
- /* not consider of padding stuffs for oScreen,need fix */
+ /* not consider of padding stuffs
+ for oScreen,need fix */
crtc->oScreen = (share->vidmem_size >> 1);
crtc->vScreen = share->pvMem + crtc->oScreen;
}
@@ -895,7 +906,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
/* some member of info->var had been set by fb_find_mode */
- pr_info("Member of info->var is :\n\
+ pr_info("Member of info->var is :\n
xres=%d\n\
yres=%d\n\
xres_virtual=%d\n\
@@ -967,7 +978,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
var->accel_flags = 0;
var->vmode = FB_VMODE_NONINTERLACED;
- pr_debug("#1 show info->cmap : \nstart=%d,len=%d,red=%p,green=%p,blue=%p,transp=%p\n",
+ pr_debug("#1 show info->cmap :\nstart=%d,len=%d,red=%p,green=%p,blue=%p,transp=%p\n",
info->cmap.start, info->cmap.len,
info->cmap.red, info->cmap.green, info->cmap.blue,
info->cmap.transp);
@@ -1087,7 +1098,7 @@ NO_PARAM:
}
static int lynxfb_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id * ent)
+ const struct pci_device_id *ent)
{
struct fb_info *info[] = {NULL, NULL};
struct lynx_share *share = NULL;
@@ -1108,10 +1119,8 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
spec_offset = offsetof(struct sm750_share, share);
spec_share = kzalloc(sizeof(*spec_share), GFP_KERNEL);
- if (!spec_share) {
- pr_err("Could not allocate memory for share.\n");
+ if (!spec_share)
goto err_share;
- }
/* setting share structure */
share = (struct lynx_share *)(&(spec_share->share));
--
2.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: sm750fb: coding style fixes
2015-07-14 6:58 [PATCH] staging: sm750fb: coding style fixes Vinay Simha BN
@ 2015-07-14 13:26 ` Sudip Mukherjee
0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-07-14 13:26 UTC (permalink / raw)
To: linux-fbdev
On Tue, Jul 14, 2015 at 12:16:11PM +0530, Vinay Simha BN wrote:
> kernel coding style fixes for below messages from
> scripts/checkpatch.pl
>
> WARNING: line over 80 character
> WARNING: Possible unnecessary 'out of memory' message
> WARNING: unnecessary whitespace before a quoted newline
> WARNING: Avoid line continuations in quoted strings
> ERROR: "foo * bar" should be "foo *bar"
> ERROR: do not initialise globals to 0 or NULL
These are too many changes in a single patch. Please only do one change
in a patch. And your patch is not applying also for a change done by
eb0f4271ca18 ("drivers: staging: sm750fb: Fix "'foo * bar' should be
'foo *bar'" errors")
Please refresh your patch against staging-testing tree.
regards
sudip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-14 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 6:58 [PATCH] staging: sm750fb: coding style fixes Vinay Simha BN
2015-07-14 13:26 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).