From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Alexander Aring <aar@pengutronix.de>
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:41:29 +0200 [thread overview]
Message-ID: <57651749.7070603@hartkopp.net> (raw)
In-Reply-To: <d8067cd1-12c7-56cf-30fc-5e88c2ee6a2e@pengutronix.de>
On 06/18/2016 11:36 AM, Alexander Aring wrote:
>
> 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?
Feel free to sent a patch!
You detected the issue and as it turns out that you are capable to
create patches :-)
I would appreciate to see you as author then.
Thanks,
Oliver
>
> - Alex
>
next prev parent reply other threads:[~2016-06-18 9:41 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
2016-06-18 9:41 ` Oliver Hartkopp [this message]
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=57651749.7070603@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=aar@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.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;
as well as URLs for NNTP newsgroup(s).