提交 2bb87c24 编写于 作者: M Mike Isely 提交者: Mauro Carvalho Chehab

V4L/DVB (8902): pvrusb2: Remove comment lines which refer to checkpatch's behavior

Signed-off-by: NMike Isely <isely@pobox.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 0cc11867
...@@ -141,10 +141,8 @@ int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr, int *valptr) ...@@ -141,10 +141,8 @@ int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr, int *valptr)
LOCK_TAKE(cptr->hdw->big_lock); do { LOCK_TAKE(cptr->hdw->big_lock); do {
if (cptr->info->type == pvr2_ctl_int) { if (cptr->info->type == pvr2_ctl_int) {
if (cptr->info->get_def_value) { if (cptr->info->get_def_value) {
/* Comment to keep checkpatch.pl quiet */
ret = cptr->info->get_def_value(cptr, valptr); ret = cptr->info->get_def_value(cptr, valptr);
} else { } else {
/* Comment to keep checkpatch.pl quiet */
*valptr = cptr->info->default_value; *valptr = cptr->info->default_value;
} }
} }
......
...@@ -408,7 +408,6 @@ static int ctrl_cropl_min_get(struct pvr2_ctrl *cptr, int *left) ...@@ -408,7 +408,6 @@ static int ctrl_cropl_min_get(struct pvr2_ctrl *cptr, int *left)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*left = cap->bounds.left; *left = cap->bounds.left;
...@@ -420,13 +419,10 @@ static int ctrl_cropl_max_get(struct pvr2_ctrl *cptr, int *left) ...@@ -420,13 +419,10 @@ static int ctrl_cropl_max_get(struct pvr2_ctrl *cptr, int *left)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*left = cap->bounds.left; *left = cap->bounds.left;
if (cap->bounds.width > cptr->hdw->cropw_val) { if (cap->bounds.width > cptr->hdw->cropw_val) {
/* This statement is present purely to shut up
checkpatch.pl */
*left += cap->bounds.width - cptr->hdw->cropw_val; *left += cap->bounds.width - cptr->hdw->cropw_val;
} }
return 0; return 0;
...@@ -437,7 +433,6 @@ static int ctrl_cropt_min_get(struct pvr2_ctrl *cptr, int *top) ...@@ -437,7 +433,6 @@ static int ctrl_cropt_min_get(struct pvr2_ctrl *cptr, int *top)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*top = cap->bounds.top; *top = cap->bounds.top;
...@@ -449,12 +444,10 @@ static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *top) ...@@ -449,12 +444,10 @@ static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *top)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*top = cap->bounds.top; *top = cap->bounds.top;
if (cap->bounds.height > cptr->hdw->croph_val) { if (cap->bounds.height > cptr->hdw->croph_val) {
/* Keep checkpatch.pl quiet */
*top += cap->bounds.height - cptr->hdw->croph_val; *top += cap->bounds.height - cptr->hdw->croph_val;
} }
return 0; return 0;
...@@ -465,12 +458,10 @@ static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *val) ...@@ -465,12 +458,10 @@ static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = 0; *val = 0;
if (cap->bounds.width > cptr->hdw->cropl_val) { if (cap->bounds.width > cptr->hdw->cropl_val) {
/* Keep checkpatch.pl quiet */
*val = cap->bounds.width - cptr->hdw->cropl_val; *val = cap->bounds.width - cptr->hdw->cropl_val;
} }
return 0; return 0;
...@@ -481,12 +472,10 @@ static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *val) ...@@ -481,12 +472,10 @@ static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = 0; *val = 0;
if (cap->bounds.height > cptr->hdw->cropt_val) { if (cap->bounds.height > cptr->hdw->cropt_val) {
/* Keep checkpatch.pl quiet */
*val = cap->bounds.height - cptr->hdw->cropt_val; *val = cap->bounds.height - cptr->hdw->cropt_val;
} }
return 0; return 0;
...@@ -497,7 +486,6 @@ static int ctrl_get_cropcapbl(struct pvr2_ctrl *cptr, int *val) ...@@ -497,7 +486,6 @@ static int ctrl_get_cropcapbl(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->bounds.left; *val = cap->bounds.left;
...@@ -509,7 +497,6 @@ static int ctrl_get_cropcapbt(struct pvr2_ctrl *cptr, int *val) ...@@ -509,7 +497,6 @@ static int ctrl_get_cropcapbt(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->bounds.top; *val = cap->bounds.top;
...@@ -521,7 +508,6 @@ static int ctrl_get_cropcapbw(struct pvr2_ctrl *cptr, int *val) ...@@ -521,7 +508,6 @@ static int ctrl_get_cropcapbw(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->bounds.width; *val = cap->bounds.width;
...@@ -533,7 +519,6 @@ static int ctrl_get_cropcapbh(struct pvr2_ctrl *cptr, int *val) ...@@ -533,7 +519,6 @@ static int ctrl_get_cropcapbh(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->bounds.height; *val = cap->bounds.height;
...@@ -545,7 +530,6 @@ static int ctrl_get_cropcapdl(struct pvr2_ctrl *cptr, int *val) ...@@ -545,7 +530,6 @@ static int ctrl_get_cropcapdl(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->defrect.left; *val = cap->defrect.left;
...@@ -557,7 +541,6 @@ static int ctrl_get_cropcapdt(struct pvr2_ctrl *cptr, int *val) ...@@ -557,7 +541,6 @@ static int ctrl_get_cropcapdt(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->defrect.top; *val = cap->defrect.top;
...@@ -569,7 +552,6 @@ static int ctrl_get_cropcapdw(struct pvr2_ctrl *cptr, int *val) ...@@ -569,7 +552,6 @@ static int ctrl_get_cropcapdw(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->defrect.width; *val = cap->defrect.width;
...@@ -581,7 +563,6 @@ static int ctrl_get_cropcapdh(struct pvr2_ctrl *cptr, int *val) ...@@ -581,7 +563,6 @@ static int ctrl_get_cropcapdh(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->defrect.height; *val = cap->defrect.height;
...@@ -593,7 +574,6 @@ static int ctrl_get_cropcappan(struct pvr2_ctrl *cptr, int *val) ...@@ -593,7 +574,6 @@ static int ctrl_get_cropcappan(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->pixelaspect.numerator; *val = cap->pixelaspect.numerator;
...@@ -605,7 +585,6 @@ static int ctrl_get_cropcappad(struct pvr2_ctrl *cptr, int *val) ...@@ -605,7 +585,6 @@ static int ctrl_get_cropcappad(struct pvr2_ctrl *cptr, int *val)
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info; struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw); int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) { if (stat != 0) {
/* Keep checkpatch.pl quiet */
return stat; return stat;
} }
*val = cap->pixelaspect.denominator; *val = cap->pixelaspect.denominator;
...@@ -3008,12 +2987,10 @@ void pvr2_hdw_execute_tuner_poll(struct pvr2_hdw *hdw) ...@@ -3008,12 +2987,10 @@ void pvr2_hdw_execute_tuner_poll(struct pvr2_hdw *hdw)
static int pvr2_hdw_check_cropcap(struct pvr2_hdw *hdw) static int pvr2_hdw_check_cropcap(struct pvr2_hdw *hdw)
{ {
if (!hdw->cropcap_stale) { if (!hdw->cropcap_stale) {
/* Keep checkpatch.pl quiet */
return 0; return 0;
} }
pvr2_i2c_core_status_poll(hdw); pvr2_i2c_core_status_poll(hdw);
if (hdw->cropcap_stale) { if (hdw->cropcap_stale) {
/* Keep checkpatch.pl quiet */
return -EIO; return -EIO;
} }
return 0; return 0;
...@@ -3027,7 +3004,6 @@ int pvr2_hdw_get_cropcap(struct pvr2_hdw *hdw, struct v4l2_cropcap *pp) ...@@ -3027,7 +3004,6 @@ int pvr2_hdw_get_cropcap(struct pvr2_hdw *hdw, struct v4l2_cropcap *pp)
LOCK_TAKE(hdw->big_lock); LOCK_TAKE(hdw->big_lock);
stat = pvr2_hdw_check_cropcap(hdw); stat = pvr2_hdw_check_cropcap(hdw);
if (!stat) { if (!stat) {
/* Keep checkpatch.pl quiet */
memcpy(pp, &hdw->cropcap_info, sizeof(hdw->cropcap_info)); memcpy(pp, &hdw->cropcap_info, sizeof(hdw->cropcap_info));
} }
LOCK_GIVE(hdw->big_lock); LOCK_GIVE(hdw->big_lock);
......
...@@ -254,12 +254,8 @@ static void set_crop(struct pvr2_hdw *hdw) ...@@ -254,12 +254,8 @@ static void set_crop(struct pvr2_hdw *hdw)
static int check_crop(struct pvr2_hdw *hdw) static int check_crop(struct pvr2_hdw *hdw)
{ {
/* The "0 +" stupidity is present only to get checkpatch.pl to return (hdw->cropl_dirty || hdw->cropt_dirty ||
shut up. I _want_ those parantheses present so that the hdw->cropw_dirty || hdw->croph_dirty);
two lines automatically line up in my editor. I despise
checkpatch.pl. */
return 0 + (hdw->cropl_dirty || hdw->cropt_dirty ||
hdw->cropw_dirty || hdw->croph_dirty);
} }
const struct pvr2_i2c_op pvr2_i2c_op_v4l2_crop = { const struct pvr2_i2c_op pvr2_i2c_op_v4l2_crop = {
......
...@@ -992,8 +992,6 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) ...@@ -992,8 +992,6 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
hdw->i2c_func[0x18] = i2c_black_hole; hdw->i2c_func[0x18] = i2c_black_hole;
} else if (ir_mode[hdw->unit_number] == 1) { } else if (ir_mode[hdw->unit_number] == 1) {
if (hdw->hdw_desc->ir_scheme == PVR2_IR_SCHEME_24XXX) { if (hdw->hdw_desc->ir_scheme == PVR2_IR_SCHEME_24XXX) {
/* This comment is present PURELY to get
checkpatch.pl to STFU. Lovely, eh? */
hdw->i2c_func[0x18] = i2c_24xxx_ir; hdw->i2c_func[0x18] = i2c_24xxx_ir;
} }
} }
......
...@@ -158,7 +158,6 @@ static ssize_t show_def(struct device *class_dev, ...@@ -158,7 +158,6 @@ static ssize_t show_def(struct device *class_dev,
pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %d, stat=%d", pvr2_sysfs_trace("pvr2_sysfs(%p) show_def(cid=%d) is %d, stat=%d",
cip->chptr, cip->ctl_id, val, ret); cip->chptr, cip->ctl_id, val, ret);
if (ret < 0) { if (ret < 0) {
/* Keep checkpatch.pl quiet */
return ret; return ret;
} }
return scnprintf(buf, PAGE_SIZE, "%d\n", val); return scnprintf(buf, PAGE_SIZE, "%d\n", val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册