All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, Daniel Mack <zonque@gmail.com>
Subject: [PATCH 2/2] ALSA: sound_firmware: fix style issues
Date: Thu,  5 Jun 2014 14:12:26 +0200	[thread overview]
Message-ID: <1401970346-9043-2-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1401970346-9043-1-git-send-email-zonque@gmail.com>

Fix some style issues in sound/sound_firmware.c. No functional change.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/sound_firmware.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c
index b155137..247858d 100644
--- a/sound/sound_firmware.c
+++ b/sound/sound_firmware.c
@@ -4,46 +4,47 @@
 #include <linux/file.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include "oss/sound_firmware.h"
 
 static int do_mod_firmware_load(const char *fn, char **fp)
 {
-	struct file* filp;
+	struct file *filp;
 	long l;
 	char *dp;
 	loff_t pos;
 
 	filp = filp_open(fn, 0, 0);
-	if (IS_ERR(filp))
-	{
+	if (IS_ERR(filp)) {
 		printk(KERN_INFO "Unable to load '%s'.\n", fn);
 		return 0;
 	}
+
 	l = i_size_read(file_inode(filp));
-	if (l <= 0 || l > 131072)
-	{
+	if (l <= 0 || l > 131072) {
 		printk(KERN_INFO "Invalid firmware '%s'\n", fn);
 		fput(filp);
 		return 0;
 	}
+
 	dp = vmalloc(l);
-	if (dp == NULL)
-	{
+	if (dp == NULL) {
 		printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
 		fput(filp);
 		return 0;
 	}
+
 	pos = 0;
-	if (vfs_read(filp, dp, l, &pos) != l)
-	{
+	if (vfs_read(filp, dp, l, &pos) != l) {
 		printk(KERN_INFO "Failed to read '%s'.\n", fn);
 		vfree(dp);
 		fput(filp);
 		return 0;
 	}
+
 	fput(filp);
 	*fp = dp;
+
 	return (int) l;
 }
 
@@ -63,7 +64,7 @@ static int do_mod_firmware_load(const char *fn, char **fp)
  *	Caution: This API is not recommended. Firmware should be loaded via
  *	request_firmware.
  */
- 
+
 int mod_firmware_load(const char *fn, char **fp)
 {
 	int r;
-- 
1.9.3

  reply	other threads:[~2014-06-05 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 12:12 [PATCH 1/2] ALSA: soundcore: coding style fixes Daniel Mack
2014-06-05 12:12 ` Daniel Mack [this message]
2014-06-05 13:38   ` [PATCH 2/2] ALSA: sound_firmware: fix style issues Takashi Sakamoto
2014-06-05 13:37 ` [PATCH 1/2] ALSA: soundcore: coding style fixes Takashi Sakamoto
2014-06-05 13:53 ` Takashi Iwai
2014-06-05 13:59   ` Daniel Mack
2014-06-05 14:12     ` Takashi Iwai
2014-06-05 14:14       ` Daniel Mack

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=1401970346-9043-2-git-send-email-zonque@gmail.com \
    --to=zonque@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.