mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Lidza Louina <lidza.louina@gmail.com>,
	Mark Hounschell <markh@compro.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	devel@driverdev.osuosl.org,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH RESEND 6/6] staging: dgnc: remove parenthesis
Date: Sun,  4 Oct 2015 19:50:15 +0530	[thread overview]
Message-ID: <1443968415-7397-7-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1443968415-7397-1-git-send-email-sudipm.mukherjee@gmail.com>

checkpatch was warning us about extra unneeded parenthesis.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/dgnc/dgnc_neo.c   |  2 +-
 drivers/staging/dgnc/dgnc_sysfs.c | 48 +++++++++++++++++++--------------------
 drivers/staging/dgnc/dgnc_tty.c   | 14 ++++++------
 3 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 99287bb..8106f52 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1792,6 +1792,6 @@ static void neo_vpd(struct dgnc_board *brd)
 		/* Search for the serial number */
 		for (i = 0; i < NEO_VPD_IMAGEBYTES - 3; i++)
 			if (brd->vpd[i] == 'S' && brd->vpd[i + 1] == 'N')
-				strncpy(brd->serial_num, &(brd->vpd[i + 3]), 9);
+				strncpy(brd->serial_num, &brd->vpd[i + 3], 9);
 	}
 }
diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
index dffb4af..74a0725 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -343,18 +343,18 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
 	int rc = 0;
 
 	dev_set_drvdata(&bd->pdev->dev, bd);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_state);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_baud);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_msignals);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_iflag);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_cflag);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_oflag);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_lflag);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_digi_flag);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_rxcount);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_txcount);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd);
-	rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_state);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_baud);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_msignals);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_iflag);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_cflag);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_oflag);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_lflag);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_digi_flag);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_rxcount);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_ports_txcount);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_vpd);
+	rc |= device_create_file(&bd->pdev->dev, &dev_attr_serial_number);
 	if (rc)
 		dev_err(&bd->pdev->dev, "dgnc: sysfs device_create_file failed!\n");
 }
@@ -362,18 +362,18 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
 /* removes all the sys files created for that port */
 void dgnc_remove_ports_sysfiles(struct dgnc_board *bd)
 {
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_state);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_baud);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_msignals);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_iflag);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_cflag);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_oflag);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_lflag);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_digi_flag);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_rxcount);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_ports_txcount);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_vpd);
-	device_remove_file(&(bd->pdev->dev), &dev_attr_serial_number);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_state);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_baud);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_msignals);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_iflag);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_cflag);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_oflag);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_lflag);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_digi_flag);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_rxcount);
+	device_remove_file(&bd->pdev->dev, &dev_attr_ports_txcount);
+	device_remove_file(&bd->pdev->dev, &dev_attr_vpd);
+	device_remove_file(&bd->pdev->dev, &dev_attr_serial_number);
 }
 
 static ssize_t dgnc_tty_state_show(struct device *d,
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 18f0dae..8489e5a 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -365,12 +365,12 @@ int dgnc_tty_init(struct dgnc_board *brd)
 			struct device *classp;
 
 			classp = tty_register_device(&brd->SerialDriver, i,
-						     &(ch->ch_bd->pdev->dev));
+						     &ch->ch_bd->pdev->dev);
 			ch->ch_tun.un_sysfs = classp;
 			dgnc_create_tty_sysfs(&ch->ch_tun, classp);
 
 			classp = tty_register_device(&brd->PrintDriver, i,
-						     &(ch->ch_bd->pdev->dev));
+						     &ch->ch_bd->pdev->dev);
 			ch->ch_pun.un_sysfs = classp;
 			dgnc_create_tty_sysfs(&ch->ch_pun, classp);
 		}
@@ -710,7 +710,7 @@ void dgnc_carrier(struct channel_t *ch)
 		 * for carrier in the open routine.
 		 */
 
-		if (waitqueue_active(&(ch->ch_flags_wait)))
+		if (waitqueue_active(&ch->ch_flags_wait))
 			wake_up_interruptible(&ch->ch_flags_wait);
 	}
 
@@ -723,7 +723,7 @@ void dgnc_carrier(struct channel_t *ch)
 		 * for carrier in the open routine.
 		 */
 
-		if (waitqueue_active(&(ch->ch_flags_wait)))
+		if (waitqueue_active(&ch->ch_flags_wait))
 			wake_up_interruptible(&ch->ch_flags_wait);
 	}
 
@@ -750,7 +750,7 @@ void dgnc_carrier(struct channel_t *ch)
 		 *
 		 *   Enable all select calls.
 		 */
-		if (waitqueue_active(&(ch->ch_flags_wait)))
+		if (waitqueue_active(&ch->ch_flags_wait))
 			wake_up_interruptible(&ch->ch_flags_wait);
 
 		if (ch->ch_tun.un_open_count > 0)
@@ -936,7 +936,7 @@ void dgnc_wakeup_writes(struct channel_t *ch)
 		if ((ch->ch_tun.un_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
 		    ch->ch_tun.un_tty->ldisc->ops->write_wakeup) {
 			spin_unlock_irqrestore(&ch->ch_lock, flags);
-			(ch->ch_tun.un_tty->ldisc->ops->write_wakeup)(ch->ch_tun.un_tty);
+			ch->ch_tun.un_tty->ldisc->ops->write_wakeup(ch->ch_tun.un_tty);
 			spin_lock_irqsave(&ch->ch_lock, flags);
 		}
 
@@ -978,7 +978,7 @@ void dgnc_wakeup_writes(struct channel_t *ch)
 		if ((ch->ch_pun.un_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
 		    ch->ch_pun.un_tty->ldisc->ops->write_wakeup) {
 			spin_unlock_irqrestore(&ch->ch_lock, flags);
-			(ch->ch_pun.un_tty->ldisc->ops->write_wakeup)(ch->ch_pun.un_tty);
+			ch->ch_pun.un_tty->ldisc->ops->write_wakeup(ch->ch_pun.un_tty);
 			spin_lock_irqsave(&ch->ch_lock, flags);
 		}
 
-- 
1.9.1


      parent reply	other threads:[~2015-10-04 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-04 14:20 [PATCH RESEND 0/6] staging: dgnc: checkpatch cleanups Sudip Mukherjee
2015-10-04 14:20 ` [PATCH RESEND 1/6] staging: dgnc: remove multiple blank lines Sudip Mukherjee
2015-10-04 14:20 ` [PATCH RESEND 2/6] staging: dgnc: remove blankline before brace Sudip Mukherjee
2015-10-04 14:20 ` [PATCH RESEND 3/6] staging: dgnc: remove blankline after brace Sudip Mukherjee
2015-10-04 14:20 ` [PATCH RESEND 4/6] staging: dgnc: remove space after cast Sudip Mukherjee
2015-10-04 14:20 ` [PATCH RESEND 5/6] staging: dgnc: alignment style Sudip Mukherjee
2015-10-04 14:20 ` Sudip Mukherjee [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=1443968415-7397-7-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lidza.louina@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@compro.net \
    /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®