linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: Ma Feng <mafeng.ma@huawei.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [printk:for-5.15-printk-index 4/8] drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting
Date: Sun, 25 Jul 2021 12:43:54 +0100	[thread overview]
Message-ID: <YP1OeodZim+HUL+I@chrisdown.name> (raw)
In-Reply-To: <202107250913.OiKJhpRZ-lkp@intel.com>

Hey there,

kernel test robot writes:
>smatch warnings:
>drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting
>drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1730 pvr2_hdw_set_streaming() warn: inconsistent indenting
>drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3461 pvr2_hdw_cpufw_set_enabled() warn: inconsistent indenting
>drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3501 pvr2_hdw_cpufw_get() warn: inconsistent indenting
>
>vim +288 drivers/media/usb/pvrusb2/pvrusb2-encoder.c
>
>[...]
>1ad371deb9b0be drivers/media/usb/pvrusb2/pvrusb2-encoder.c   Mauro Carvalho Chehab 2017-06-26  191  	LOCK_TAKE(hdw->ctl_lock); while (1) {
>[...]
>11c48e41d5fcc5 drivers/media/usb/pvrusb2/pvrusb2-encoder.c   Ma Feng               2019-12-19  287  	}
>11c48e41d5fcc5 drivers/media/usb/pvrusb2/pvrusb2-encoder.c   Ma Feng               2019-12-19 @288  	LOCK_GIVE(hdw->ctl_lock);

Ok, so it looks like it's complaining that LOCK_TAKE and LOCK_GIVE are somewhat 
unbalanced in indenting. Which... they are. I don't really see what this has to 
do with the printk indexing patchset.

I tried to reproduce myself, but spatch just segfaults when trying to read 
drivers/media/usb/pvrusb2/pvrusb2-encoder.c under CHECK=, before _and_ after...

There is a pr_info user in here, pvr2_trace, which may be related, but honestly 
I'm not seeing how the printk indexing patchset could materially change this, 
and not having a repro is frustrating.

All of the reported places are just LOCK_GIVE, which is just a mutex unlock, 
nothing to do with printk:

     % sed -n 288p drivers/media/usb/pvrusb2/pvrusb2-encoder.c
             LOCK_GIVE(hdw->ctl_lock);
     % sed -n '1730p;3461p;3501p' drivers/media/usb/pvrusb2/pvrusb2-hdw.c
             } while (0); LOCK_GIVE(hdw->big_lock);
             } while (0); LOCK_GIVE(hdw->big_lock);
             } while (0); LOCK_GIVE(hdw->big_lock);

...where...

     #define LOCK_TAKE(x) do { mutex_lock(&x##_mutex); x##_held = !0; } while (0)
     #define LOCK_GIVE(x) do { x##_held = 0; mutex_unlock(&x##_mutex); } while (0)

Ma Feng, looks like you were already cleaning this up, judging by 11c48e41d5 
("media: pvrusb2: Remove unneeded semicolon and add newline"), maybe you have 
some suggestions? I really don't see what it has to do with the printk indexing 
patchset, although if I had a local repro it would help.

Thanks,

Chris

>:::::: The code at line 288 was first introduced by commit
>:::::: 11c48e41d5fcc5b4cf17aa74388be128ca5444f8 media: pvrusb2: Remove unneeded semicolon and add newline
>
>:::::: TO: Ma Feng <mafeng.ma@huawei.com>
>:::::: CC: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
>
>---
>0-DAY CI Kernel Test Service, Intel Corporation
>https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

      reply	other threads:[~2021-07-25 11:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25  1:52 [printk:for-5.15-printk-index 4/8] drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting kernel test robot
2021-07-25 11:43 ` Chris Down [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=YP1OeodZim+HUL+I@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mafeng.ma@huawei.com \
    --cc=pmladek@suse.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;
as well as URLs for NNTP newsgroup(s).