Linux-HyperV List
 help / color / mirror / Atom feed
From: Matheus Castello <matheus@castello.eng.br>
To: kys@microsoft.com, haiyangz@microsoft.com,
	sthemmin@microsoft.com, wei.liu@kernel.org
Cc: sashal@kernel.org, Tianyu.Lan@microsoft.com, decui@microsoft.com,
	mikelley@microsoft.com, sunilmut@microsoft.com,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matheus Castello <matheus@castello.eng.br>
Subject: [PATCH 2/6] drivers: hv: vmbus: Replace symbolic permissions by octal permissions
Date: Sun, 15 Nov 2020 16:57:30 -0300	[thread overview]
Message-ID: <20201115195734.8338-3-matheus@castello.eng.br> (raw)
In-Reply-To: <20201115195734.8338-1-matheus@castello.eng.br>

This fixed the below checkpatch issue:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred.
Consider using octal permissions '0444'.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
---
 drivers/hv/vmbus_drv.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 9ed7e3b1d654..52c1407c1849 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1812,7 +1812,7 @@ static ssize_t channel_pending_show(struct vmbus_channel *channel,
 		       channel_pending(channel,
 				       vmbus_connection.monitor_pages[1]));
 }
-static VMBUS_CHAN_ATTR(pending, S_IRUGO, channel_pending_show, NULL);
+static VMBUS_CHAN_ATTR(pending, 0444, channel_pending_show, NULL);

 static ssize_t channel_latency_show(struct vmbus_channel *channel,
 				    char *buf)
@@ -1821,19 +1821,19 @@ static ssize_t channel_latency_show(struct vmbus_channel *channel,
 		       channel_latency(channel,
 				       vmbus_connection.monitor_pages[1]));
 }
-static VMBUS_CHAN_ATTR(latency, S_IRUGO, channel_latency_show, NULL);
+static VMBUS_CHAN_ATTR(latency, 0444, channel_latency_show, NULL);

 static ssize_t channel_interrupts_show(struct vmbus_channel *channel, char *buf)
 {
 	return sprintf(buf, "%llu\n", channel->interrupts);
 }
-static VMBUS_CHAN_ATTR(interrupts, S_IRUGO, channel_interrupts_show, NULL);
+static VMBUS_CHAN_ATTR(interrupts, 0444, channel_interrupts_show, NULL);

 static ssize_t channel_events_show(struct vmbus_channel *channel, char *buf)
 {
 	return sprintf(buf, "%llu\n", channel->sig_events);
 }
-static VMBUS_CHAN_ATTR(events, S_IRUGO, channel_events_show, NULL);
+static VMBUS_CHAN_ATTR(events, 0444, channel_events_show, NULL);

 static ssize_t channel_intr_in_full_show(struct vmbus_channel *channel,
 					 char *buf)
@@ -1872,7 +1872,7 @@ static ssize_t subchannel_monitor_id_show(struct vmbus_channel *channel,
 {
 	return sprintf(buf, "%u\n", channel->offermsg.monitorid);
 }
-static VMBUS_CHAN_ATTR(monitor_id, S_IRUGO, subchannel_monitor_id_show, NULL);
+static VMBUS_CHAN_ATTR(monitor_id, 0444, subchannel_monitor_id_show, NULL);

 static ssize_t subchannel_id_show(struct vmbus_channel *channel,
 				  char *buf)
--
2.28.0


  parent reply	other threads:[~2020-11-15 20:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 19:57 [PATCH 0/6] Add improvements suggested by checkpatch for vmbus_drv Matheus Castello
2020-11-15 19:57 ` [PATCH 1/6] drivers: hv: Fix hyperv_record_panic_msg path on comment Matheus Castello
2020-11-15 22:11   ` Michael Kelley
2020-11-15 19:57 ` Matheus Castello [this message]
2020-11-15 22:15   ` [PATCH 2/6] drivers: hv: vmbus: Replace symbolic permissions by octal permissions Michael Kelley
2020-11-15 19:57 ` [PATCH 3/6] drivers: hv: vmbus: Fix checkpatch LINE_SPACING Matheus Castello
2020-11-15 22:16   ` Michael Kelley
2020-11-15 19:57 ` [PATCH 4/6] drivers: hv: vmbus: Fix checkpatch SPLIT_STRING Matheus Castello
2020-11-15 22:25   ` Michael Kelley
2020-11-25  0:54     ` Matheus Castello
2020-11-25  2:56       ` Joe Perches
2020-11-25  3:14         ` Matheus Castello
2020-11-15 19:57 ` [PATCH 5/6] drivers: hv: vmbus: Fix unnecessary OOM_MESSAGE Matheus Castello
2020-11-16 11:21   ` Wei Liu
2020-11-16 15:58     ` Wei Liu
2020-11-15 19:57 ` [PATCH 6/6] drivers: hv: vmbus: Fix call msleep using < 20ms Matheus Castello
2020-11-15 22:32   ` Michael Kelley
2020-11-17 10:58 ` [PATCH 0/6] Add improvements suggested by checkpatch for vmbus_drv Wei Liu
2020-11-25  0:53   ` Matheus Castello

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=20201115195734.8338-3-matheus@castello.eng.br \
    --to=matheus@castello.eng.br \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=sunilmut@microsoft.com \
    --cc=wei.liu@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