From: Abhishek Tamboli <abhishektamboli9@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: perex@perex.cz, oswald.buddenhagen@gmx.de,
skhan@linuxfoundation.org, rbmarliere@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: emu10k1: Fix coding style issues and warnings
Date: Tue, 6 Aug 2024 22:48:32 +0530 [thread overview]
Message-ID: <ZrJa6IahC6Edlitb@embed-PC.myguest.virtualbox.org> (raw)
In-Reply-To: <87cyml8vj6.wl-tiwai@suse.de>
On Tue, Aug 06, 2024 at 06:29:17PM +0200, Takashi Iwai wrote:
> On Mon, 05 Aug 2024 17:52:06 +0200,
> Abhishek Tamboli wrote:
> >
> > Fix coding style errors and warnings in sound/pci/emu10k1/memory.c
> > reported by checkpatch.pl. Changes includes:
> >
> > - Add spaces after commas in macro definitions.
> > - Insert blank lines after variable declarations.
> > - Consistent spacing around operators.
> > - Remove trailing whitespace.
> > - Move EXPORT_SYMBOL declarations to immediately follow their
> > respective functions.
> > - Correct spacing in conditional statements and type casts.
> >
> > Fix the following errors and warnings:
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define __set_ptb_entry(emu,page,addr) \
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define __set_ptb_entry(emu,page,addr) \
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_ptb_entry(emu,page,addr) __set_ptb_entry(emu,page,addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_ptb_entry(emu,page,addr) __set_ptb_entry(emu,page,addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_ptb_entry(emu,page,addr) __set_ptb_entry(emu,page,addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_ptb_entry(emu,page,addr) __set_ptb_entry(emu,page,addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_silent_ptb(emu,page)
> > __set_ptb_entry(emu,page,emu->silent_page.addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_silent_ptb(emu,page)
> > __set_ptb_entry(emu,page,emu->silent_page.addr)
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define set_silent_ptb(emu,page)
> > __set_ptb_entry(emu,page,emu->silent_page.addr)
> >
> > WARNING: Missing a blank line after declarations
> > + int i;
> > + page *= UNIT_PAGES;
> >
> > WARNING: Missing a blank line after declarations
> > + int i;
> > + page *= UNIT_PAGES;
> >
> > ERROR: space required after that ',' (ctx:VxV)
> > +#define get_emu10k1_memblk(l,member)
> > list_entry(l, struct snd_emu10k1_memblk, member)
> >
> > WARNING: space prohibited between function name and open parenthesis '('
> > + list_for_each (pos, &emu->mapped_link_head) {
> >
> > WARNING: Missing a blank line after declarations
> > + struct snd_emu10k1_memblk *blk =
> > get_emu10k1_memblk(pos, mapped_link);
> > + if (blk->mapped_page < 0)
> >
> > ERROR: else should follow close brace '}'
> > + }
> > + else if (size > max_size) {
> >
> > ERROR: need consistent spacing around '-' (ctx:WxV)
> > + psize = get_aligned_page(size + PAGE_SIZE -1);
> > ^
> >
> > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > +EXPORT_SYMBOL(snd_emu10k1_memblk_map);
> >
> > WARNING: Missing a blank line after declarations
> > + dma_addr_t addr;
> > + if (ofs >= runtime->dma_bytes)
> >
> > ERROR: space prohibited after that '!' (ctx:BxW)
> > + if (! is_valid_page(emu, addr)) {
> > ^
> >
> > ERROR: trailing whitespace
> > +^Istruct snd_util_memhdr *hdr = hw->memhdr; $
> >
> > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > +EXPORT_SYMBOL(snd_emu10k1_synth_alloc);
> >
> > ERROR: trailing whitespace
> > +^Istruct snd_util_memhdr *hdr = emu->memhdr; $
> >
> > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > +EXPORT_SYMBOL(snd_emu10k1_synth_free);
> >
> > WARNING: Missing a blank line after declarations
> > + int first_page, last_page;
> > + first_page = blk->first_page;
> >
> > WARNING: Missing a blank line after declarations
> > + char *ptr;
> > + if (snd_BUG_ON(page < 0 || page >= emu->max_cache_pages))
> >
> > ERROR: space prohibited after that '!' (ctx:BxW)
> > + if (! ptr) {
> > ^
> >
> > ERROR: "(foo*)" should be "(foo *)"
> > + return (void*)ptr;
> >
> > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > +EXPORT_SYMBOL(snd_emu10k1_synth_memset);
> >
> > WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
> > +EXPORT_SYMBOL(snd_emu10k1_synth_copy_from_user);
> >
> > Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
>
> Thanks for the patch. But in general, I take this kind of
> white-space-only patches as a preliminary only when coupled with some
> other real fixes or improvement changes -- especially for old driver
> code. Otherwise it'd just scratch the git history.
>
> So, if you have other actual fixes for this driver based on this clean
> up, let me know.
Hi Takashi,
Thank you for the feedback. I understand your point regarding
white-space-only patches and I'll keep this in mind for future
contributions. Unfortunately, I don't have any additional
fixes or improvements for this driver at the moment.
Regards,
Abhishek
prev parent reply other threads:[~2024-08-06 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 15:52 [PATCH] ALSA: emu10k1: Fix coding style issues and warnings Abhishek Tamboli
2024-08-06 7:03 ` Greg KH
2024-08-06 16:29 ` Takashi Iwai
2024-08-06 17:18 ` Abhishek Tamboli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrJa6IahC6Edlitb@embed-PC.myguest.virtualbox.org \
--to=abhishektamboli9@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oswald.buddenhagen@gmx.de \
--cc=perex@perex.cz \
--cc=rbmarliere@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox