Re: [PATCH 0/2] Staging: most: aim-sound: sound.c: coding style

2017-12-28 Thread Ozgur
29.12.2017, 02:07, "Philippe Loctaux" :
> Fixes checkpatch coding style issues.

Hello,

how can i see is changed/patched code lines?

Ozgur

> Philippe Loctaux (2):
>   Staging: most: aim-sound: sound.c: fixed an alignment issue
>   Staging: most: aim-sound: sound.c: removed unnecessary parentheses
>
>  drivers/staging/most/aim-sound/sound.c | 14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> --
> 2.15.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses

2017-12-28 Thread Ozgur


29.12.2017, 02:07, "Philippe Loctaux" :
> Removed unnecessary parentheses in a if statement.
>
> Signed-off-by: Philippe Loctaux 
> ---
>  drivers/staging/most/aim-sound/sound.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/most/aim-sound/sound.c 
> b/drivers/staging/most/aim-sound/sound.c
> index ab2b0d833..0e79a4898 100644
> --- a/drivers/staging/most/aim-sound/sound.c
> +++ b/drivers/staging/most/aim-sound/sound.c
> @@ -166,7 +166,7 @@ static struct channel *get_channel(struct most_interface 
> *iface,
>  struct channel *channel, *tmp;
>
>  list_for_each_entry_safe(channel, tmp, &dev_list, list) {
> - if ((channel->iface == iface) && (channel->id == channel_id))
> + if (channel->iface == iface && channel->id == channel_id)
>  return channel;
>  }

Hello,

I think this patch is not good, the code will not work. Please should 
understand in && operator and () why used with C.

Ozgur

> --
> 2.15.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: fbtft: fix checkpatch error and udelay

2016-12-19 Thread Ozgur Karatas
19.12.2016, 08:35, "Greg KH" :
> On Sun, Dec 18, 2016 at 11:47:30AM -0600, Scott Matheina wrote:
>>  These changes where identified by checkpatch.pl as needed changes to
>>  align the code with the linux development coding style. The several
>>  lines of text where aligned with the precending parenthesis.
>>
>>  Signed-off-by: Scott Matheina 
>>
>>   Changes to be committed:
>>  modified: drivers/staging/fbtft/fb_agm1264k-fl.c
>
> Why are these lines in the changelog text?

I checked with checkpatch script to code and give a some errors.
So, the code have to "udelay(20)".

udelay(20);

I read to Documentation/timers/timers-howto.txt and
this line incorrect, usleep_range need must be add defined U_DELAY and fixed.

udelay(U_DELAY, U_DELAY + 10);

finally:

$ checkpatch.pl  drivers/staging/fbtft/fb_agm1264k-fl.c  | grep total
total: 0 errors

Signed-off-by: Ozgur Karatas 

---
 drivers/staging/fbtft/fb_agm1264k-fl.c | 31 ---
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c 
b/drivers/staging/fbtft/fb_agm1264k-fl.c
index 7561385..2d46d03 100644
--- a/drivers/staging/fbtft/fb_agm1264k-fl.c
+++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
@@ -36,10 +36,11 @@
 #define FPS20
 
 #define EPIN   gpio.wr
-#define RS gpio.dc
-#define RW gpio.aux[2]
-#define CS0gpio.aux[0]
-#define CS1gpio.aux[1]
+#define RS gpio.dc
+#define RW gpio.aux[2]
+#define CS0gpio.aux[0]
+#define CS1gpio.aux[1]
+#define U_DELAY
 
 /* diffusing error (Floyd-Steinberg) */
 #define DIFFUSING_MATRIX_WIDTH 2
@@ -94,7 +95,7 @@ static void reset(struct fbtft_par *par)
dev_dbg(par->info->device, "%s()\n", __func__);
 
gpio_set_value(par->gpio.reset, 0);
-   udelay(20);
+   udelay(U_DELAY, U_DELAY + 10);
gpio_set_value(par->gpio.reset, 1);
mdelay(120);
 }
@@ -185,8 +186,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, 
...)
buf[i] = (u8)va_arg(args, unsigned int);
 
va_end(args);
-   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,
-   par->info->device, u8, buf, len, "%s: ", __func__);
+   fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, 
u8, buf, len, "%s: ", __func__);
}
 
va_start(args, len);
@@ -245,8 +245,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int 
ys, int xe, int ye)
 }
 
 static void
-construct_line_bitmap(struct fbtft_par *par, u8 *dest, signed short *src,
-   int xs, int xe, int y)
+construct_line_bitmap(struct fbtft_par *par, u8 *dest, signed short *src, int 
xs, int xe, int y)
 {
int x, i;
 
@@ -326,9 +325,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, 
size_t len)
signed char coeff;
 
/* skip pixels out of zone */
-   if (x + i < 0 ||
-   x + i >= par->info->var.xres
-   || y + j >= par->info->var.yres)
+   if (x + i < 0 || x + i >= 
par->info->var.xres || y + j >= par->info->var.yres)
continue;
write_pos = &convert_buf[
(y + j) * par->info->var.xres +
@@ -354,8 +351,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, 
size_t len)
for (y = addr_win.ys_page; y <= addr_win.ye_page; ++y) {
/* left half of display */
if (addr_win.xs < par->info->var.xres / 2) {
-   construct_line_bitmap(par, buf, convert_buf,
-   addr_win.xs, par->info->var.xres / 2, y);
+   construct_line_bitmap(par, buf, convert_buf, 
addr_win.xs, par->info->var.xres / 2, y);
 
len = par->info->var.xres / 2 - addr_win.xs;
 
@@ -375,9 +371,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, 
size_t len)
}
/* right half of display */
if (addr_win.xe >= par->info->var.xres / 2) {
-   construct_line_bitmap(par, buf,
-   convert_buf, par->info->var.xres / 2,
-   addr_win.xe + 1, y);
+   construct_line_bitmap(par, buf, convert_buf, 
par->info->var.xres / 2, addr_win.xe + 1, y);