* [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static
@ 2023-05-18 12:38 Tom Rix
2023-05-18 13:58 ` Oswald Buddenhagen
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rix @ 2023-05-18 12:38 UTC (permalink / raw)
To: perex, tiwai, oswald.buddenhagen; +Cc: alsa-devel, linux-kernel, Tom Rix
smatch reports
sound/pci/emu10k1/emumixer.c:519:39: warning: symbol
'emu1010_routing_info' was not declared. Should it be static?
sound/pci/emu10k1/emumixer.c:859:36: warning: symbol
'emu1010_pads_info' was not declared. Should it be static?
These variables are only used in their defining file, so it should be static
Signed-off-by: Tom Rix <trix@redhat.com>
---
sound/pci/emu10k1/emumixer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 3a7f25f81504..26ed7e2fe053 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -516,7 +516,7 @@ struct snd_emu1010_routing_info {
unsigned n_ins;
};
-const struct snd_emu1010_routing_info emu1010_routing_info[] = {
+static const struct snd_emu1010_routing_info emu1010_routing_info[] = {
{
/* rev1 1010 */
.src_regs = emu1010_src_regs,
@@ -856,7 +856,7 @@ struct snd_emu1010_pads_info {
unsigned n_adc_ctls, n_dac_ctls;
};
-const struct snd_emu1010_pads_info emu1010_pads_info[] = {
+static const struct snd_emu1010_pads_info emu1010_pads_info[] = {
{
/* rev1 1010 */
.adc_ctls = snd_emu1010_adc_pads,
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static
2023-05-18 12:38 [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static Tom Rix
@ 2023-05-18 13:58 ` Oswald Buddenhagen
2023-05-18 14:18 ` Tom Rix
2023-05-18 14:31 ` Takashi Iwai
0 siblings, 2 replies; 4+ messages in thread
From: Oswald Buddenhagen @ 2023-05-18 13:58 UTC (permalink / raw)
To: Tom Rix; +Cc: perex, tiwai, alsa-devel, linux-kernel
On Thu, May 18, 2023 at 08:38:26AM -0400, Tom Rix wrote:
>smatch reports
^^^^^^ is this the best word to use here?
>sound/pci/emu10k1/emumixer.c:519:39: warning: symbol
> 'emu1010_routing_info' was not declared. Should it be static?
>sound/pci/emu10k1/emumixer.c:859:36: warning: symbol
> 'emu1010_pads_info' was not declared. Should it be static?
>
>These variables are only used in their defining file, so it should be static
^^ they
>
>Signed-off-by: Tom Rix <trix@redhat.com>
>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(also amending one of the still pending patches. thanks!)
regards
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static
2023-05-18 13:58 ` Oswald Buddenhagen
@ 2023-05-18 14:18 ` Tom Rix
2023-05-18 14:31 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rix @ 2023-05-18 14:18 UTC (permalink / raw)
To: perex, tiwai, alsa-devel, linux-kernel
On 5/18/23 6:58 AM, Oswald Buddenhagen wrote:
> On Thu, May 18, 2023 at 08:38:26AM -0400, Tom Rix wrote:
>> smatch reports
> ^^^^^^ is this the best word to use here?
I have been running smatch against the whole tree for a while, using
this preamble.
Many fixes later, for the most part the tree has been cleaned of this
class of problems.
Tom
>
>> sound/pci/emu10k1/emumixer.c:519:39: warning: symbol
>> 'emu1010_routing_info' was not declared. Should it be static?
>> sound/pci/emu10k1/emumixer.c:859:36: warning: symbol
>> 'emu1010_pads_info' was not declared. Should it be static?
>>
>> These variables are only used in their defining file, so it should be
>> static
> ^^ they
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>>
> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
>
> (also amending one of the still pending patches. thanks!)
>
> regards
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static
2023-05-18 13:58 ` Oswald Buddenhagen
2023-05-18 14:18 ` Tom Rix
@ 2023-05-18 14:31 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2023-05-18 14:31 UTC (permalink / raw)
To: Oswald Buddenhagen; +Cc: Tom Rix, perex, tiwai, alsa-devel, linux-kernel
On Thu, 18 May 2023 15:58:51 +0200,
Oswald Buddenhagen wrote:
>
> On Thu, May 18, 2023 at 08:38:26AM -0400, Tom Rix wrote:
> > smatch reports
> ^^^^^^ is this the best word to use here?
Note that smatch is a name of a static analysis tool :)
> > sound/pci/emu10k1/emumixer.c:519:39: warning: symbol
> > 'emu1010_routing_info' was not declared. Should it be static?
> > sound/pci/emu10k1/emumixer.c:859:36: warning: symbol
> > 'emu1010_pads_info' was not declared. Should it be static?
> >
> > These variables are only used in their defining file, so it should be static
> ^^ they
> >
> > Signed-off-by: Tom Rix <trix@redhat.com>
> >
> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
>
> (also amending one of the still pending patches. thanks!)
Applied the patch now, thanks.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-18 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-18 12:38 [PATCH] ALSA: emu10k1: set variables emu1010_routing_info and emu1010_pads_info storage-class-specifier to static Tom Rix
2023-05-18 13:58 ` Oswald Buddenhagen
2023-05-18 14:18 ` Tom Rix
2023-05-18 14:31 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox