From: Guenter Roeck <linux@roeck-us.net>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-watchdog@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH] watchdog: ixp4xx: Use devm_clk_get_enabled() helper
Date: Sun, 1 Jan 2023 11:31:18 -0800 [thread overview]
Message-ID: <20230101193118.GA2769955@roeck-us.net> (raw)
In-Reply-To: <401d3328-8da0-056b-8b32-d890bd5508b4@wanadoo.fr>
On Sun, Jan 01, 2023 at 06:52:35PM +0100, Christophe JAILLET wrote:
[ ... ]
> > >
> > > Here is what do.
> > >
> > > make allmodconfig
> > > make -j8 drivers/watchdog/ixp4xx_wdt.o
> > >
> > > And I get:
> > > DESCEND objtool
> > > CALL scripts/checksyscalls.sh
> > > CC drivers/watchdog/ixp4xx_wdt.o
> > > drivers/watchdog/ixp4xx_wdt.c: In function ‘ixp4xx_wdt_probe’:
> > > drivers/watchdog/ixp4xx_wdt.c:122:15: error: implicit declaration of
> > > function ‘read_cpuid_id’ [-Werror=implicit-function-declaration]
> > > 122 | if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) {
> > > | ^~~~~~~~~~~~~
> > > cc1: all warnings being treated as errors
> > > make[3]: *** [scripts/Makefile.build:252 : drivers/watchdog/ixp4xx_wdt.o]
> > > Erreur 1
> > > make[2]: *** [scripts/Makefile.build:504 : drivers/watchdog] Erreur 2
> > > make[1]: *** [scripts/Makefile.build:504 : drivers] Erreur 2
> > > make: *** [Makefile:2011 : .] Erreur 2
> > >
> > >
> > > I do agree with you that:
> > >
> > > - Kconfig looks fine
> > > config IXP4XX_WATCHDOG
> > > tristate "IXP4xx Watchdog"
> > > depends on ARCH_IXP4XX
> > >
> > > - Makefile looks fine
> > > obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
> > >
> > > - .config looks fine
> > > IXP4XX_WATCHDOG is NOT defined
> > >
> > > - make drivers/watchdog/ looks fine
> > > No error and ixp4xx_wdt.o is NOT built.
> > >
> > >
> > > However, in the past (if I recollect correctly :) ), a "make <something_that
> > > depends_on_a_config_variable_that_is_not_defined>" returned an error stating
> > > that no rule existed to build the specified target.
> > >
> >
> > This is not correct. It only applies if the target directory Makefile is
> > excluded by the make flags, or possibly if the target file is a complex
> > one build from various source files.
> >
> > > I sometimes needed to tweak the Kconfig files to force some compilation when
> > > I didn't have the right tool chain or configuration.
> > > It was maybe not the best practice, but it worked most of the time.
> > >
> > >
> > > Now, with the example above, such a compilation attempt is possible. It is
> > > maybe normal (because of a change somewhere in the way the kernel is built,
> > > because of an updated toolchain on my machine, ...)
> > > This is just fine for me, but looked really surprising.
> > >
> > > That is why I first thought that something was missing in a Kconfig file.
> > >
> > >
> > > So my comments are just a surprise to me to something that seems not to
> > > behave the same as before.
> > >
> > I don't think anything changed. It always worked like that for me.
> > I would suggest to go back to an older kernel and try it there.
> > You'll see exactly the same error. Maybe you just never encountered
> > a file like that.
>
> git reset --hard next-20210111 (randomly chosen date)
> make allmodconfig
> make clean
> make -j7 drivers/watchdog/ixp4xx_wdt.o (too build most of the needed stuff
> to build a kernel)
> touch drivers/watchdog/ixp4xx_wdt.c
> make -j7 drivers/watchdog/ixp4xx_wdt.o (too build this file only)
>
> DESCEND objtool
> CALL scripts/atomic/check-atomics.sh
> CALL scripts/checksyscalls.sh
> make[3]: *** Aucune règle pour fabriquer la cible «
> drivers/watchdog/ixp4xx_wdt.o ». Arrêt.
> make[2]: *** [scripts/Makefile.build:471 : __build] Erreur 2
> make[1]: *** [scripts/Makefile.build:496 : drivers/watchdog] Erreur 2
> make: *** [Makefile:1805 : drivers] Erreur 2
>
Turns out the behavior preferred by you was introduced in v5.4 with
commit 394053f4a4b3 ("kbuild: make single targets work more correctly")
and undone with commit cc306abd19e8 ("kbuild: fix and refactor single
target build") in v6.1. As for what is the expected behavior, I can't say.
I for my part had not noticed that the behavior had changed between v5.4
and v6.0.
I would suggest to discuss details with Yamada-san.
Thanks,
Guenter
next prev parent reply other threads:[~2023-01-01 19:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 11:07 Christophe JAILLET
2022-12-31 23:14 ` Guenter Roeck
2023-01-01 9:35 ` Christophe JAILLET
2023-01-01 15:07 ` Guenter Roeck
2023-01-01 17:52 ` Christophe JAILLET
2023-01-01 19:31 ` Guenter Roeck [this message]
2023-03-07 17:51 ` Guenter Roeck
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=20230101193118.GA2769955@roeck-us.net \
--to=linux@roeck-us.net \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=wim@linux-watchdog.org \
/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®