mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gary Coulbourne <bear@bears.org>
To: miknix@gmail.com
Cc: linux-kernel@vger.kernel.org, Gary Coulbourne <bear@bears.org>
Subject: [PATCH] Staging: quickstart style fixes
Date: Sun, 21 Nov 2010 14:46:21 -0500	[thread overview]
Message-ID: <1290368781-20671-1-git-send-email-bear@bears.org> (raw)

Fixed some style issues reported by checkpatch.pl

Signed-off-by: Gary Coulbourne <bear@bears.org>
---
 drivers/staging/quickstart/quickstart.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
index d83bec8..e6b53b8 100644
--- a/drivers/staging/quickstart/quickstart.c
+++ b/drivers/staging/quickstart/quickstart.c
@@ -5,7 +5,7 @@
  *  Copyright (C) 2007-2010 Angelo Arrifano <miknix@gmail.com>
  *
  *  Information gathered from disassebled dsdt and from here:
- *  <http://www.microsoft.com/whdc/system/platform/firmware/DirAppLaunch.mspx> 
+ *  <http://www.microsoft.com/whdc/system/platform/firmware/DirAppLaunch.mspx>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -140,8 +140,12 @@ static ssize_t pressed_button_show(struct device *dev,
 					struct device_attribute *attr,
 					char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "%s\n",
-		(quickstart_data.pressed?quickstart_data.pressed->name:"none"));
+	char *button_name = "none";
+
+	if (quickstart_data.pressed)
+		button_name = quickstart_data.pressed->name;
+
+	return snprintf(buf, PAGE_SIZE, "%s\n", button_name);
 }
 
 
-- 
1.7.1


                 reply	other threads:[~2010-11-21 19:46 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=1290368781-20671-1-git-send-email-bear@bears.org \
    --to=bear@bears.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miknix@gmail.com \
    /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®