mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daeseok Youn <daeseok.youn@gmail.com>
To: gregkh@linuxfoundation.org
Cc: shaun@xresource.ca, sachin.kamat@linaro.org,
	dulshani.gunawardhana89@gmail.com, dan.carpenter@oracle.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5 v2] staging: cxt1e1: fix checkpatch error 'assignment in if condition'
Date: Mon, 03 Mar 2014 09:00:02 +0900	[thread overview]
Message-ID: <4091292.138vlEnagH@daeseok-laptop.cloud.net> (raw)


checkpatch.pl error:
 ERROR: do not use assignment in if condition

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/cxt1e1/hwprobe.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index d6ccbd9..5f0e05d 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -142,8 +142,8 @@ hdw_sn_get(hdw_info_t *hi, int brdno)
 			hi->mfg_info.Serial[5]);
 #endif
 
-	if ((hi->promfmt = pmc_verify_cksum(&hi->mfg_info.data)) == PROM_FORMAT_Unk)
-	{
+	hi->promfmt = pmc_verify_cksum(&hi->mfg_info.data);
+	if (hi->promfmt == PROM_FORMAT_Unk) {
 		/* bad crc, data is suspect */
 		if (cxt1e1_log_level >= LOG_WARN)
 			pr_info("%s: EEPROM cksum error\n", hi->devname);
@@ -232,8 +232,8 @@ c4_hdw_init(struct pci_dev *pdev, int found)
 	unsigned char busno = 0xff;
 
 	/* our MUSYCC chip supports two functions, 0 & 1 */
-	if ((fun = PCI_FUNC(pdev->devfn)) > 1)
-	{
+	fun = PCI_FUNC(pdev->devfn);
+	if (fun > 1) {
 		pr_warning("unexpected devfun: 0x%x\n", pdev->devfn);
 		return 0;
 	}
@@ -380,11 +380,11 @@ c4hw_attach_all(void)
 		}
 		pci_set_master(hi->pdev[0]);
 		pci_set_master(hi->pdev[1]);
-		if (!(hi->ndev = c4_add_dev(hi, i, (long) hi->addr_mapped[0],
-					    (long) hi->addr_mapped[1],
-					    hi->pdev[0]->irq,
-					    hi->pdev[1]->irq)))
-		{
+		hi->ndev = c4_add_dev(hi, i, (long) hi->addr_mapped[0],
+				      (long) hi->addr_mapped[1],
+				      hi->pdev[0]->irq,
+				      hi->pdev[1]->irq);
+		if (!hi->ndev) {
 			drvr_state = SBE_DRVR_DOWN;
 			cleanup_ioremap();
 			/* NOTE: c4_add_dev() does its own device cleanup */
-- 
1.7.9.5



                 reply	other threads:[~2014-03-03  0:00 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=4091292.138vlEnagH@daeseok-laptop.cloud.net \
    --to=daeseok.youn@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dulshani.gunawardhana89@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=shaun@xresource.ca \
    /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®