All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregkh@suse.de (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] i2c-viapro: Cleanup ifdef usage
Date: Sat, 29 Oct 2005 00:16:11 +0000	[thread overview]
Message-ID: <11305336594054@kroah.com> (raw)

[PATCH] i2c-viapro: Cleanup ifdef usage

It's not nice to put #ifdef in the middle of functions.

CC: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

 drivers/i2c/busses/i2c-viapro.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

---
commit ca68f1193e8fc86470d4222d563d13b5584dc4f8
tree 6bfb26f76e4a0986bfed32080d6aa6cec45f1b38
parent ed5453e54f0c4a29605fd8399f58649d8739f5f0
author Greg KH <greg@kroah.com> Thu, 22 Sep 2005 22:23:32 +0200
committer Greg Kroah-Hartman <gregkh@suse.de> Fri, 28 Oct 2005 14:02:08 -0700

 drivers/i2c/busses/i2c-viapro.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index c1c9eb1..566342d 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -126,6 +126,8 @@ static void vt596_dump_regs(const char *
 		printk("%02x\n", inb_p(SMBBLKDAT));
 	}
 }
+#else
+static inline void vt596_dump_regs(const char *msg, u8 size) { }
 #endif
 
 /* Return -1 on error, 0 on success */
@@ -135,9 +137,7 @@ static int vt596_transaction(u8 size)
 	int result = 0;
 	int timeout = 0;
 
-#ifdef DEBUG
 	vt596_dump_regs("Transaction (pre)", size);
-#endif
 
 	/* Make sure the SMBus host is ready to start transmitting */
 	if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
@@ -192,9 +192,7 @@ static int vt596_transaction(u8 size)
 	if (temp & 0x1F)
 		outb_p(temp, SMBHSTSTS);
 
-#ifdef DEBUG
 	vt596_dump_regs("Transaction (post)", size);
-#endif
 
 	return result;
 }


                 reply	other threads:[~2005-10-29  0:16 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=11305336594054@kroah.com \
    --to=gregkh@suse.de \
    --cc=lm-sensors@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.