From: Marcel Holtmann <marcel@holtmann.org>
To: Baole Ni <baolex.ni@intel.com>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
jiangshanlai@gmail.com, m.chehab@samsung.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
kyungmin.park@samsung.com, k.kozlowski@samsung.com,
"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
chuansheng.liu@intel.com, mhocko@suse.com, koct9i@gmail.com,
Andrea Arcangeli <aarcange@redhat.com>,
aryabinin@virtuozzo.com
Subject: Re: [PATCH 1088/1285] Replace numeric parameter like 0444 with macro
Date: Tue, 2 Aug 2016 15:56:28 +0200 [thread overview]
Message-ID: <9FB95BB0-0382-41AF-9B1E-5D17D1523F3B@holtmann.org> (raw)
In-Reply-To: <20160802121527.22660-1-baolex.ni@intel.com>
Hi Baole,
> I find that the developers often just specified the numeric value
> when calling a macro which is defined with a parameter for access permission.
> As we know, these numeric value for access permission have had the corresponding macro,
> and that using macro can improve the robustness and readability of the code,
> thus, I suggest replacing the numeric parameter with the macro.
>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
> Signed-off-by: Baole Ni <baolex.ni@intel.com>
> ---
> net/bluetooth/l2cap_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index eb4f5f2..1dfb4bc 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -7636,5 +7636,5 @@ void l2cap_exit(void)
> l2cap_cleanup_sockets();
> }
>
> -module_param(disable_ertm, bool, 0644);
> +module_param(disable_ertm, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
> MODULE_PARM_DESC(disable_ertm, "Disable enhanced retransmission mode");
I am not taking any of these patches for the Bluetooth subsystem or its drivers. They are pretty much pointless to me and do not improve readability. I think they actually decrease readability. Every Unix/Linux developers knowns what 0644 (and all its magic cousins) mean.
The only way I would accept any patches to change this is if they would introduce module_param_rw / module_param_ro or something alike. Since I am pretty sure the majority is 644 and 444 here anyway.
Regards
Marcel
prev parent reply other threads:[~2016-08-02 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 12:15 Baole Ni
2016-08-02 13:56 ` Marcel Holtmann [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=9FB95BB0-0382-41AF-9B1E-5D17D1523F3B@holtmann.org \
--to=marcel@holtmann.org \
--cc=aarcange@redhat.com \
--cc=aryabinin@virtuozzo.com \
--cc=baolex.ni@intel.com \
--cc=chuansheng.liu@intel.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@padovan.org \
--cc=jiangshanlai@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=k.kozlowski@samsung.com \
--cc=koct9i@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=m.szyprowski@samsung.com \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.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®