From: Harvey Harrison <harvey.harrison@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] cred: remove const qualifiers
Date: Sat, 09 Aug 2008 16:02:20 -0700 [thread overview]
Message-ID: <1218322941.24441.11.camel@brick> (raw)
get_new_cred clearly writes through the pointer, so const isn't
appropriate. Sparse warns thusly:
include/linux/cred.h: In function ‘get_cred’:
include/linux/cred.h:181: warning: passing argument 1 of ‘get_new_cred’ discards qualifiers from pointer target type
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
include/linux/cred.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/cred.h b/include/linux/cred.h
index b156ed4..174eb56 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -176,9 +176,9 @@ static inline struct cred *get_new_cred(struct cred *cred)
* Get a reference on the specified set of credentials. The caller must
* release the reference.
*/
-static inline const struct cred *get_cred(const struct cred *cred)
+static inline struct cred *get_cred(struct cred *cred)
{
- return get_new_cred((struct cred *) cred);
+ return get_new_cred(cred);
}
/**
--
1.6.0.rc1.278.g9c632
next reply other threads:[~2008-08-09 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 23:02 Harvey Harrison [this message]
2008-08-10 10:58 ` [PATCH] cred: remove const qualifiers David Howells
2008-08-19 7:32 ` Andrew Morton
2008-08-21 13:24 ` David Howells
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=1218322941.24441.11.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.