[PATCH 2/4] staging: goldfish: Fix checkpatch warnings in goldfish_audio.c

Roman Kiryanov rkir at google.com
Fri Jun 1 19:19:14 UTC 2018


I remember checkpatch complained about aligning to the first argument.
Somehow I cannot reproduce this now. Feel free to drop this patch.

Thank you.
On Fri, Jun 1, 2018 at 12:11 PM Greg KH <gregkh at linuxfoundation.org> wrote:
>
> On Fri, Jun 01, 2018 at 11:31:21AM -0700, rkir at google.com wrote:
> > From: Roman Kiryanov <rkir at google.com>
> >
> > Address issues pointed by checkpatch.pl
>
> "issues"?  Plural?
>
> >
> > Signed-off-by: Roman Kiryanov <rkir at google.com>
> > ---
> >  drivers/staging/goldfish/goldfish_audio.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
> > index 3a4715cd362b..2bec3205326e 100644
> > --- a/drivers/staging/goldfish/goldfish_audio.c
> > +++ b/drivers/staging/goldfish/goldfish_audio.c
> > @@ -308,8 +308,11 @@ static int goldfish_audio_probe(struct platform_device *pdev)
> >               dev_err(&pdev->dev, "platform_get_irq failed\n");
> >               return -ENODEV;
> >       }
> > -     data->buffer_virt = dmam_alloc_coherent(&pdev->dev,
> > -                             COMBINED_BUFFER_SIZE, &buf_addr, GFP_KERNEL);
> > +     data->buffer_virt =
> > +             dmam_alloc_coherent(&pdev->dev,
> > +                                 COMBINED_BUFFER_SIZE,
> > +                                 &buf_addr,
> > +                                 GFP_KERNEL);
>
> Ick, why?  What's wrong with the original code?
>
> Or better yet, how about:
>         data->buffer_virt = dmam_alloc_coherent(&pdev->dev,
>                                                 COMBINED_BUFFER_SIZE,
>                                                 &buf_addr, GFP_KERNEL);
>
> if you really want to get picky about it.
>
> thanks,
>
> greg k-h


More information about the devel mailing list