From: Alexander Aring <aar@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH v2] can: build proc support only if CONFIG_PROC_FS is activated
Date: Sat, 18 Jun 2016 11:36:09 +0200 [thread overview]
Message-ID: <d8067cd1-12c7-56cf-30fc-5e88c2ee6a2e@pengutronix.de> (raw)
In-Reply-To: <57650D13.1030706@hartkopp.net>
Hi,
On 06/18/2016 10:57 AM, Oliver Hartkopp wrote:
> Hi Alexander,
>
> there's a procfs dependency of the CAN_BCM too.
>
> On 06/17/2016 02:08 PM, Marc Kleine-Budde wrote:
>> From: Alexander Aring <aar@pengutronix.de>
>>
>> When building can subsystem with CONFIG_PROC_FS=n I detected some unused
>> variables warning by using proc functions.
>
> Did you miss to switch on CAN_BCM when doing a CONFIG_PROC_FS disabled test?
>
I detected the unused variable warnings while running randconfig, the
first time I didn't saw the CAN_BCM but the second time (yet another
randconfig) I saw CAN_BCM.
net/can/bcm.c:235:37: warning: ‘bcm_proc_fops’ defined but not used
[-Wunused-const-variable=]
static const struct file_operations bcm_proc_fops = {
> Or is the procfs subsystem that intelligent that it just disables the functionality so that the users (e.g. in bcm.c) don't need to care about CONFIG_PROC_FS.
>
It is such intelligent, but you have no static inline no-op's for
functions which returns a pointer. It's:
#define proc_fs_foobar NULL
will be used and this occurs warnings while compiling. In case of
can-proc you really don't need to link against it if CONFIG_PROC_FS
isn't set - will turn off the warnings and compiles faster.
The CAN_BCM should be fixed as well, most subsystem puts ifdefs arounds
the proc functionality if it's not well outsourced like can-proc.c.
Who will send a patch now?
- Alex
next prev parent reply other threads:[~2016-06-18 9:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 12:08 [PATCH v2] can: build proc support only if CONFIG_PROC_FS is activated Marc Kleine-Budde
2016-06-17 12:34 ` Oliver Hartkopp
2016-06-18 8:57 ` Oliver Hartkopp
2016-06-18 9:36 ` Alexander Aring [this message]
2016-06-18 9:41 ` Oliver Hartkopp
2016-06-18 11:15 ` Alexander Aring
2016-06-18 11:19 ` Alexander Aring
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=d8067cd1-12c7-56cf-30fc-5e88c2ee6a2e@pengutronix.de \
--to=aar@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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).