public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Valentin Rothberg <valentinrothberg@gmail.com>
To: chris@chris-wilson.co.uk
Cc: mingo@kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Patrick Plagwitz <patrick.plagwitz@fau.de>,
	Andreas Ziegler <ziegler@cs.fau.de>,
	Daniel Lohmann <dl@cs.fau.de>
Subject: kernel: stop_machine: report (un)dead code (and feedback request)
Date: Thu, 26 Nov 2015 15:45:59 +0100	[thread overview]
Message-ID: <20151126144559.GA19758@debian-vm> (raw)

Hi Chris,

your commit 4c477de14237 ("kernel: remove stop_machine() Kconfig
dependency") has shown up in today's linux-next tree (20151126).
The commit changes the #ifdef condition in kernel/stop_machine.c
from/to:

    -#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
    +#if defined(CONFIG_SMP) || defined(CONFIG_HOTPLUG_CPU)

Although this change fixes certain configs on X86, the condition now is
a tautology since CONFIG_SMP is already required to compile the file:

    kernel/Makefile:65:obj-$(CONFIG_SMP) += stop_machine.o

AFAIU, we can safely remove this #ifdef?

I detected this issue with undertaker-checkpatch [1].  We're a research
group at the University of Erlangen-Nuremberg, running daily checks on
linux-next to report Kconfig related issues, such as dead and undead
code, or references on undefined symbols.

One of the students, Patrick, who writes his Bachelor's thesis in our
group implemented a web-framework to visualize kernel code w.r.t. CPP
#ifdef statements and the bugs our tools [1] detect.  You can find the
visualization of the mentioned issue at [2].  The description of the
tautology in the #ifdef condition can be found by clicking on the
'details' menu of the block.

We'll be happy to receive any kind of feedback of the recipients of this
mail.  Do you like/dislike the visualization?  Does it help you to
understand the described issue? etc.  The main purpose of the framework
is to aid when sending reports.  It's much easier and nicer to point to
a website visualizing a problem than just describing it textually.

Kind regards,
 Valentin

[1] https://undertaker.cs.fau.de
[2] http://cados.cs.fau.de:4567/4c477de14237193c99329ca82965c1211b4ee81e/kernel/stop_machine.c

             reply	other threads:[~2015-11-26 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 14:45 Valentin Rothberg [this message]
2015-11-26 14:52 ` kernel: stop_machine: report (un)dead code (and feedback request) Chris Wilson
2015-11-27  7:42   ` Ingo Molnar

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=20151126144559.GA19758@debian-vm \
    --to=valentinrothberg@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=dl@cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrick.plagwitz@fau.de \
    --cc=ziegler@cs.fau.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