mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Herdler <herdler@nurfuerspam.de>
To: Hans Verkuil <hans@jjverkuil.nl>, lkp@intel.com
Cc: hverkuil@xs4all.nl, linux-kernel@vger.kernel.org,
	oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] media: av7110: Workaround a compiler warning
Date: Tue, 24 Jun 2025 05:36:11 +0200	[thread overview]
Message-ID: <4cfd2806-e461-4aa8-bae3-516b309bf260@nurfuerspam.de> (raw)
In-Reply-To: <dc177375-5e28-40da-bab1-d0627c70bd85@jjverkuil.nl>

Hi Hans,

On 20/06/25 15:33 Hans Verkuil wrote:
> Hi Stefan,
> 
> On 26/04/2025 23:54, Stefan Herdler wrote:
>> Avoid compiler warning caused by an empty block statement.
>>
>> Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202504262127.FkkWHzfs-lkp@intel.com/
>> ---
>>
>> I could not reproduce this warning with gcc10 here, but I already had similar
>> warnings with gcc12 on other projects.
>> I think it has most probably been triggered by the empty block statement.
>>
>> I'm pretty confident this patch will fix the warning, but not 100% sure.
>>
>> The kernel test robot will pick this patch and test is anyway, if I'm correct.
>> Let's wait, if it complains again.
>> That's the best I can do right now.
> 
> Is this patch still needed? I noticed that it wasn't CC-ed to the linux-media
> mailinglist, so it never appeared in patchwork, and was never picked up.

Thanks for the hint, next time I CC the media-list too.


Meanwhile I think the patch isn't necessary.
In haven't found any other evidence that there is something wrong.
- I wasn't able to reproduce this warning.
- Debian has recent builds of kernel 6.15.3 with gcc 14.
    The kernel-package contains the "dvb-ttpci.ko" file[1] and there are no
    warnings (for this module) in the build log[2].

The warning still doesn't make sense to me -there is no function statement-
and the code looks o.k. to me too.
The only debatable thing is the empty function block, which is generally
suggested to avoid.
Meanwhile I think a null statement ";" is maybe a more elegant solution here.

Is there a recommend practice for this? I haven't found anything in the
documentation so far.


Regards
Stefan

[1]: https://packages.debian.org/search?searchon=contents&keywords=dvb-ttpci.ko&mode=path&suite=experimental&arch=any
[2]: https://buildd.debian.org/status/logs.php?pkg=linux&ver=6.15.3-1%7Eexp1&arch=amd64&suite=experimental

> 
> If it is still needed, then please post it to linux-media and it will be
> picked up for v6.17.
> 
> Regards,
> 
> 	Hans
> 
>>
>> Regards
>> Stefan
>>
>>
>>  drivers/staging/media/av7110/av7110.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
>> index bc9a2a40a..962536ed7 100644
>> --- a/drivers/staging/media/av7110/av7110.c
>> +++ b/drivers/staging/media/av7110/av7110.c
>> @@ -159,7 +159,7 @@ static void init_av7110_av(struct av7110 *av7110)
>>  		 * some special handling for the Siemens DVB-C cards...
>>  		 */
>>  	} else if (av7110_init_analog_module(av7110) == 0) {
>> -		/* done. */
>> +		goto init_skip_analog_module;
>>  	} else if (dev->pci->subsystem_vendor == 0x110a) {
>>  		pr_info("DVB-C w/o analog module @ card %d detected\n", av7110->dvb_adapter.num);
>>  		av7110->adac_type = DVB_ADAC_NONE;
>> @@ -168,6 +168,7 @@ static void init_av7110_av(struct av7110 *av7110)
>>  		pr_info("adac type set to %d @ card %d\n", av7110->adac_type, av7110->dvb_adapter.num);
>>  	}
>>  
>> +init_skip_analog_module:
>>  	if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP34x0) {
>>  		// switch DVB SCART on
>>  		ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
> 


      reply	other threads:[~2025-06-24  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-26 13:54 drivers/staging/media/av7110/av7110.c:162: warning: cannot understand function prototype: '} else if (av7110_init_analog_module(av7110) == 0) ' kernel test robot
2025-04-26 21:54 ` [PATCH] media: av7110: Workaround a compiler warning Stefan Herdler
2025-06-20 13:33   ` Hans Verkuil
2025-06-24  3:36     ` Stefan Herdler [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=4cfd2806-e461-4aa8-bae3-516b309bf260@nurfuerspam.de \
    --to=herdler@nurfuerspam.de \
    --cc=hans@jjverkuil.nl \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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®