From: Meng Tang <tangmeng@uniontech.com>
To: stas.yakovlev@gmail.com, kvalo@kernel.org, kuba@kernel.org,
pabeni@redhat.com
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Meng Tang <tangmeng@uniontech.com>
Subject: [PATCH] ipw2200: Fix permissions setted by DEVICE_ATTR
Date: Fri, 25 Mar 2022 15:41:41 +0800 [thread overview]
Message-ID: <20220325074141.17446-1-tangmeng@uniontech.com> (raw)
Because xcode_version and rtc only implement the show function
and do not provide the store function, so ucode_version and rtc
only need the read permission, not need the write permission more.
So, remove the write permission from xcode_version and rtc.
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 6830e88c4ed6..fa4f38d54d0a 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -1578,7 +1578,7 @@ static ssize_t show_ucode_version(struct device *d,
return sprintf(buf, "0x%08x\n", tmp);
}
-static DEVICE_ATTR(ucode_version, 0644, show_ucode_version, NULL);
+static DEVICE_ATTR(ucode_version, 0444, show_ucode_version, NULL);
static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
char *buf)
@@ -1592,7 +1592,7 @@ static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
return sprintf(buf, "0x%08x\n", tmp);
}
-static DEVICE_ATTR(rtc, 0644, show_rtc, NULL);
+static DEVICE_ATTR(rtc, 0444, show_rtc, NULL);
/*
* Add a device attribute to view/control the delay between eeprom
--
2.20.1
next reply other threads:[~2022-03-25 7:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 7:41 Meng Tang [this message]
2022-03-25 19:37 ` [PATCH] ipw2200: Fix permissions setted by DEVICE_ATTR Andrew Lunn
2022-03-29 20:41 ` Stanislav Yakovlev
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=20220325074141.17446-1-tangmeng@uniontech.com \
--to=tangmeng@uniontech.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stas.yakovlev@gmail.com \
/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).