From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] media: bt8xx: make read-only arrays static
Date: Tue, 27 Jun 2023 16:04:38 +0100 [thread overview]
Message-ID: <2b17acc9-44c3-acf6-0674-04a43aa742e0@gmail.com> (raw)
In-Reply-To: <ZJr0WvhFfCILwbeP@tom-HP-ZBook-Fury-15-G7-Mobile-Workstation>
On 27/06/2023 15:38, Tommaso Merciai wrote:
> Hi Colin,
>
> On Tue, Jun 27, 2023 at 02:48:51PM +0100, Colin Ian King wrote:
>> Don't populate the arrays on the stack, instead make them static const.
>> Also add spaces between values to clean up checkpatch style warnings.
>>
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
>> drivers/media/pci/bt8xx/dvb-bt8xx.c | 12 ++++++++----
>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
>> index 4cb890b949c3..df83b59a618d 100644
>> --- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
>> +++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
>> @@ -190,11 +190,15 @@ static int cx24108_tuner_set_params(struct dvb_frontend *fe)
>> u32 freq = c->frequency;
>> int i, a, n, pump;
>> u32 band, pll;
>> - u32 osci[]={950000,1019000,1075000,1178000,1296000,1432000,
>> - 1576000,1718000,1856000,2036000,2150000};
>> - u32 bandsel[]={0,0x00020000,0x00040000,0x00100800,0x00101000,
>> + static const u32 osci[] = {
>> + 950000, 1019000, 1075000, 1178000, 1296000, 1432000,
>> + 1576000, 1718000, 1856000, 2036000, 2150000
>> + };
>> + static const u32 bandsel[] = {
>> + 0, 0x00020000, 0x00040000, 0x00100800, 0x00101000,
>> 0x00102000,0x00104000,0x00108000,0x00110000,
>
> Are you not missing space also here?
I can't see the space you are referring to.
>
>> - 0x00120000,0x00140000};
>> + 0x00120000, 0x00140000
>> + };
>>
>> #define XTAL 1011100 /* Hz, really 1.0111 MHz and a /10 prescaler */
>> dprintk("cx24108 debug: entering SetTunerFreq, freq=%d\n", freq);
>> --
>> 2.39.2
>>
>
> Regards,
> Tommaso
next prev parent reply other threads:[~2023-06-27 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 13:48 Colin Ian King
2023-06-27 14:38 ` Tommaso Merciai
2023-06-27 15:04 ` Colin King (gmail) [this message]
2023-06-27 15:14 ` Tommaso Merciai
2023-06-27 15:22 ` Colin King (gmail)
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=2b17acc9-44c3-acf6-0674-04a43aa742e0@gmail.com \
--to=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tomm.merciai@gmail.com \
/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
all inboxes | Powered by JetHome®