* [PATCH v2 0/2] Staging: speakup: Misc cleanups and code reformatting.
@ 2020-03-23 23:50 Sam Muhammed
2020-03-23 23:50 ` [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc() Sam Muhammed
2020-03-23 23:50 ` [PATCH v2 2/2] Staging: speakup: Add identifier name to function declaration arguments Sam Muhammed
0 siblings, 2 replies; 5+ messages in thread
From: Sam Muhammed @ 2020-03-23 23:50 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, outreachy-kernel
Cc: Sam Muhammed
Changes to clear multiple Checkpatch.pl CHECKs of
proper use of kmalloc(), and adding identifier names
to function declaration arguments.
All modifications made to match coding style and
to improve readability.
Changes in v2:
- Drop the first patch in the previous version:
Staging: speakup: Avoid multiple assignments.
This code is better with multiple assignments.
Sam Muhammed (2):
Staging: speakup: Use sizeof(*var) in kmalloc().
Staging: speakup: Add identifier name to function declaration
arguments.
drivers/staging/speakup/spk_ttyio.c | 2 +-
drivers/staging/speakup/spk_types.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc().
2020-03-23 23:50 [PATCH v2 0/2] Staging: speakup: Misc cleanups and code reformatting Sam Muhammed
@ 2020-03-23 23:50 ` Sam Muhammed
2020-03-24 0:25 ` Samuel Thibault
2020-03-23 23:50 ` [PATCH v2 2/2] Staging: speakup: Add identifier name to function declaration arguments Sam Muhammed
1 sibling, 1 reply; 5+ messages in thread
From: Sam Muhammed @ 2020-03-23 23:50 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, outreachy-kernel
Cc: Sam Muhammed
Modifying struct allocation in kmalloc() to match the
coding standards.
Checkpatch.pl CHECK: Prefer kmalloc(sizeof(*ldisc_data)...)
over kmalloc(sizeof(struct spk_ldisc_data)...)
Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
---
Changes in v2:
- None.
drivers/staging/speakup/spk_ttyio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
index 5a9eff08cb96..9b95f77f9265 100644
--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -51,7 +51,7 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty)
return -EOPNOTSUPP;
speakup_tty = tty;
- ldisc_data = kmalloc(sizeof(struct spk_ldisc_data), GFP_KERNEL);
+ ldisc_data = kmalloc(sizeof(*ldisc_data), GFP_KERNEL);
if (!ldisc_data)
return -ENOMEM;
---
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] Staging: speakup: Add identifier name to function declaration arguments.
2020-03-23 23:50 [PATCH v2 0/2] Staging: speakup: Misc cleanups and code reformatting Sam Muhammed
2020-03-23 23:50 ` [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc() Sam Muhammed
@ 2020-03-23 23:50 ` Sam Muhammed
1 sibling, 0 replies; 5+ messages in thread
From: Sam Muhammed @ 2020-03-23 23:50 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, outreachy-kernel
Cc: Sam Muhammed
void (*read_buff_add) argument didn't have an identifier name,
adding a name to it like the rest of all functions' arguments.
Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
---
Changes in v2:
- None.
drivers/staging/speakup/spk_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/spk_types.h b/drivers/staging/speakup/spk_types.h
index a2fc72c29894..fc6a9416829c 100644
--- a/drivers/staging/speakup/spk_types.h
+++ b/drivers/staging/speakup/spk_types.h
@@ -189,7 +189,7 @@ struct spk_synth {
void (*flush)(struct spk_synth *synth);
int (*is_alive)(struct spk_synth *synth);
int (*synth_adjust)(struct st_var_header *var);
- void (*read_buff_add)(u_char);
+ void (*read_buff_add)(u_char c);
unsigned char (*get_index)(struct spk_synth *synth);
struct synth_indexing indexing;
int alive;
---
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc().
2020-03-23 23:50 ` [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc() Sam Muhammed
@ 2020-03-24 0:25 ` Samuel Thibault
2020-03-24 10:45 ` [Outreachy kernel] " Sam Muhammed
0 siblings, 1 reply; 5+ messages in thread
From: Samuel Thibault @ 2020-03-24 0:25 UTC (permalink / raw)
To: Sam Muhammed
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Greg Kroah-Hartman,
outreachy-kernel
Sam Muhammed, le lun. 23 mars 2020 19:50:51 -0400, a ecrit:
> Modifying struct allocation in kmalloc() to match the
> coding standards.
>
> Checkpatch.pl CHECK: Prefer kmalloc(sizeof(*ldisc_data)...)
> over kmalloc(sizeof(struct spk_ldisc_data)...)
>
> Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Since there was no change since last version in both patches, you can
already put my previous Reviewed-by tag for both.
> ---
> Changes in v2:
> - None.
>
> drivers/staging/speakup/spk_ttyio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> index 5a9eff08cb96..9b95f77f9265 100644
> --- a/drivers/staging/speakup/spk_ttyio.c
> +++ b/drivers/staging/speakup/spk_ttyio.c
> @@ -51,7 +51,7 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty)
> return -EOPNOTSUPP;
> speakup_tty = tty;
>
> - ldisc_data = kmalloc(sizeof(struct spk_ldisc_data), GFP_KERNEL);
> + ldisc_data = kmalloc(sizeof(*ldisc_data), GFP_KERNEL);
> if (!ldisc_data)
> return -ENOMEM;
>
> ---
> 2.20.1
>
--
Samuel
> Voici mon problème, j'ai deux PCs relies par des cartes ethernet,
> configures avec le protocole PPP.
-+- Romain in Guide du linuxien pervers - "Ils sont fous ces romains !" -+-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc().
2020-03-24 0:25 ` Samuel Thibault
@ 2020-03-24 10:45 ` Sam Muhammed
0 siblings, 0 replies; 5+ messages in thread
From: Sam Muhammed @ 2020-03-24 10:45 UTC (permalink / raw)
To: Samuel Thibault
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Greg Kroah-Hartman,
outreachy-kernel
On Tue, 2020-03-24 at 01:25 +0100, Samuel Thibault wrote:
> Sam Muhammed, le lun. 23 mars 2020 19:50:51 -0400, a ecrit:
> > Modifying struct allocation in kmalloc() to match the
> > coding standards.
> >
> > Checkpatch.pl CHECK: Prefer kmalloc(sizeof(*ldisc_data)...)
> > over kmalloc(sizeof(struct spk_ldisc_data)...)
> >
> > Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
>
> Since there was no change since last version in both patches, you can
> already put my previous Reviewed-by tag for both.
>
Missed that.
Thanks!
Sam
> > ---
> > Changes in v2:
> > - None.
> >
> > drivers/staging/speakup/spk_ttyio.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c
> > index 5a9eff08cb96..9b95f77f9265 100644
> > --- a/drivers/staging/speakup/spk_ttyio.c
> > +++ b/drivers/staging/speakup/spk_ttyio.c
> > @@ -51,7 +51,7 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty)
> > return -EOPNOTSUPP;
> > speakup_tty = tty;
> >
> > - ldisc_data = kmalloc(sizeof(struct spk_ldisc_data), GFP_KERNEL);
> > + ldisc_data = kmalloc(sizeof(*ldisc_data), GFP_KERNEL);
> > if (!ldisc_data)
> > return -ENOMEM;
> >
> > ---
> > 2.20.1
> >
>
> --
> Samuel
> > Voici mon problème, j'ai deux PCs relies par des cartes ethernet,
> > configures avec le protocole PPP.
> -+- Romain in Guide du linuxien pervers - "Ils sont fous ces romains !" -+-
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-24 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-23 23:50 [PATCH v2 0/2] Staging: speakup: Misc cleanups and code reformatting Sam Muhammed
2020-03-23 23:50 ` [PATCH v2 1/2] Staging: speakup: Use sizeof(*var) in kmalloc() Sam Muhammed
2020-03-24 0:25 ` Samuel Thibault
2020-03-24 10:45 ` [Outreachy kernel] " Sam Muhammed
2020-03-23 23:50 ` [PATCH v2 2/2] Staging: speakup: Add identifier name to function declaration arguments Sam Muhammed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.