* [PATCH 0/2] tty: gdm724x: Fix coding style in gdm_tty.c @ 2023-10-13 8:26 Soumya Negi 2023-10-13 8:26 ` [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis Soumya Negi 2023-10-13 8:26 ` [PATCH 2/2] tty: gdm724x: Add blank line after declaration Soumya Negi 0 siblings, 2 replies; 11+ messages in thread From: Soumya Negi @ 2023-10-13 8:26 UTC (permalink / raw) To: Jonathan Kim, Dean ahn, Greg Kroah-Hartman Cc: outreachy, linux-staging, linux-kernel, Soumya Negi Checkpatch.pl raises 2 warnings in gdm_tty.c. This patchset contains two patches that cleanup the code as per the Linux coding style & fix the warnings. Patches can be applied in any order. Soumya Negi (2): tty: gdm724x: Match alignment with open parenthesis tty: gdm724x: Add blank line after declaration drivers/staging/gdm724x/gdm_tty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.42.0 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis 2023-10-13 8:26 [PATCH 0/2] tty: gdm724x: Fix coding style in gdm_tty.c Soumya Negi @ 2023-10-13 8:26 ` Soumya Negi 2023-10-13 8:57 ` Dan Carpenter 2023-10-13 8:26 ` [PATCH 2/2] tty: gdm724x: Add blank line after declaration Soumya Negi 1 sibling, 1 reply; 11+ messages in thread From: Soumya Negi @ 2023-10-13 8:26 UTC (permalink / raw) To: Jonathan Kim, Dean ahn, Greg Kroah-Hartman Cc: outreachy, linux-staging, linux-kernel, Soumya Negi Fix CHECK: Alignment should match open parenthesis Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> --- drivers/staging/gdm724x/gdm_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 32b2e817ff04..4e5cac76db58 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -271,8 +271,8 @@ int register_lte_tty_driver(void) int ret; for (i = 0; i < TTY_MAX_COUNT; i++) { - tty_driver = tty_alloc_driver(GDM_TTY_MINOR, - TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, TTY_DRIVER_REAL_RAW | + TTY_DRIVER_DYNAMIC_DEV); if (IS_ERR(tty_driver)) return PTR_ERR(tty_driver); -- 2.42.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis 2023-10-13 8:26 ` [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis Soumya Negi @ 2023-10-13 8:57 ` Dan Carpenter 2023-10-13 21:13 ` Soumya Negi 0 siblings, 1 reply; 11+ messages in thread From: Dan Carpenter @ 2023-10-13 8:57 UTC (permalink / raw) To: Soumya Negi Cc: Jonathan Kim, Dean ahn, Greg Kroah-Hartman, outreachy, linux-staging, linux-kernel On Fri, Oct 13, 2023 at 01:26:34AM -0700, Soumya Negi wrote: > Fix CHECK: Alignment should match open parenthesis > Issue found by checkpatch.pl > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > --- > drivers/staging/gdm724x/gdm_tty.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c > index 32b2e817ff04..4e5cac76db58 100644 > --- a/drivers/staging/gdm724x/gdm_tty.c > +++ b/drivers/staging/gdm724x/gdm_tty.c > @@ -271,8 +271,8 @@ int register_lte_tty_driver(void) > int ret; > > for (i = 0; i < TTY_MAX_COUNT; i++) { > - tty_driver = tty_alloc_driver(GDM_TTY_MINOR, > - TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); > + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, TTY_DRIVER_REAL_RAW | > + TTY_DRIVER_DYNAMIC_DEV); I prefered the original code. It was more readable. regards, dan carpenter ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis 2023-10-13 8:57 ` Dan Carpenter @ 2023-10-13 21:13 ` Soumya Negi 2023-10-14 7:38 ` Dan Carpenter 0 siblings, 1 reply; 11+ messages in thread From: Soumya Negi @ 2023-10-13 21:13 UTC (permalink / raw) To: Dan Carpenter Cc: Jonathan Kim, Dean ahn, Greg Kroah-Hartman, outreachy, linux-staging, linux-kernel On Fri, Oct 13, 2023 at 11:57:40AM +0300, Dan Carpenter wrote: > On Fri, Oct 13, 2023 at 01:26:34AM -0700, Soumya Negi wrote: > > Fix CHECK: Alignment should match open parenthesis > > Issue found by checkpatch.pl > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > --- > > drivers/staging/gdm724x/gdm_tty.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c > > index 32b2e817ff04..4e5cac76db58 100644 > > --- a/drivers/staging/gdm724x/gdm_tty.c > > +++ b/drivers/staging/gdm724x/gdm_tty.c > > @@ -271,8 +271,8 @@ int register_lte_tty_driver(void) > > int ret; > > > > for (i = 0; i < TTY_MAX_COUNT; i++) { > > - tty_driver = tty_alloc_driver(GDM_TTY_MINOR, > > - TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); > > + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, TTY_DRIVER_REAL_RAW | > > + TTY_DRIVER_DYNAMIC_DEV); > > I prefered the original code. It was more readable. > > regards, > dan carpenter Hi Dan, Noted. I'm curious what happens when some of the patches in a patchset are acceptable and some are not. Is everything disregarded by maintainers or are the good patches cherry-picked from the set? Thanks, Soumya ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis 2023-10-13 21:13 ` Soumya Negi @ 2023-10-14 7:38 ` Dan Carpenter 2023-10-20 2:14 ` Soumya Negi 0 siblings, 1 reply; 11+ messages in thread From: Dan Carpenter @ 2023-10-14 7:38 UTC (permalink / raw) To: Soumya Negi Cc: Jonathan Kim, Dean ahn, Greg Kroah-Hartman, outreachy, linux-staging, linux-kernel On Fri, Oct 13, 2023 at 02:13:26PM -0700, Soumya Negi wrote: > On Fri, Oct 13, 2023 at 11:57:40AM +0300, Dan Carpenter wrote: > > On Fri, Oct 13, 2023 at 01:26:34AM -0700, Soumya Negi wrote: > > > Fix CHECK: Alignment should match open parenthesis > > > Issue found by checkpatch.pl > > > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > > --- > > > drivers/staging/gdm724x/gdm_tty.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c > > > index 32b2e817ff04..4e5cac76db58 100644 > > > --- a/drivers/staging/gdm724x/gdm_tty.c > > > +++ b/drivers/staging/gdm724x/gdm_tty.c > > > @@ -271,8 +271,8 @@ int register_lte_tty_driver(void) > > > int ret; > > > > > > for (i = 0; i < TTY_MAX_COUNT; i++) { > > > - tty_driver = tty_alloc_driver(GDM_TTY_MINOR, > > > - TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); > > > + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, TTY_DRIVER_REAL_RAW | > > > + TTY_DRIVER_DYNAMIC_DEV); > > > > I prefered the original code. It was more readable. > > > > regards, > > dan carpenter > Hi Dan, > > Noted. I'm curious what happens when some of the patches in a patchset > are acceptable and some are not. Is everything disregarded by > maintainers or are the good patches cherry-picked from the set? Most of the time, you should just resend the series. Sometimes a maintainer will take the first few patches and then when they hit one that can't be merged they'll stop. So you should try to organize your patchsets from fixes first, then cleanups and then least controversial to most controversial. Except people might be annoyed if it looks like you're hiding a really controversial one at the end of a long series. regards, dan carpenter ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis 2023-10-14 7:38 ` Dan Carpenter @ 2023-10-20 2:14 ` Soumya Negi 0 siblings, 0 replies; 11+ messages in thread From: Soumya Negi @ 2023-10-20 2:14 UTC (permalink / raw) To: Dan Carpenter Cc: Jonathan Kim, Dean ahn, Greg Kroah-Hartman, outreachy, linux-staging, linux-kernel On Sat, Oct 14, 2023 at 10:38:22AM +0300, Dan Carpenter wrote: > On Fri, Oct 13, 2023 at 02:13:26PM -0700, Soumya Negi wrote: > > On Fri, Oct 13, 2023 at 11:57:40AM +0300, Dan Carpenter wrote: > > > On Fri, Oct 13, 2023 at 01:26:34AM -0700, Soumya Negi wrote: > > > > Fix CHECK: Alignment should match open parenthesis > > > > Issue found by checkpatch.pl > > > > > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > > > --- > > > > drivers/staging/gdm724x/gdm_tty.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c > > > > index 32b2e817ff04..4e5cac76db58 100644 > > > > --- a/drivers/staging/gdm724x/gdm_tty.c > > > > +++ b/drivers/staging/gdm724x/gdm_tty.c > > > > @@ -271,8 +271,8 @@ int register_lte_tty_driver(void) > > > > int ret; > > > > > > > > for (i = 0; i < TTY_MAX_COUNT; i++) { > > > > - tty_driver = tty_alloc_driver(GDM_TTY_MINOR, > > > > - TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); > > > > + tty_driver = tty_alloc_driver(GDM_TTY_MINOR, TTY_DRIVER_REAL_RAW | > > > > + TTY_DRIVER_DYNAMIC_DEV); > > > > > > I prefered the original code. It was more readable. > > > > > > regards, > > > dan carpenter > > Hi Dan, > > > > Noted. I'm curious what happens when some of the patches in a patchset > > are acceptable and some are not. Is everything disregarded by > > maintainers or are the good patches cherry-picked from the set? > > Most of the time, you should just resend the series. Sometimes a > maintainer will take the first few patches and then when they hit one > that can't be merged they'll stop. So you should try to organize your > patchsets from fixes first, then cleanups and then least controversial > to most controversial. Except people might be annoyed if it looks like > you're hiding a really controversial one at the end of a long series. > > regards, > dan carpenter Thank you! - Soumya ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] tty: gdm724x: Add blank line after declaration 2023-10-13 8:26 [PATCH 0/2] tty: gdm724x: Fix coding style in gdm_tty.c Soumya Negi 2023-10-13 8:26 ` [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis Soumya Negi @ 2023-10-13 8:26 ` Soumya Negi 2023-10-15 5:37 ` Greg Kroah-Hartman 1 sibling, 1 reply; 11+ messages in thread From: Soumya Negi @ 2023-10-13 8:26 UTC (permalink / raw) To: Jonathan Kim, Dean ahn, Greg Kroah-Hartman Cc: outreachy, linux-staging, linux-kernel, Soumya Negi Fix WARNING: Missing a blank line after declarations Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> --- drivers/staging/gdm724x/gdm_tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 4e5cac76db58..0c61eaff6122 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -160,6 +160,7 @@ static ssize_t gdm_tty_write(struct tty_struct *tty, const u8 *buf, size_t len) while (remain) { size_t sending_len = min_t(size_t, MUX_TX_MAX_SIZE, remain); + gdm->tty_dev->send_func(gdm->tty_dev->priv_dev, (void *)(buf + sent_len), sending_len, -- 2.42.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] tty: gdm724x: Add blank line after declaration 2023-10-13 8:26 ` [PATCH 2/2] tty: gdm724x: Add blank line after declaration Soumya Negi @ 2023-10-15 5:37 ` Greg Kroah-Hartman 2023-10-15 6:07 ` Soumya Negi 0 siblings, 1 reply; 11+ messages in thread From: Greg Kroah-Hartman @ 2023-10-15 5:37 UTC (permalink / raw) To: Soumya Negi Cc: Jonathan Kim, Dean ahn, outreachy, linux-staging, linux-kernel On Fri, Oct 13, 2023 at 01:26:35AM -0700, Soumya Negi wrote: > Fix WARNING: Missing a blank line after declarations > Issue found by checkpatch.pl > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > --- > drivers/staging/gdm724x/gdm_tty.c | 1 + > 1 file changed, 1 insertion(+) Why do you have "tty:" as the prefix for a staging driver? Shouldn't it be "staging: gdm724x: ...."? thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] tty: gdm724x: Add blank line after declaration 2023-10-15 5:37 ` Greg Kroah-Hartman @ 2023-10-15 6:07 ` Soumya Negi 2023-10-15 12:50 ` Greg Kroah-Hartman 0 siblings, 1 reply; 11+ messages in thread From: Soumya Negi @ 2023-10-15 6:07 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Jonathan Kim, Dean ahn, outreachy, linux-staging, linux-kernel On Sun, Oct 15, 2023 at 07:37:30AM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 13, 2023 at 01:26:35AM -0700, Soumya Negi wrote: > > Fix WARNING: Missing a blank line after declarations > > Issue found by checkpatch.pl > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > --- > > drivers/staging/gdm724x/gdm_tty.c | 1 + > > 1 file changed, 1 insertion(+) > > Why do you have "tty:" as the prefix for a staging driver? Shouldn't it > be "staging: gdm724x: ...."? Hi Greg, Thats what I thought too. But when I looked at the git history for gdm_tty.c the last few commits had "tty:". So I went with that. Should I change it to "staging:"? Regards, Soumya > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] tty: gdm724x: Add blank line after declaration 2023-10-15 6:07 ` Soumya Negi @ 2023-10-15 12:50 ` Greg Kroah-Hartman 2023-10-15 19:19 ` Soumya Negi 0 siblings, 1 reply; 11+ messages in thread From: Greg Kroah-Hartman @ 2023-10-15 12:50 UTC (permalink / raw) To: Soumya Negi Cc: Jonathan Kim, Dean ahn, outreachy, linux-staging, linux-kernel On Sat, Oct 14, 2023 at 11:07:16PM -0700, Soumya Negi wrote: > On Sun, Oct 15, 2023 at 07:37:30AM +0200, Greg Kroah-Hartman wrote: > > On Fri, Oct 13, 2023 at 01:26:35AM -0700, Soumya Negi wrote: > > > Fix WARNING: Missing a blank line after declarations > > > Issue found by checkpatch.pl > > > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > > --- > > > drivers/staging/gdm724x/gdm_tty.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > Why do you have "tty:" as the prefix for a staging driver? Shouldn't it > > be "staging: gdm724x: ...."? > > Hi Greg, > > Thats what I thought too. But when I looked at the git history for > gdm_tty.c the last few commits had "tty:". So I went with that. That is because those commits were tty-wide, and they changed things in multiple drivers all at once, not just for the one file. > Should I change it to "staging:"? Please do. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] tty: gdm724x: Add blank line after declaration 2023-10-15 12:50 ` Greg Kroah-Hartman @ 2023-10-15 19:19 ` Soumya Negi 0 siblings, 0 replies; 11+ messages in thread From: Soumya Negi @ 2023-10-15 19:19 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Jonathan Kim, Dean ahn, outreachy, linux-staging, linux-kernel Hi Greg, On Sun, Oct 15, 2023 at 02:50:44PM +0200, Greg Kroah-Hartman wrote: > On Sat, Oct 14, 2023 at 11:07:16PM -0700, Soumya Negi wrote: > > On Sun, Oct 15, 2023 at 07:37:30AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Oct 13, 2023 at 01:26:35AM -0700, Soumya Negi wrote: > > > > Fix WARNING: Missing a blank line after declarations > > > > Issue found by checkpatch.pl > > > > > > > > Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> > > > > --- > > > > drivers/staging/gdm724x/gdm_tty.c | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > Why do you have "tty:" as the prefix for a staging driver? Shouldn't it > > > be "staging: gdm724x: ...."? > > > > Hi Greg, > > > > Thats what I thought too. But when I looked at the git history for > > gdm_tty.c the last few commits had "tty:". So I went with that. > > That is because those commits were tty-wide, and they changed things in > multiple drivers all at once, not just for the one file. > > > Should I change it to "staging:"? > > Please do. I'm sending this patch in a new thread since the other patch in the patchset(had 2 patches) was reviewed as unneeded. Regards, Soumya ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-10-20 2:14 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-10-13 8:26 [PATCH 0/2] tty: gdm724x: Fix coding style in gdm_tty.c Soumya Negi 2023-10-13 8:26 ` [PATCH 1/2] tty: gdm724x: Match alignment with open parenthesis Soumya Negi 2023-10-13 8:57 ` Dan Carpenter 2023-10-13 21:13 ` Soumya Negi 2023-10-14 7:38 ` Dan Carpenter 2023-10-20 2:14 ` Soumya Negi 2023-10-13 8:26 ` [PATCH 2/2] tty: gdm724x: Add blank line after declaration Soumya Negi 2023-10-15 5:37 ` Greg Kroah-Hartman 2023-10-15 6:07 ` Soumya Negi 2023-10-15 12:50 ` Greg Kroah-Hartman 2023-10-15 19:19 ` Soumya Negi
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).