Commit febd32bc authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/easycap: replace if(false == var) with if (!var)

    's/(false == \([^ ]\+\))/(!\1)/g'

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 27d683ab
...@@ -1385,7 +1385,7 @@ field2frame(struct easycap *peasycap) ...@@ -1385,7 +1385,7 @@ field2frame(struct easycap *peasycap)
pad = peasycap->frame_buffer[kad][0].pgo; rad = PAGE_SIZE; pad = peasycap->frame_buffer[kad][0].pgo; rad = PAGE_SIZE;
odd = !!(peasycap->field_buffer[kex][0].kount); odd = !!(peasycap->field_buffer[kex][0].kount);
if (odd && (false == decimatepixel)) { if (odd && (!decimatepixel)) {
JOM(8, "initial skipping %4i bytes p.%4i\n", JOM(8, "initial skipping %4i bytes p.%4i\n",
w3/multiplier, mad); w3/multiplier, mad);
pad += (w3 / multiplier); rad -= (w3 / multiplier); pad += (w3 / multiplier); rad -= (w3 / multiplier);
...@@ -1400,7 +1400,7 @@ field2frame(struct easycap *peasycap) ...@@ -1400,7 +1400,7 @@ field2frame(struct easycap *peasycap)
* READ w2 BYTES FROM FIELD BUFFER, * READ w2 BYTES FROM FIELD BUFFER,
* WRITE w3 BYTES TO FRAME BUFFER * WRITE w3 BYTES TO FRAME BUFFER
*/ */
if (false == decimatepixel) { if (!decimatepixel) {
over = w2; over = w2;
do { do {
much = over; more = 0; much = over; more = 0;
...@@ -1489,7 +1489,7 @@ field2frame(struct easycap *peasycap) ...@@ -1489,7 +1489,7 @@ field2frame(struct easycap *peasycap)
* UNLESS IT IS THE LAST LINE OF AN ODD FRAME * UNLESS IT IS THE LAST LINE OF AN ODD FRAME
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
if ((false == odd) || (cz != wz)) { if (!odd || (cz != wz)) {
over = w3; over = w3;
do { do {
if (!rad) { if (!rad) {
...@@ -1514,7 +1514,7 @@ field2frame(struct easycap *peasycap) ...@@ -1514,7 +1514,7 @@ field2frame(struct easycap *peasycap)
* WRITE w3 / 2 BYTES TO FRAME BUFFER * WRITE w3 / 2 BYTES TO FRAME BUFFER
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
} else if (false == odd) { } else if (!odd) {
over = w2; over = w2;
do { do {
much = over; more = 0; margin = 0; mask = 0x00; much = over; more = 0; margin = 0; mask = 0x00;
...@@ -1641,12 +1641,12 @@ field2frame(struct easycap *peasycap) ...@@ -1641,12 +1641,12 @@ field2frame(struct easycap *peasycap)
SAM("ERROR: discrepancy %i in bytes read\n", c2 - cz); SAM("ERROR: discrepancy %i in bytes read\n", c2 - cz);
c3 = (mad + 1)*PAGE_SIZE - rad; c3 = (mad + 1)*PAGE_SIZE - rad;
if (false == decimatepixel) { if (!decimatepixel) {
if (bytesperpixel * cz != c3) if (bytesperpixel * cz != c3)
SAM("ERROR: discrepancy %i in bytes written\n", SAM("ERROR: discrepancy %i in bytes written\n",
c3 - (bytesperpixel * cz)); c3 - (bytesperpixel * cz));
} else { } else {
if (false == odd) { if (!odd) {
if (bytesperpixel * if (bytesperpixel *
cz != (4 * c3)) cz != (4 * c3))
SAM("ERROR: discrepancy %i in bytes written\n", SAM("ERROR: discrepancy %i in bytes written\n",
...@@ -1830,9 +1830,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -1830,9 +1830,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
switch (bytesperpixel) { switch (bytesperpixel) {
case 2: { case 2: {
if (false == decimatepixel) { if (!decimatepixel) {
memcpy(pad, pex, (size_t)much); memcpy(pad, pex, (size_t)much);
if (false == byteswaporder) { if (!byteswaporder) {
/* UYVY */ /* UYVY */
return 0; return 0;
} else { } else {
...@@ -1847,7 +1847,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -1847,7 +1847,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
return 0; return 0;
} }
} else { } else {
if (false == byteswaporder) { if (!byteswaporder) {
/* UYVY DECIMATED */ /* UYVY DECIMATED */
p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much; p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much;
while (pz > p2) { while (pz > p2) {
...@@ -1875,8 +1875,8 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -1875,8 +1875,8 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
} }
case 3: case 3:
{ {
if (false == decimatepixel) { if (!decimatepixel) {
if (false == byteswaporder) { if (!byteswaporder) {
/* RGB */ /* RGB */
while (pz > p2) { while (pz > p2) {
if (pr <= (p3 + bytesperpixel)) if (pr <= (p3 + bytesperpixel))
...@@ -2015,7 +2015,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -2015,7 +2015,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
} }
return 0; return 0;
} else { } else {
if (false == byteswaporder) { if (!byteswaporder) {
/* RGB DECIMATED */ /* RGB DECIMATED */
while (pz > p2) { while (pz > p2) {
if (pr <= (p3 + bytesperpixel)) if (pr <= (p3 + bytesperpixel))
...@@ -2164,8 +2164,8 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -2164,8 +2164,8 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
} }
case 4: case 4:
{ {
if (false == decimatepixel) { if (!decimatepixel) {
if (false == byteswaporder) { if (!byteswaporder) {
/* RGBA */ /* RGBA */
while (pz > p2) { while (pz > p2) {
if (pr <= (p3 + bytesperpixel)) if (pr <= (p3 + bytesperpixel))
...@@ -2324,7 +2324,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, ...@@ -2324,7 +2324,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
} }
return 0; return 0;
} else { } else {
if (false == byteswaporder) { if (!byteswaporder) {
/* /*
* RGBA DECIMATED * RGBA DECIMATED
*/ */
......
...@@ -177,7 +177,7 @@ easycap_alsa_complete(struct urb *purb) ...@@ -177,7 +177,7 @@ easycap_alsa_complete(struct urb *purb)
peasycap->dma_next = fragment_bytes; peasycap->dma_next = fragment_bytes;
JOM(8, "wrapped dma buffer\n"); JOM(8, "wrapped dma buffer\n");
} }
if (false == peasycap->microphone) { if (!peasycap->microphone) {
if (much > more) if (much > more)
much = more; much = more;
memcpy(prt->dma_area + memcpy(prt->dma_area +
......
...@@ -178,7 +178,7 @@ easyoss_complete(struct urb *purb) ...@@ -178,7 +178,7 @@ easyoss_complete(struct urb *purb)
much = PAGE_SIZE - (int)(paudio_buffer->pto - paudio_buffer->pgo); much = PAGE_SIZE - (int)(paudio_buffer->pto - paudio_buffer->pgo);
if (false == peasycap->microphone) { if (!peasycap->microphone) {
if (much > more) if (much > more)
much = more; much = more;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment