Re: [PATCH] staging: erofs: adds a space around '*'

2018-10-09 Thread DaeSeok Youn
2018년 10월 8일 (월) 오후 9:37, Gustavo A. R. Silva 님이 작성: > > Hi, > > On 10/8/18 1:45 PM, Daeseok Youn wrote: > > fix checkpatch.pl error: > > ERROR: need consistent spacing around '*' (ctx:WxV) > > + memcpy(vin + PAGE_SIZE *i, t, PAGE_SIZE); >

[PATCH] staging: erofs: adds a space around '*'

2018-10-08 Thread Daeseok Youn
fix checkpatch.pl error: ERROR: need consistent spacing around '*' (ctx:WxV) + memcpy(vin + PAGE_SIZE *i, t, PAGE_SIZE); Signed-off-by: Daeseok Youn --- drivers/staging/erofs/unzip_vle_lz4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 3/3] staging: atomisp: move mipi_info assignment to next line in __get_asd_from_port()

2017-04-07 Thread Daeseok Youn
The line which is initializing mipi_info variable is too long to read. It would be placed in next line. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- This series of patches are related to previous patches: [1] https://lkml.org/lkml/2017/3/27/159 [2] https://lkml.org/lkml/2017/3/3

[PATCH 2/3] staging: atomisp: replace ">asd[i]" with "asd" in __get_asd_from_port()

2017-04-07 Thread Daeseok Youn
The address of isp->asd[i] is already assigned to local "asd" variable. ">asd[i]" would be replaced with just "asd". Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- This series of patches are related to previous patches: [1] https://lkml.org/lk

[PATCH 1/3] staging: atomisp: remove enable_isp_irq function and add disable_isp_irq

2017-04-07 Thread Daeseok Youn
ction only. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- This series of patches are related to previous patches: [1] https://lkml.org/lkml/2017/3/27/159 [2] https://lkml.org/lkml/2017/3/30/1068 [3] https://lkml.org/lkml/2017/3/30/1069 .../media/atomisp/pci/atomisp2/atomisp_

[PATCH 2/2 V2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread Daeseok Youn
Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: this patch was rebased since the patch 1/2 was improved. ...

[PATCH 1/2 V2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Daeseok Youn
The condition line in if-statement is needed to be shorthen to improve readability. Add a new definition to check the CHT with atomisp_device structure. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: replace the assigment line with macro to check CHT type. drivers/staging

Re: [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread DaeSeok Youn
2017-03-30 19:52 GMT+09:00 Alan Cox <a...@linux.intel.com>: > On Thu, 2017-03-30 at 15:24 +0900, Daeseok Youn wrote: >> The condition line in if-statement is needed to be shorthen to >> improve readability. >> >> Signed-off-by: Daeseok Youn <daeseok.y...@gmai

Re: [PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread DaeSeok Youn
2017-03-30 16:19 GMT+09:00 walter harms <wha...@bfs.de>: > > > Am 30.03.2017 08:25, schrieb Daeseok Youn: >> Define new local variable to reduce the number of reference. >> The new local variable is added to save the addess of dfs >> and used in atomisp_freq_sca

[PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread Daeseok Youn
Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c

[PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Daeseok Youn
The condition line in if-statement is needed to be shorthen to improve readability. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH] staging: atomisp: fix an issue timeout value for checking error

2017-03-27 Thread Daeseok Youn
The timeout variable could be zero even if the bits has expected result. The checking expected bits again would be better instead whether the timeout value is zero or not. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd

[PATCH 4/4 V2] staging: atomisp: remove redudant condition in if-statement

2017-03-20 Thread Daeseok Youn
The V4L2_FIELD_ANY is zero, so the (!field) is same meaning with (field == V4L2_FIELD_ANY) in if-statement. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: one(2/4) of this series was updated so I tried to send them again. drivers/staging/media/atomisp/pci/atomisp2/atomisp

[PATCH 3/4 V2] staging: atomisp: remove useless condition in if-statements

2017-03-20 Thread Daeseok Youn
PE_ID_COPY' or not. It should be removed. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: one(2/4) of this series was updated so I tried to send them again. drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 2/4 V2] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread Daeseok Youn
If v4l2_subdev_call() gets the global frame interval values, it returned 0 and it could be checked whether numerator is zero or not. If the numerator is not zero, the fps could be calculated in this function. If not, it just returns 0. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com>

[PATCH 1/4 V2] staging: atomisp: remove else statement after return

2017-03-20 Thread Daeseok Youn
It doesn't need to have else statement after return. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: one(2/4) of this series was updated so I tried to send them again. drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

Re: [PATCH 2/4] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread DaeSeok Youn
2017-03-20 22:11 GMT+09:00 walter harms <wha...@bfs.de>: > > > Am 20.03.2017 13:51, schrieb DaeSeok Youn: >> 2017-03-20 21:04 GMT+09:00 walter harms <wha...@bfs.de>: >>> >>> >>> Am 20.03.2017 11:59, schrieb Daeseok Youn: >>&g

Re: [PATCH 2/4] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread DaeSeok Youn
2017-03-20 21:04 GMT+09:00 walter harms <wha...@bfs.de>: > > > Am 20.03.2017 11:59, schrieb Daeseok Youn: >> If v4l2_subdev_call() gets the global frame interval values, >> it returned 0 and it could be checked whether numerator is zero or not. >> >> If t

[PATCH 4/4] staging: atomisp: remove redudant condition in if-statement

2017-03-20 Thread Daeseok Youn
The V4L2_FIELD_ANY is zero, so the (!field) is same meaning with (field == V4L2_FIELD_ANY) in if-statement. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 3/4] staging: atomisp: remove useless condition in if-statements

2017-03-20 Thread Daeseok Youn
PE_ID_COPY' or not. It should be removed. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drive

[PATCH 2/4] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread Daeseok Youn
If v4l2_subdev_call() gets the global frame interval values, it returned 0 and it could be checked whether numerator is zero or not. If the numerator is not zero, the fps could be calculated in this function. If not, it just returns 0. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.

[PATCH 1/4] staging: atomisp: remove else statement after return

2017-03-20 Thread Daeseok Youn
It doesn't need to have else statement after return. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/at

[PATCH 3/4] staging: atomisp: remove useless #ifdef ISP2401 on top of atomisp_cmd.c

2017-03-15 Thread Daeseok Youn
There is no reason to have "#ifdef ISP2401" condition on top of atomisp_cmd.c file Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atom

[PATCH 4/4] staging: atomisp: fix "alignment should match open parenthesis"

2017-03-15 Thread Daeseok Youn
Fix checkpatch.pl issues in atomisp_cmd.c : "CHECK: Alignment should match open parenthesis" Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 179 +++-- 1 file changed, 90 insertions(+), 89 deletion

[PATCH 2/4] staging: atomisp: fix inconsistent indenting

2017-03-15 Thread Daeseok Youn
Fix warnings from the smatch tool atomisp_cmd.c:5698 atomisp_set_fmt_to_snr() warn: inconsistent indenting atomisp_cmd.c:5714 atomisp_set_fmt_to_snr() warn: inconsistent indenting Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/media/atomisp/pci/at

[PATCH 1/4] staging: atomisp: fix unsigned int comparison with less than zero

2017-03-14 Thread Daeseok Youn
Fix warnings from the smatch tool atomisp_cmd.c:2649 atomisp_set_array_res() warn: unsigned 'config->width' is never less than zero. atomisp_cmd.c:2650 atomisp_set_array_res() warn: unsigned 'config->height' is never less than zero. Signed-off-by: Daeseok Youn <daeseok.y...@

[PATCH 2/2 V2] staging: dgnc: remove useless switch-case statements

2017-03-13 Thread Daeseok Youn
The dgnc_tty_send_break() has a switch-case condition for msec. It is no use except case -1. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: The two patches in previous series are merged into one patch. drivers/staging/dgnc/dgnc_tty.c | 10 +- 1 file changed, 1 ins

[PATCH 1/2 V2] staging: dgnc: ch->ch_bd is already assigned to bd variable

2017-03-13 Thread Daeseok Youn
The bd variables in functions are already assigned from ch->ch_bd but it is not used in those functions except checking NULL. The ch->ch_bd could be replaced with bd variable. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: Patches in previous series are splited

Re: [PATCH 3/3] staging: dngc: ch->ch_bd is already assigned to bd variable

2017-03-13 Thread DaeSeok Youn
2017-03-14 7:26 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Sun, Mar 12, 2017 at 11:47:28PM +0900, Daeseok Youn wrote: >> The bd variable in dgnc_tty_digiseta() is assigned with >> ch->ch_bd but it is not used in this function except checking NULL. >> T

Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset

2017-03-13 Thread DaeSeok Youn
2017-03-14 2:54 GMT+09:00 Alan Cox <a...@linux.intel.com>: > > On Mon, 2017-03-13 at 19:54 +0900, Daeseok Youn wrote: > > If the atomisp_kernel_zalloc() has "true" as a second parameter, it > > tries to allocate zeroing memory from kmalloc(vmalloc) and memset. &g

Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset

2017-03-13 Thread DaeSeok Youn
2017-03-13 23:07 GMT+09:00 DaeSeok Youn <daeseok.y...@gmail.com>: > 2017-03-13 20:51 GMT+09:00 Dan Carpenter <dan.carpen...@oracle.com>: >> On Mon, Mar 13, 2017 at 07:54:21PM +0900, Daeseok Youn wrote: >>> If the atomisp_kernel_zalloc() has "true" as a se

Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset

2017-03-13 Thread DaeSeok Youn
2017-03-13 20:51 GMT+09:00 Dan Carpenter <dan.carpen...@oracle.com>: > On Mon, Mar 13, 2017 at 07:54:21PM +0900, Daeseok Youn wrote: >> If the atomisp_kernel_zalloc() has "true" as a second parameter, it >> tries to allocate zeroing memory from kmalloc(vmalloc) a

[PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset

2017-03-13 Thread Daeseok Youn
an be used with atomisp_kernel_zalloc(, false); Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- I think kvmalloc() or kvzalloc() can be used to allocate memory if there is no reason to use vmalloc() when the requested bytes is over PAGE_SIZE. .../media/atomisp/pci/atomisp2/atomisp_

[PATCH 3/3] staging: dngc: ch->ch_bd is already assigned to bd variable

2017-03-12 Thread Daeseok Youn
The bd variable in dgnc_tty_digiseta() is assigned with ch->ch_bd but it is not used in this function except checking NULL. The ch->ch_bd could be replaced with bd variable in dgnc_tty_digiseta() Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_tty

[PATCH 2/3] staging: dgnc: remove useless switch-case statements

2017-03-12 Thread Daeseok Youn
The dgnc_tty_send_break() has a switch-case condition for msec. It is no use except case -1. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_tty.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_t

[PATCH 1/3] staging: dgnc: ch->ch_bd is already assigned to bd variable

2017-03-12 Thread Daeseok Youn
The bd variable in dgnc_tty_send_break() is assigned with ch->ch_bd but it is not used in this function except checking NULL. The ch->ch_bd could be replaced with bd variable in dgnc_tty_send_break() Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dg

[PATCH] staging: dgnc: re-arrange functions for removing forward declarations

2016-11-10 Thread Daeseok Youn
Re-arrange the functions for removing forward declarations in dgnc_driver.c Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- I've checked the object size of dgnc_driver.c before and after. It has same size after re-arranging functions. drivers/staging/dgnc/dgnc_driver.c

[PATCH 11/11 RESEND] staging: dgnc: introduce find_board_by_major()

2016-09-25 Thread Daeseok Youn
It was used to get a board structure with dgnc_BoardsByMajor array. But this driver already has the array for managing initialized board as dgap_board[]. It can be used for searching the board structure by major number. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND

[PATCH 10/11 RESEND] staging: dgnc: remove useless variables

2016-09-25 Thread Daeseok Youn
the dgnc_cleanup_tty() cannot be called with unregistered tty. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. drivers/staging/dgnc/dgnc_driver.h | 3 -- drivers/staging/dgnc/dgnc_tty.c

[PATCH 09/11 V2 RESEND] staging: dgnc: rename dgnc_tty_uninit() to dgnc_cleanup_tty()

2016-09-25 Thread Daeseok Youn
The dgnc_tty_uninit() doesn't match with dgnc_tty_init() at all. And also the dgnc_cleanup_tty() is only called for exiting the module. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sen

[PATCH 08/11 RESEND] staging: dgnc: introduce the dgnc_free_irq()

2016-09-25 Thread Daeseok Youn
The dgnc_free_irq() will free the requested IRQ from the dgnc_request_irq(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. drivers/staging/dgnc/dgnc_driver.c | 11 ++- 1 file c

[PATCH 07/11 V2 RESEND] staging: dgnc: rename dgnc_finalize_board_init() to dgnc_request_irq()

2016-09-25 Thread Daeseok Youn
The dgnc_finalize_board_init() function has only job for requesting the IRQ. It should be renamed to dgnc_request_irq() Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. V2: The subjec

[PATCH 06/11 RESEND] staging: dgnc: introduce the dgnc_tty_unregister()

2016-09-25 Thread Daeseok Youn
The dgnc_tty_unregister() will be called when the dgnc_tty_register() is failed. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. drivers/staging/dgnc/dgnc_driver.c | 7 +-- drivers/s

[PATCH 05/11 V2 RESEND] staging: dgnc: move functions unrelated with dgnc_found_board()

2016-09-25 Thread Daeseok Youn
The functions related with tty device initialization are needed to be moved from dgnc_found_board() to dgnc_init_one(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. V2: The subjec

[PATCH 04/11] staging: dgnc: kfree for board structure in dgnc_found_board()

2016-09-25 Thread Daeseok Youn
The board structure should be freed when any function was failed in dgnc_found_board(). And the board strucure will be stored into dgnc_board array when the dgnc_found_board() function has no error. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series

[PATCH 03/11 V2 RESEND] staging: dgnc: missing NULL check for ioremap in dgnc_do_remap()

2016-09-25 Thread Daeseok Youn
The ioremap() function can be failed, so it need to have error handling in dgnc_do_remap(). And also the return type of dgnc_do_remap() should be changed from "void" to "int" Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series ag

[PATCH 02/11 RESEND] staging: dgnc: remove useless message buffer

2016-09-25 Thread Daeseok Youn
There is a temporary message buffer for the boot message in dgnc_found_board() but the buffer was not used anywhere in dgnc driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series again. Because I missed some patches when the V2 patches sent. d

[PATCH 01/11 V2 RESEND] staging: dgnc: remove redundant initialization for channel array

2016-09-25 Thread Daeseok Youn
The channel array in board_t was initialized in dgnc_found_board() with NULL. But the channel is going to initialize in dgnc_tty_init(). So the channel array doesn't need to set NULL for initailization. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: send the whole series

Re: [PATCH 01/11 V2] staging: dgnc: remove redundant initialization for channel array

2016-09-25 Thread DaeSeok Youn
2016-09-23 21:15 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Fri, Sep 23, 2016 at 10:25:02AM +0900, Daeseok Youn wrote: >> The channel array in board_t was initialized in dgnc_found_board() >> with NULL. But the channel is going to initialize in dgnc_tty_init() >

[PATCH 09/11 V2] staging: dgnc: rename dgnc_tty_uninit() to dgnc_cleanup_tty()

2016-09-22 Thread Daeseok Youn
The dgnc_tty_uninit() doesn't match with dgnc_tty_init() at all. And also the dgnc_cleanup_tty() is only called for exiting the module. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: the subject line was cut off, I put it completely. drivers/staging/dgnc/dgnc_driver

[PATCH 07/11 V2] staging: dgnc: rename dgnc_finalize_board_init() to dgnc_request_irq()

2016-09-22 Thread Daeseok Youn
The dgnc_finalize_board_init() function has only job for requesting the IRQ. It should be renamed to dgnc_request_irq() Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: the subject line was cut off, I put it completely. drivers/staging/dgnc/dgnc_driver.c | 6 +++--- 1 file c

[PATCH 05/11 V2] staging: dgnc: move functions unrelated with dgnc_found_board()

2016-09-22 Thread Daeseok Youn
The functions related with tty device initialization are needed to be moved from dgnc_found_board() to dgnc_init_one(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: the subject line was cut off, I put it completely. drivers/staging/dgnc/dgnc_driver.

[PATCH 04/11 V2] staging: dgnc: kfree for board structure in dgnc_found_board()

2016-09-22 Thread Daeseok Youn
The board structure should be freed when any function was failed in dgnc_found_board(). And the board strucure will be stored into dgnc_board array when the dgnc_found_board() function has no error. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: the subject line was cut off,

[PATCH 03/11 V2] staging: dgnc: missing NULL check for ioremap in dgnc_do_remap()

2016-09-22 Thread Daeseok Youn
The ioremap() function can be failed, so it need to have error handling in dgnc_do_remap(). And also the return type of dgnc_do_remap() should be changed from "void" to "int" Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: the subject line was cut off, I pu

[PATCH 01/11 V2] staging: dgnc: remove redundant initialization for channel array

2016-09-22 Thread Daeseok Youn
The channel array in board_t was initialized in dgnc_found_board() with NULL. But the channel is going to initialize in dgnc_tty_init() again. So the channel array doesn't need to set NULL for initailization in dgnc_found_board(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com>

Re: [PATCH 04/11] staging: dgnc: kfree for board structure in

2016-09-22 Thread DaeSeok Youn
2016-09-22 16:21 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Thu, Sep 22, 2016 at 02:22:03PM +0900, Daeseok Youn wrote: >> The board structure should be freed when any function was failed >> in dgnc_found_board(). And the board strucure will be stored >>

[PATCH 11/11] staging: dgnc: introduce find_board_by_major()

2016-09-21 Thread Daeseok Youn
It was used to get a board structure with dgnc_BoardsByMajor array. But this driver already has the array for managing initialized board as dgap_board[]. It can be used for searching the board structure by major number. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/s

[PATCH 10/11] staging: dgnc: remove useless variables

2016-09-21 Thread Daeseok Youn
the dgnc_cleanup_tty() cannot be called with unregistered tty. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.h | 3 -- drivers/staging/dgnc/dgnc_tty.c| 64 +++--- 2 files changed, 25 insertions(+), 42 deletions(-) diff

[PATCH 09/11] staging: dgnc: rename dgnc_tty_uninit() to

2016-09-21 Thread Daeseok Youn
The dgnc_tty_uninit() doesn't match with dgnc_tty_init() at all. And also the dgnc_cleanup_tty() is only called for exiting the module. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c| 4 ++-- drivers/s

[PATCH 08/11] staging: dgnc: introduce the dgnc_free_irq()

2016-09-21 Thread Daeseok Youn
The dgnc_free_irq() will free the requested IRQ from the dgnc_request_irq(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/d

[PATCH 07/11] staging: dgnc: rename dgnc_finalize_board_init() to

2016-09-21 Thread Daeseok Youn
The dgnc_finalize_board_init() function has only job for requesting the IRQ. It should be renamed to dgnc_request_irq() Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH 06/11] staging: dgnc: introduce the dgnc_tty_unregister()

2016-09-21 Thread Daeseok Youn
The dgnc_tty_unregister() will be called when the dgnc_tty_register() is failed. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 7 +-- drivers/staging/dgnc/dgnc_tty.c| 8 drivers/staging/dgnc/dgnc_tty.h| 1 + 3 files chang

[PATCH 05/11] staging: dgnc: move functions unrelated with

2016-09-21 Thread Daeseok Youn
The functions related with tty device initialization are needed to be moved from dgnc_found_board() to dgnc_init_one(). Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 81 -- 1 file changed, 43 insertions(

[PATCH 03/11] staging: dgnc: missing NULL check for ioremap in

2016-09-21 Thread Daeseok Youn
The ioremap() function can be failed, so it need to have error handling in dgnc_do_remap(). And also the return type of dgnc_do_remap() should be changed from "void" to "int" Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/stagi

[PATCH 04/11] staging: dgnc: kfree for board structure in

2016-09-21 Thread Daeseok Youn
The board structure should be freed when any function was failed in dgnc_found_board(). And the board strucure will be stored into dgnc_board array when the dgnc_found_board() function has no error. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.

[PATCH 01/11] staging: dgnc: remove redundant initialization for

2016-09-21 Thread Daeseok Youn
The channel array in board_t was initialized in dgnc_found_board() with NULL. But the channel is going to initialize in dgnc_tty_init(). So the channel array doesn't need to set NULL for initailization. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_dr

[PATCH 02/11] staging: dgnc: remove useless message buffer

2016-09-21 Thread Daeseok Youn
There is a temporary message buffer for the boot message in dgnc_found_board() but the buffer was not used anywhere in dgnc driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.c | 28 drivers/staging/dgnc/dgnc_dr

[PATCH 00/11] staging: dgnc: cleanup the function on dgnc driver

2016-09-21 Thread Daeseok Youn
dependency with each other. If one of these patches cannot be merged, some other patches maybe cannot be merged properly, I think. Daeseok Youn (11): staging: dgnc: remove redundant initialization for channel_t staging: dgnc: remove useless message buffer staging: dgnc: missing NULL check

[PATCH V2] staging: dgnc: check the type of print before calling

2016-08-21 Thread Daeseok Youn
The dgnc_maxcps_room() function must be called only for print device. The if-statement for checking print device checks before calling dgnc_maxcps_room() and also this function doesn't need to have any data except channel_t. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2:

Re: [PATCH 1/2] staging: dgnc: change a parameter from tty_struct to

2016-08-21 Thread DaeSeok Youn
2016-08-22 0:55 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Fri, Aug 19, 2016 at 10:04:52AM +0900, Daeseok Youn wrote: >> The dgnc_maxcps_room() function must be called only for print device. >> The if-statement for checking print device checks before calling >

[PATCH 2/2] staging: dgnc: refactor the dgnc_maxcps_room() to improve

2016-08-18 Thread Daeseok Youn
The whole code in dgnc_maxcps_room() function surrounds with one if-statement for checking channel's maxcps and buffer size. I tried to separate the logic for this function from if-condition. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_tty.

[PATCH 1/2] staging: dgnc: change a parameter from tty_struct to

2016-08-18 Thread Daeseok Youn
The dgnc_maxcps_room() function must be called only for print device. The if-statement for checking print device checks before calling maxcps_room() and also this function doesn't need to have any data except channel_t. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/s

Re: [PATCH 01/15 RESEND] staging: dgnc: remove redundant NULL checks in

2016-08-17 Thread DaeSeok Youn
2016-08-17 15:25 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Wed, Aug 17, 2016 at 10:05:03AM +0900, DaeSeok Youn wrote: >> 2016-08-16 2:05 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: >> > On Wed, Jul 06, 2016 at 03:11:13PM +0900, Daeseok Youn wrote:

Re: [PATCH 01/15 RESEND] staging: dgnc: remove redundant NULL checks in

2016-08-16 Thread DaeSeok Youn
2016-08-16 2:05 GMT+09:00 Greg KH <gre...@linuxfoundation.org>: > On Wed, Jul 06, 2016 at 03:11:13PM +0900, Daeseok Youn wrote: >> The dgnc_block_til_ready() is only used in dgnc_tty_open(). >> The unit data(struct un_t) was stored into tty->driver_data in >> dg

[PATCH 15/15 RESEND] staging: dgnc: remove useless variable 'ch_intr_rx'

2016-07-06 Thread Daeseok Youn
The 'ch_intr_rx' variable was used only for increasing. So the 'ch_intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into s

[PATCH 14/15 RESEND] staging: dgnc: remove useless variable 'ch_intr_tx'

2016-07-06 Thread Daeseok Youn
The 'ch_intr_tx' variable was used only for increasing. So the 'ch_intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into s

[PATCH 13/15 RESEND] staging: dgnc: remove useless variable 'ch_intr_modem'

2016-07-06 Thread Daeseok Youn
The 'ch_intr_modem' variable was used only for increasing. So the 'ch_intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be

[PATCH 12/15 RESEND] staging: dgnc: remove useless variable 'intr_rx'

2016-07-06 Thread Daeseok Youn
The 'intr_rx' variable was used only for increasing. So the 'intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into stagin

[PATCH 11/15 RESEND] staging: dgnc: remove useless variable 'intr_tx'

2016-07-06 Thread Daeseok Youn
The 'intr_tx' variable was used only for increasing. So the 'intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into stagin

[PATCH 10/15 RESEND] staging: dgnc: remove unused variable 'intr_modem'

2016-07-06 Thread Daeseok Youn
The 'intr_modem' variable was used only for increasing. So the 'intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into s

[PATCH 08/15 RESEND] staging: dgnc: remove useless variable 'intr_count'

2016-07-06 Thread Daeseok Youn
The 'intr_count' variable was used only for increasing. So the 'intr_count' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into s

[PATCH 07/15 RESEND] staging: dgnc: remove redundant NULL check for brd

2016-07-06 Thread Daeseok Youn
nce in dgnc_found_board(). So it doesn't need to check for DGNC_BOARD_MAGIC value. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into staging tree, let me know. There were

[PATCH 06/15 RESEND] staging: dgnc: re-arrange functions for removing

2016-07-06 Thread Daeseok Youn
Re-arrange the functions for removing forward declarations in dgnc_cls.c file. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into staging tree, let me know. Ther

[PATCH 05/15 RESEND] staging: dgnc: removes redundant null check and change

2016-07-06 Thread Daeseok Youn
The dgnc_set_modem_info() used only channel_t variable. Any other variables were used only for checking NULL. So fist parameter changed from "tty_struct" to "channel_t" and useless NULL checks and variables are removed. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com&

[PATCH 03/15 RESEND] staging: dgnc: remove redundant local variable for

2016-07-06 Thread Daeseok Youn
The local variable "bd" was not used in dgnc_carrier() function. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- RESEND: This patch was not merged for a long time, if there is any reason why this patch could NOT be merged into staging tree, let me know. There

[PATCH 02/15 RESEND] staging: dgnc: remove useless error value assignment

2016-07-06 Thread Daeseok Youn
The "result" variable in dgnc_get_mstat() was initialized with "-EIO". But if the "ch" is not null, "result" will be set to zero and if the "ch" is null, dgnc_get_mstat() will return "-ENXIO" as an error. So "-EIO" err

[PATCH 01/15 RESEND] staging: dgnc: remove redundant NULL checks in

2016-07-06 Thread Daeseok Youn
The dgnc_block_til_ready() is only used in dgnc_tty_open(). The unit data(struct un_t) was stored into tty->driver_data in dgnc_tty_open(). And also tty and un were tested about NULL so these variables doesn't need to check for NULL in dgnc_block_til_ready(). Signed-off-by: Daeseok Y

Re: [PATCH 01/15 RESEND] staging: dgnc: remove redundant NULL checks in

2016-07-04 Thread DaeSeok Youn
2016-07-04 20:36 GMT+09:00 Daeseok Youn <daeseok.y...@gmail.com>: > The dgnc_block_til_ready() is only used in dgnc_tty_open(). > The unit data(struct un_t) was stored into tty->driver_data in > dgnc_tty_open(). > And also tty and un were tested about NULL so these var

[PATCH 01/15 RESEND] staging: dgnc: remove redundant NULL checks in

2016-07-04 Thread Daeseok Youn
The dgnc_block_til_ready() is only used in dgnc_tty_open(). The unit data(struct un_t) was stored into tty->driver_data in dgnc_tty_open(). And also tty and un were tested about NULL so these variables doesn't need to check for NULL in dgnc_block_til_ready(). Signed-off-by: Daeseok Y

Re: [PATCH 1/2 RESEND] staging: dgnc: remove redundant NULL checks in

2016-06-20 Thread DaeSeok Youn
2016-06-16 18:23 GMT+09:00 DaeSeok Youn <daeseok.y...@gmail.com>: > 2016-05-10 15:44 GMT+09:00 Daeseok Youn <daeseok.y...@gmail.com>: >> The dgnc_block_til_ready() is only used in dgnc_tty_open(). >> The unit data(struct un_t) was stored into tty->driver_data in &

Re: [PATCH 1/2 RESEND] staging: dgnc: remove redundant NULL checks in

2016-06-16 Thread DaeSeok Youn
2016-05-10 15:44 GMT+09:00 Daeseok Youn <daeseok.y...@gmail.com>: > The dgnc_block_til_ready() is only used in dgnc_tty_open(). > The unit data(struct un_t) was stored into tty->driver_data in > dgnc_tty_open(). > And also tty and un were tested about NULL so these var

[PATCH 6/7] staging: dgnc: remove useless variable 'ch_intr_tx'

2016-05-27 Thread Daeseok Youn
The 'ch_intr_tx' variable was used only for increasing. So the 'ch_intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c

[PATCH 7/7] staging: dgnc: remove useless variable 'ch_intr_rx'

2016-05-27 Thread Daeseok Youn
The 'ch_intr_rx' variable was used only for increasing. So the 'ch_intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 1 - drivers/staging/dgnc/dgnc_driver.h | 2 -- drivers/staging/dgnc/dgnc_neo.c

[PATCH 5/7] staging: dgnc: remove useless variable 'ch_intr_modem'

2016-05-27 Thread Daeseok Youn
The 'ch_intr_modem' variable was used only for increasing. So the 'ch_intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 9 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/stagin

[PATCH 3/7] staging: dgnc: remove useless variable 'intr_tx'

2016-05-27 Thread Daeseok Youn
The 'intr_tx' variable was used only for increasing. So the 'intr_tx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c| 3

[PATCH 4/7] staging: dgnc: remove useless variable 'intr_rx'

2016-05-27 Thread Daeseok Youn
The 'intr_rx' variable was used only for increasing. So the 'intr_rx' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c| 2

[PATCH 2/7] staging: dgnc: remove unused variable 'intr_modem'

2016-05-27 Thread Daeseok Youn
The 'intr_modem' variable was used only for increasing. So the 'intr_modem' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 1 - drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c

[PATCH 1/7] staging: dgnc: remove useless variable 'intr_count'

2016-05-27 Thread Daeseok Youn
The 'intr_count' variable was used only for increasing. So the 'intr_count' variable is not useful for this driver. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- drivers/staging/dgnc/dgnc_cls.c| 2 -- drivers/staging/dgnc/dgnc_driver.h | 1 - drivers/staging/dgnc/dgnc_neo.c

[PATCH 2/2 V2] staging: dgnc: remove redundant null check in

2016-05-26 Thread Daeseok Youn
the "brd" was already checked for NULL before calling dgnc_do_remap(). the dgnc_do_remap() function was called only from the dgnc_found_board() and the DGNC_BOARD_MAGIC value was assigned to "brd->magic" in dgcn_found_board(). So it doesn't need to check about magic value.

[PATCH 1/2 v2] staging: dgnc: remove redundant NULL check for brd

2016-05-26 Thread Daeseok Youn
nce in dgnc_found_board(). So it doesn't need to check for DGNC_BOARD_MAGIC value. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> --- V2: Adds more comments to Change Log. drivers/staging/dgnc/dgnc_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/dgnc/dgn

  1   2   3   4   5   >