mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: H Hartley Sweeten <hartleys@visionengravers.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] drivers/char/cncs.c: remove unnecessary casts
Date: Fri, 8 Jan 2010 13:40:47 -0700	[thread overview]
Message-ID: <201001081340.47680.hartleys@visionengravers.com> (raw)

drivers/char/cncs.c: Remove unnecessary casts.

The struct file 'private_data' member is a void *, the casts are not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 32b74de..ae6aa91 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -129,7 +129,7 @@ scdrv_open(struct inode *inode, struct file *file)
 static int
 scdrv_release(struct inode *inode, struct file *file)
 {
-	struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
+	struct subch_data_s *sd = file->private_data;
 	int rv;
 
 	/* free the interrupt */
@@ -161,7 +161,7 @@ scdrv_read(struct file *file, char __user *buf, size_t count, loff_t *f_pos)
 	int status;
 	int len;
 	unsigned long flags;
-	struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
+	struct subch_data_s *sd = file->private_data;
 
 	/* try to get control of the read buffer */
 	if (down_trylock(&sd->sd_rbs)) {
@@ -253,7 +253,7 @@ scdrv_write(struct file *file, const char __user *buf,
 {
 	unsigned long flags;
 	int status;
-	struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
+	struct subch_data_s *sd = file->private_data;
 
 	/* try to get control of the write buffer */
 	if (down_trylock(&sd->sd_wbs)) {
@@ -326,7 +326,7 @@ scdrv_poll(struct file *file, struct poll_table_struct *wait)
 {
 	unsigned int mask = 0;
 	int status = 0;
-	struct subch_data_s *sd = (struct subch_data_s *) file->private_data;
+	struct subch_data_s *sd = file->private_data;
 	unsigned long flags;
 
 	poll_wait(file, &sd->sd_rq, wait);

                 reply	other threads:[~2010-01-08 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201001081340.47680.hartleys@visionengravers.com \
    --to=hartleys@visionengravers.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 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®